2022-06-14 02:51:13 -07:00
|
|
|
//
|
|
|
|
// OnboardingSnapshotTests.swift
|
|
|
|
// secantTests
|
|
|
|
//
|
|
|
|
// Created by Lukáš Korba on 13.06.2022.
|
|
|
|
//
|
|
|
|
|
|
|
|
import XCTest
|
|
|
|
@testable import secant_testnet
|
|
|
|
import ComposableArchitecture
|
|
|
|
|
|
|
|
class OnboardingSnapshotTests: XCTestCase {
|
|
|
|
func testOnboardingFlowSnapshot() throws {
|
|
|
|
let store = OnboardingFlowStore(
|
2023-02-27 04:55:47 -08:00
|
|
|
initialState: OnboardingFlowReducer.State(
|
|
|
|
walletConfig: .default,
|
|
|
|
importWalletState: .placeholder
|
|
|
|
),
|
2022-11-08 00:36:42 -08:00
|
|
|
reducer: OnboardingFlowReducer()
|
2022-06-14 02:51:13 -07:00
|
|
|
)
|
|
|
|
let viewStore = ViewStore(store)
|
|
|
|
|
|
|
|
// step 1
|
|
|
|
addAttachments(
|
|
|
|
name: "\(#function)_info1",
|
|
|
|
OnboardingScreen(store: store)
|
|
|
|
)
|
|
|
|
|
|
|
|
// step 2
|
|
|
|
viewStore.send(.next)
|
|
|
|
addAttachments(
|
|
|
|
name: "\(#function)_info2",
|
|
|
|
OnboardingScreen(store: store)
|
|
|
|
)
|
|
|
|
|
|
|
|
// step 3
|
|
|
|
viewStore.send(.next)
|
|
|
|
addAttachments(
|
|
|
|
name: "\(#function)_info3",
|
|
|
|
OnboardingScreen(store: store)
|
|
|
|
)
|
|
|
|
|
|
|
|
// step 4
|
|
|
|
viewStore.send(.next)
|
|
|
|
addAttachments(
|
|
|
|
name: "\(#function)_info4",
|
|
|
|
OnboardingScreen(store: store)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|