Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored SwiftUI tests to use async/await APIs #171

Merged
merged 40 commits into from
Feb 23, 2022
Merged
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
95b0273
[async-swiftui-tests] - Had to comment out a bunch to get this compil…
Tyler-Keith-Thompson Feb 4, 2022
633e5e7
[async-swiftui-tests] - try to explicitly run on iOS 15 - TT
Tyler-Keith-Thompson Feb 4, 2022
ef40707
[async-swiftui-tests] - The default simulator was already running 15 …
Tyler-Keith-Thompson Feb 4, 2022
cc99f9a
[async-swiftui-tests] - Fixed availability in the other problem areas…
Tyler-Keith-Thompson Feb 4, 2022
d711d91
[async-swiftui-tests] - Refactored a bunch more tests, theres still c…
Tyler-Keith-Thompson Feb 4, 2022
29e3098
[async-swiftui-tests] - Got more tests refactored - TT
Tyler-Keith-Thompson Feb 4, 2022
7450e43
[async-swiftui-tests] - Had to re host the view after wrapping it bec…
Tyler-Keith-Thompson Feb 4, 2022
3b5d1d1
[async-swiftui-tests] - Added a bunch more of those generic tests - TT
Tyler-Keith-Thompson Feb 4, 2022
c0c2597
[async-swiftui-tests] - Bunch more tests - TT
Tyler-Keith-Thompson Feb 4, 2022
37fc318
[async-swiftui-tests] - You know I am glad we wrote all these tests b…
Tyler-Keith-Thompson Feb 4, 2022
e6bdb80
[async-swiftui-tests] - Finally got all generic constraint tests refa…
Tyler-Keith-Thompson Feb 4, 2022
9c65646
[async-swiftui-tests] - I have a thread sanitizer issue but the lates…
Tyler-Keith-Thompson Feb 5, 2022
8515382
[async-swiftui-tests] - Thread sanitizer issues resolved, this is tur…
Tyler-Keith-Thompson Feb 5, 2022
f83a545
[async-swiftui-tests] - Another set of tests refactored - TT
Tyler-Keith-Thompson Feb 5, 2022
2441c03
[async-swiftui-tests] - Finally cracked the modal thing...that was tr…
Tyler-Keith-Thompson Feb 5, 2022
8efd308
[async-swiftui-tests] - Modal tests had an intermittent failure, rese…
Tyler-Keith-Thompson Feb 5, 2022
703daed
[async-swiftui-tests] - Got a bunch more tests passing, still a long …
Tyler-Keith-Thompson Feb 7, 2022
b33b009
[async-swiftui-tests] - everything should compile now - TT
Tyler-Keith-Thompson Feb 7, 2022
f784f08
[async-swiftui-tests] - Does macos 12 work for GitHub actions yet? - TT
Tyler-Keith-Thompson Feb 7, 2022
5361831
[async-swiftui-tests] - disable tests in the pipeline, because macOS …
Tyler-Keith-Thompson Feb 7, 2022
dce4ab7
[async-swiftui-tests] - Refactored some SwiftUIExample tests, includi…
Tyler-Keith-Thompson Feb 7, 2022
9aaed87
[async-swiftui-tests] - Refactored all UIKit interop tests - TT
Tyler-Keith-Thompson Feb 7, 2022
2ab93e9
[async-swiftui-tests] - Refactored all the example tests - TT
Tyler-Keith-Thompson Feb 8, 2022
52ff0cc
[async-swiftui-tests] - Quick fix of warnings - TT
Tyler-Keith-Thompson Feb 8, 2022
34192f2
[async-swiftui-tests] - Added a couple more tests - TT
Tyler-Keith-Thompson Feb 8, 2022
925b8df
[async-swiftui-tests] - Huzzah, the tests work for the right reasons,…
Tyler-Keith-Thompson Feb 8, 2022
a72ceb7
[async-swiftui-tests] - Nav link tests refactored! - TT
Tyler-Keith-Thompson Feb 8, 2022
8ea01d2
[async-swiftui-tests] - Fixed some of the runtime warnings about exec…
Tyler-Keith-Thompson Feb 8, 2022
d594957
[async-swiftui-tests] - Fixed a bunch of other runtime errors for bei…
Tyler-Keith-Thompson Feb 8, 2022
92aefe3
[async-swiftui-tests] - ContentView tests back up and running - TT
Tyler-Keith-Thompson Feb 8, 2022
14d2682
[async-swiftui-tests] - All old ViewHosting extensions have been repl…
Tyler-Keith-Thompson Feb 8, 2022
3bcd4a5
[async-swiftui-tests] - re-enabled the pipeline - TT
Tyler-Keith-Thompson Feb 8, 2022
7428654
[async-swiftui-tests] - Fixed a linter error - TT
Tyler-Keith-Thompson Feb 8, 2022
9db85e6
Merge branch 'main' into async-swiftui-tests
Tyler-Keith-Thompson Feb 8, 2022
5f33d53
[async-swiftui-tests] - Finished refactoring modal tests, that should…
Tyler-Keith-Thompson Feb 8, 2022
ddb3efb
Merge branch 'async-swiftui-tests' of github.com:wwt/SwiftCurrent int…
Tyler-Keith-Thompson Feb 8, 2022
944442e
[skip ci] async-swiftui-tests - Superfluous return removal - TT
Tyler-Keith-Thompson Feb 8, 2022
c39a009
[async-swiftui-tests] - The pipelien will maybe possibly pass? - TT MF
Tyler-Keith-Thompson Feb 23, 2022
99b405f
[async-swiftui-tests] - Fixed the whitespace thing Nick didn't like - TT
Tyler-Keith-Thompson Feb 23, 2022
b8f59d6
Merge branch 'main' into async-swiftui-tests
Tyler-Keith-Thompson Feb 23, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/PR_CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ jobs:
- uses: actions/checkout@v2
- name: Swiftlint
run: bundle exec fastlane lint
working-directory: ${{ env.working-directory }}
working-directory: ${{ env.working-directory }}
239 changes: 120 additions & 119 deletions ExampleApps/SwiftUIExample/SwiftUIExampleTests/UIKitInteropTests.swift

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -34,31 +34,25 @@ final class AccountInformationViewTests: XCTestCase, WorkflowTestingReceiver {

private typealias MFAViewWorkflowView = WorkflowLauncher<WorkflowItem<MFAView, Never, MFAView>>

func testUpdatedAccountInformationView() throws {
let exp = ViewHosting.loadView(AccountInformationView()).inspection.inspect { view in
XCTAssertEqual(try view.find(ViewType.Text.self).string(), "Email: ")
XCTAssertEqual(try view.find(ViewType.Text.self, skipFound: 1).string(), "SwiftCurrent@wwt.com")
func testUpdatedAccountInformationView() async throws {
let view = try await AccountInformationView().hostAndInspect(with: \.inspection)

XCTAssertEqual(try view.find(ViewType.Text.self, skipFound: 2).string(), "Password: ")
XCTAssertEqual(try view.find(ViewType.SecureField.self).input(), "supersecure")
XCTAssertEqual(try view.find(ViewType.Text.self).string(), "Email: ")
XCTAssertEqual(try view.find(ViewType.Text.self, skipFound: 1).string(), "SwiftCurrent@wwt.com")

XCTAssertEqual(view.findAll(ViewType.Button.self).count, 2)
}
wait(for: [exp], timeout: TestConstant.timeout)
XCTAssertEqual(try view.find(ViewType.Text.self, skipFound: 2).string(), "Password: ")
XCTAssertEqual(try view.find(ViewType.SecureField.self).input(), "supersecure")

XCTAssertEqual(view.findAll(ViewType.Button.self).count, 2)
}

func testAccountInformationCanLaunchUsernameWorkflowAgnostic() throws {
func testAccountInformationCanLaunchUsernameWorkflowAgnostic() async throws {
Self.workflowLaunchedData.removeAll()
var accountInformation: InspectableView<ViewType.View<AccountInformationView>>!
let exp = ViewHosting.loadView(AccountInformationView()).inspection.inspect { view in
accountInformation = view
XCTAssertFalse(try view.actualView().emailWorkflowLaunched)
XCTAssertNoThrow(try view.find(ViewType.Button.self).tap())
XCTAssert(try view.actualView().emailWorkflowLaunched)
}
wait(for: [exp], timeout: TestConstant.timeout)

XCTAssertNotNil(accountInformation)
let accountInformation = try await AccountInformationView().hostAndInspect(with: \.inspection)
XCTAssertFalse(try accountInformation.actualView().emailWorkflowLaunched)
XCTAssertNoThrow(try accountInformation.find(ViewType.Button.self).tap())
XCTAssert(try accountInformation.actualView().emailWorkflowLaunched)

waitUntil(Self.workflowTestingData != nil)
let data = Self.workflowTestingData
Expand All @@ -79,49 +73,38 @@ final class AccountInformationViewTests: XCTestCase, WorkflowTestingReceiver {
// Complete workflow
(Self.workflowTestingData?.orchestrationResponder as? WorkflowViewModel)?.onFinishPublisher.send(.args("new email"))

wait(for: [
ViewHosting.loadView(try accountInformation.actualView()).inspection.inspect { view in
XCTAssertEqual(try view.actualView().email, "new email")
XCTAssertFalse(try view.actualView().emailWorkflowLaunched)
}
], timeout: TestConstant.timeout)
let view = try await accountInformation.actualView().hostAndInspect(with: \.inspection)
XCTAssertEqual(try view.actualView().email, "new email")
XCTAssertFalse(try view.actualView().emailWorkflowLaunched)
}

func testAccountInformationDoesNotBlowUp_IfUsernameWorkflowReturnsSomethingWEIRD() throws {
func testAccountInformationDoesNotBlowUp_IfUsernameWorkflowReturnsSomethingWEIRD() async throws {
class CustomObj { }
Self.workflowLaunchedData.removeAll()
var accountInformation: InspectableView<ViewType.View<AccountInformationView>>!
var expectedEmail = "starting value"
let exp = ViewHosting.loadView(AccountInformationView()).inspection.inspect { view in
accountInformation = view
expectedEmail = try view.actualView().email
XCTAssertNoThrow(try view.find(ViewType.Button.self).tap())
}
wait(for: [exp], timeout: TestConstant.timeout)

if Self.workflowTestingData == nil { throw XCTSkip("test data was not created") }
let accountInformation = try await AccountInformationView().hostAndInspect(with: \.inspection)
let expectedEmail = try accountInformation.actualView().email

XCTAssertNoThrow(try accountInformation.find(ViewType.Button.self).tap())

waitUntil(Self.workflowTestingData != nil)

XCTAssertNotNil(Self.workflowTestingData)
(Self.workflowTestingData?.orchestrationResponder as? WorkflowViewModel)?.onFinishPublisher.send(.args(CustomObj()))

wait(for: [
ViewHosting.loadView(try accountInformation.actualView()).inspection.inspect { view in
XCTAssert(try view.actualView().emailWorkflowLaunched)
XCTAssertEqual(try view.actualView().email, expectedEmail)
}
].compactMap { $0 }, timeout: TestConstant.timeout)
let view = try await accountInformation.actualView().hostAndInspect(with: \.inspection)
XCTAssert(try view.actualView().emailWorkflowLaunched)
XCTAssertEqual(try view.actualView().email, expectedEmail)
}

func testAccountInformationCanLaunchPasswordWorkflowAgnostic() throws {
func testAccountInformationCanLaunchPasswordWorkflowAgnostic() async throws {
Self.workflowLaunchedData.removeAll()
var accountInformation: InspectableView<ViewType.View<AccountInformationView>>!
let exp = ViewHosting.loadView(AccountInformationView()).inspection.inspect { view in
accountInformation = view
XCTAssertFalse(try view.actualView().passwordWorkflowLaunched)
XCTAssertNoThrow(try view.find(ViewType.Button.self, skipFound: 1).tap())
XCTAssert(try view.actualView().passwordWorkflowLaunched)
}
wait(for: [exp], timeout: TestConstant.timeout)

XCTAssertNotNil(accountInformation)
let accountInformation = try await AccountInformationView().hostAndInspect(with: \.inspection)

XCTAssertFalse(try accountInformation.actualView().passwordWorkflowLaunched)
XCTAssertNoThrow(try accountInformation.find(ViewType.Button.self, skipFound: 1).tap())
XCTAssert(try accountInformation.actualView().passwordWorkflowLaunched)

waitUntil(Self.workflowTestingData != nil)
let data = Self.workflowTestingData
Expand All @@ -142,48 +125,39 @@ final class AccountInformationViewTests: XCTestCase, WorkflowTestingReceiver {
// Complete workflow
(Self.workflowTestingData?.orchestrationResponder as? WorkflowViewModel)?.onFinishPublisher.send(.args("newPassword"))

wait(for: [
ViewHosting.loadView(try accountInformation.actualView()).inspection.inspect { view in
XCTAssertEqual(try view.actualView().password, "newPassword")
XCTAssertFalse(try view.actualView().passwordWorkflowLaunched)
}
], timeout: TestConstant.timeout)
let view = try await accountInformation.actualView().hostAndInspect(with: \.inspection)
XCTAssertEqual(try view.actualView().password, "newPassword")
XCTAssertFalse(try view.actualView().passwordWorkflowLaunched)
}

func testAccountInformationDoesNotBlowUp_IfPasswordWorkflowReturnsSomethingWEIRD() throws {
func testAccountInformationDoesNotBlowUp_IfPasswordWorkflowReturnsSomethingWEIRD() async throws {
class CustomObj { }
Self.workflowLaunchedData.removeAll()
var accountInformation: InspectableView<ViewType.View<AccountInformationView>>!
var expectedPassword = "starting value"
let exp = ViewHosting.loadView(AccountInformationView()).inspection.inspect { view in
accountInformation = view
expectedPassword = try view.actualView().password
XCTAssertNoThrow(try view.find(ViewType.Button.self, skipFound: 1).tap())
}
wait(for: [exp], timeout: TestConstant.timeout)

if Self.workflowTestingData == nil { throw XCTSkip("test data was not created") }
let accountInformation = try await AccountInformationView().hostAndInspect(with: \.inspection)
let expectedPassword = try accountInformation.actualView().password
XCTAssertNoThrow(try accountInformation.find(ViewType.Button.self, skipFound: 1).tap())

waitUntil(Self.workflowTestingData != nil)
XCTAssertNotNil(Self.workflowTestingData)

(Self.workflowTestingData?.orchestrationResponder as? WorkflowViewModel)?.onFinishPublisher.send(.args(CustomObj()))

wait(for: [
ViewHosting.loadView(try accountInformation.actualView()).inspection.inspect { view in
XCTAssert(try view.actualView().passwordWorkflowLaunched)
XCTAssertEqual(try view.actualView().password, expectedPassword)
}
].compactMap { $0 }, timeout: TestConstant.timeout)
let view = try await accountInformation.actualView().hostAndInspect(with: \.inspection)
XCTAssert(try view.actualView().passwordWorkflowLaunched)
XCTAssertEqual(try view.actualView().password, expectedPassword)
}

func testAccountInformationCanLaunchBothWorkflows() throws {
let exp = ViewHosting.loadView(AccountInformationView()).inspection.inspect { view in
XCTAssertEqual(view.findAll(MFAViewWorkflowView.self).count, 0)
func testAccountInformationCanLaunchBothWorkflows() async throws {
let view = try await AccountInformationView().hostAndInspect(with: \.inspection)

let firstButton = try view.find(ViewType.Button.self)
let secondButton = try view.find(ViewType.Button.self, skipFound: 1)
XCTAssertNoThrow(try secondButton.tap())
XCTAssertNoThrow(try firstButton.tap())
XCTAssertEqual(view.findAll(MFAViewWorkflowView.self).count, 0)

XCTAssertEqual(view.findAll(MFAViewWorkflowView.self).count, 2)
}
wait(for: [exp], timeout: TestConstant.timeout)
let firstButton = try view.find(ViewType.Button.self)
let secondButton = try view.find(ViewType.Button.self, skipFound: 1)
XCTAssertNoThrow(try secondButton.tap())
XCTAssertNoThrow(try firstButton.tap())

XCTAssertEqual(view.findAll(MFAViewWorkflowView.self).count, 2)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,80 +14,97 @@ import SwiftUI
@testable import SwiftUIExample

final class ChangePasswordViewTests: XCTestCase, View {
func testChangePasswordView() throws {
func testChangePasswordView() async throws {
let currentPassword = UUID().uuidString
let exp = ViewHosting.loadView(ChangePasswordView(with: currentPassword)).inspection.inspect { view in
XCTAssertEqual(view.findAll(PasswordField.self).count, 3)
XCTAssertNoThrow(try view.find(ViewType.Button.self))
let view = try await MainActor.run {
ChangePasswordView(with: currentPassword)
}
wait(for: [exp], timeout: TestConstant.timeout)
.hostAndInspect(with: \.inspection)

XCTAssertEqual(view.findAll(PasswordField.self).count, 3)
XCTAssertNoThrow(try view.find(ViewType.Button.self))
}

func testChangePasswordProceeds_IfAllInformationIsCorrect() throws {
func testChangePasswordProceeds_IfAllInformationIsCorrect() async throws {
let currentPassword = UUID().uuidString
let onFinish = expectation(description: "onFinish called")
let exp = ViewHosting.loadView(WorkflowLauncher(isLaunched: .constant(true), startingArgs: currentPassword) {
thenProceed(with: ChangePasswordView.self)
}
.onFinish { _ in onFinish.fulfill() }).inspection.inspect { view in
XCTAssertNoThrow(try view.find(ViewType.SecureField.self).setInput(currentPassword))
XCTAssertNoThrow(try view.find(ViewType.SecureField.self, skipFound: 1).setInput("asdfF1"))
XCTAssertNoThrow(try view.find(ViewType.SecureField.self, skipFound: 2).setInput("asdfF1"))
XCTAssertNoThrow(try view.find(ViewType.Button.self).tap())
let view = try await MainActor.run {
WorkflowLauncher(isLaunched: .constant(true), startingArgs: currentPassword) {
thenProceed(with: ChangePasswordView.self)
}
.onFinish { _ in onFinish.fulfill() }
}
wait(for: [exp, onFinish], timeout: TestConstant.timeout)
.hostAndInspect(with: \.inspection)
.extractWorkflowItem()

XCTAssertNoThrow(try view.find(ViewType.SecureField.self).setInput(currentPassword))
XCTAssertNoThrow(try view.find(ViewType.SecureField.self, skipFound: 1).setInput("asdfF1"))
XCTAssertNoThrow(try view.find(ViewType.SecureField.self, skipFound: 2).setInput("asdfF1"))
XCTAssertNoThrow(try view.find(ViewType.Button.self).tap())

wait(for: [onFinish], timeout: TestConstant.timeout)
}

func testErrorsDoNotShowUp_IfFormWasNotSubmitted() throws {
func testErrorsDoNotShowUp_IfFormWasNotSubmitted() async throws {
let currentPassword = UUID().uuidString
let exp = ViewHosting.loadView(ChangePasswordView(with: currentPassword)).inspection.inspect { view in
XCTAssertNoThrow(try view.find(ViewType.SecureField.self).setInput(currentPassword))
XCTAssertNoThrow(try view.find(ViewType.SecureField.self, skipFound: 1).setInput("asdfF1"))
XCTAssertNoThrow(try view.find(ViewType.SecureField.self, skipFound: 2).setInput("asdfF1"))
XCTAssertNoThrow(try view.find(ViewType.Button.self))
let view = try await MainActor.run {
ChangePasswordView(with: currentPassword)
}
wait(for: [exp], timeout: TestConstant.timeout)
.hostAndInspect(with: \.inspection)

XCTAssertNoThrow(try view.find(ViewType.SecureField.self).setInput(currentPassword))
XCTAssertNoThrow(try view.find(ViewType.SecureField.self, skipFound: 1).setInput("asdfF1"))
XCTAssertNoThrow(try view.find(ViewType.SecureField.self, skipFound: 2).setInput("asdfF1"))
XCTAssertNoThrow(try view.find(ViewType.Button.self))
}

func testIncorrectOldPassword_PrintsError() throws {
func testIncorrectOldPassword_PrintsError() async throws {
let currentPassword = UUID().uuidString
let exp = ViewHosting.loadView(ChangePasswordView(with: currentPassword)).inspection.inspect { view in
XCTAssertNoThrow(try view.find(ViewType.SecureField.self).setInput("WRONG"))
XCTAssertNoThrow(try view.find(ViewType.Button.self).tap())
XCTAssert(try view.vStack().text(0).string().contains("Old password does not match records"))
let view = try await MainActor.run {
ChangePasswordView(with: currentPassword)
}
wait(for: [exp], timeout: TestConstant.timeout)
.hostAndInspect(with: \.inspection)

XCTAssertNoThrow(try view.find(ViewType.SecureField.self).setInput("WRONG"))
XCTAssertNoThrow(try view.find(ViewType.Button.self).tap())
XCTAssert(try view.vStack().text(0).string().contains("Old password does not match records"))
}

func testPasswordsNotMatching_PrintsError() throws {
func testPasswordsNotMatching_PrintsError() async throws {
let currentPassword = UUID().uuidString
let exp = ViewHosting.loadView(ChangePasswordView(with: currentPassword)).inspection.inspect { view in
XCTAssertNoThrow(try view.find(ViewType.SecureField.self).setInput(currentPassword))
XCTAssertNoThrow(try view.find(ViewType.SecureField.self, skipFound: 1).setInput(UUID().uuidString))
XCTAssertNoThrow(try view.find(ViewType.SecureField.self, skipFound: 2).setInput(UUID().uuidString))
XCTAssertNoThrow(try view.find(ViewType.Button.self).tap())
XCTAssert(try view.vStack().text(0).string().contains("New password and confirmation password do not match"))
let view = try await MainActor.run {
ChangePasswordView(with: currentPassword)
}
wait(for: [exp], timeout: TestConstant.timeout)
.hostAndInspect(with: \.inspection)

XCTAssertNoThrow(try view.find(ViewType.SecureField.self).setInput(currentPassword))
XCTAssertNoThrow(try view.find(ViewType.SecureField.self, skipFound: 1).setInput(UUID().uuidString))
XCTAssertNoThrow(try view.find(ViewType.SecureField.self, skipFound: 2).setInput(UUID().uuidString))
XCTAssertNoThrow(try view.find(ViewType.Button.self).tap())
XCTAssert(try view.vStack().text(0).string().contains("New password and confirmation password do not match"))
}

func testPasswordsNotHavingUppercase_PrintsError() throws {
func testPasswordsNotHavingUppercase_PrintsError() async throws {
let currentPassword = UUID().uuidString
let exp = ViewHosting.loadView(ChangePasswordView(with: currentPassword)).inspection.inspect { view in
XCTAssertNoThrow(try view.find(ViewType.SecureField.self, skipFound: 1).setInput("asdf1"))
XCTAssertNoThrow(try view.find(ViewType.Button.self).tap())
XCTAssert(try view.vStack().text(0).string().contains("Password must contain at least one uppercase character"))
let view = try await MainActor.run {
ChangePasswordView(with: currentPassword)
}
wait(for: [exp], timeout: TestConstant.timeout)
.hostAndInspect(with: \.inspection)

XCTAssertNoThrow(try view.find(ViewType.SecureField.self, skipFound: 1).setInput("asdf1"))
XCTAssertNoThrow(try view.find(ViewType.Button.self).tap())
XCTAssert(try view.vStack().text(0).string().contains("Password must contain at least one uppercase character"))
}

func testPasswordsNotHavingNumber_PrintsError() throws {
func testPasswordsNotHavingNumber_PrintsError() async throws {
let currentPassword = UUID().uuidString
let exp = ViewHosting.loadView(ChangePasswordView(with: currentPassword)).inspection.inspect { view in
XCTAssertNoThrow(try view.find(ViewType.SecureField.self, skipFound: 1).setInput("asdfF"))
XCTAssertNoThrow(try view.find(ViewType.Button.self).tap())
XCTAssert(try view.vStack().text(0).string().contains("Password must contain at least one number"))
let view = try await MainActor.run {
ChangePasswordView(with: currentPassword)
}
wait(for: [exp], timeout: TestConstant.timeout)
.hostAndInspect(with: \.inspection)

XCTAssertNoThrow(try view.find(ViewType.SecureField.self, skipFound: 1).setInput("asdfF"))
XCTAssertNoThrow(try view.find(ViewType.Button.self).tap())
XCTAssert(try view.vStack().text(0).string().contains("Password must contain at least one number"))
}
}
Loading