summaryrefslogtreecommitdiffhomepage
path: root/ios/MullvadVPNUITests/Pages/AccountDeletionPage.swift
blob: 8966003c9a50387e8261b52ea137d47166f9752a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//
//  AccountDeletionPage.swift
//  MullvadVPNUITests
//
//  Created by Niklas Berglund on 2024-01-30.
//  Copyright © 2025 Mullvad VPN AB. All rights reserved.
//

import Foundation
import XCTest

class AccountDeletionPage: Page {
    @discardableResult override init(_ app: XCUIApplication) {
        super.init(app)

        self.pageElement = app.otherElements[.deleteAccountView]
        waitForPageToBeShown()
    }

    @discardableResult func tapTextField() -> Self {
        app.textFields[AccessibilityIdentifier.deleteAccountTextField].tap()
        return self
    }

    @discardableResult func tapDeleteAccountButton() -> Self {
        app.otherElements[.deleteAccountView].buttons[AccessibilityIdentifier.deleteButton].tap()
        return self
    }

    @discardableResult func tapCancelButton() -> Self {
        app.buttons[AccessibilityIdentifier.cancelButton].tap()
        return self
    }
}