-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add account creation and deletion tests
- Loading branch information
1 parent
81009ad
commit 2fcd329
Showing
32 changed files
with
364 additions
and
432 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// AccountDeletionPage.swift | ||
// MullvadVPNUITests | ||
// | ||
// Created by Niklas Berglund on 2024-01-30. | ||
// Copyright © 2024 Mullvad VPN AB. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import XCTest | ||
|
||
class AccountDeletionPage: Page { | ||
@discardableResult override init(_ app: XCUIApplication) { | ||
super.init(app) | ||
|
||
self.pageAccessibilityIdentifier = .deleteAccountView | ||
waitForPageToBeShown() | ||
} | ||
|
||
@discardableResult func tapTextField() -> Self { | ||
app.textFields[AccessibilityIdentifier.deleteAccountTextField].tap() | ||
return self | ||
} | ||
|
||
@discardableResult func tapDeleteAccountButton() -> Self { | ||
guard let pageAccessibilityIdentifier = self.pageAccessibilityIdentifier else { | ||
XCTFail("Page's accessibility identifier not set") | ||
return self | ||
} | ||
|
||
app.otherElements[pageAccessibilityIdentifier].buttons[AccessibilityIdentifier.deleteButton].tap() | ||
return self | ||
} | ||
|
||
@discardableResult func tapCancelButton() -> Self { | ||
app.buttons[AccessibilityIdentifier.cancelButton].tap() | ||
return self | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// ChangeLogAlert.swift | ||
// MullvadVPNUITests | ||
// | ||
// Created by Niklas Berglund on 2024-02-20. | ||
// Copyright © 2024 Mullvad VPN AB. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import XCTest | ||
|
||
class ChangeLogAlert: Page { | ||
@discardableResult override init(_ app: XCUIApplication) { | ||
super.init(app) | ||
|
||
self.pageAccessibilityIdentifier = .changeLogAlert | ||
waitForPageToBeShown() | ||
} | ||
|
||
@discardableResult func tapOkay() -> Self { | ||
app.buttons[AccessibilityIdentifier.alertOkButton].tap() | ||
return self | ||
} | ||
} |
Oops, something went wrong.