summaryrefslogtreecommitdiffhomepage
path: root/ios/MullvadVPNUITests/SettingsTests.swift
blob: 1aff61b7cda3703b057ebd34c5bb6c30019fc5ed (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
//
//  SettingsTests.swift
//  MullvadVPNUITests
//
//  Created by Niklas Berglund on 2024-02-23.
//  Copyright © 2025 Mullvad VPN AB. All rights reserved.
//

import Foundation
import XCTest

class SettingsTests: LoggedOutUITestCase {
    func testSendProblemReport() throws {
        #if MULLVAD_ENVIRONMENT_STAGING
            let shouldSkipTest = false
        #else
            let shouldSkipTest = true
        #endif

        try XCTSkipIf(shouldSkipTest, "This test should only run in the staging environment")

        HeaderBar(app)
            .tapSettingsButton()

        SettingsPage(app)
            .tapReportAProblemCell()

        ProblemReportPage(app)
            .tapEmailTextField()
            .enterText("cookie@mullvad.net")
            .tapMessageTextView()
            .enterText(
                """
                Dear support
                This is a problem report from an iOS app test.
                """
            )
            .tapKeyboardDoneButton()
            .tapSendButton()

        ProblemReportSubmittedPage(app)
    }
}