summaryrefslogtreecommitdiffhomepage
path: root/ios/MullvadVPNUITests/SelectLocationTests.swift
blob: 71fc345f1bf2ba4e7220eb35239a045c2899fc08 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//
//  SelectLocationTests.swift
//  MullvadVPN
//
//  Created by Jon Petersson on 2025-04-10.
//  Copyright © 2025 Mullvad VPN AB. All rights reserved.
//

import XCTest

class SelectLocationTests: LoggedInWithTimeUITestCase {
    func testEnableDAITA() {
        HeaderBar(app)
            .tapSettingsButton()

        SettingsPage(app)
            .tapDAITACell()

        DAITAPage(app)
            .tapEnableSwitchIfOff()
            .tapDirectOnlySwitchIfOff()
            .tapEnableDirectOnlyDialogButtonIfPresent()
            .tapBackButton()

        SettingsPage(app)
            .tapDoneButton()

        TunnelControlPage(app)
            .tapSelectLocationButton()

        XCTAssertTrue(app.staticTexts[AccessibilityIdentifier.daitaFilterPill.asString].exists)
    }

    func testEnableShadowsocksObfuscation() {
        HeaderBar(app)
            .tapSettingsButton()

        SettingsPage(app)
            .tapVPNSettingsCell()

        VPNSettingsPage(app)
            .tapWireGuardObfuscationExpandButton()
            .tapWireGuardObfuscationShadowsocksCell()
            .tapBackButton()

        SettingsPage(app)
            .tapDoneButton()

        TunnelControlPage(app)
            .tapSelectLocationButton()

        XCTAssertTrue(app.staticTexts[AccessibilityIdentifier.obfuscationFilterPill.asString].exists)
    }
}