-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1183 from xvpn/wip/PIA-659_E2E_UpdateSettings
PIA-659: Added Settings E2E Tests
- Loading branch information
Showing
20 changed files
with
430 additions
and
45 deletions.
There are no files selected for viewing
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
28 changes: 28 additions & 0 deletions
28
PIA-VPN_E2E_Tests/Screens/Settings/AutomationSettingsScreen.swift
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,28 @@ | ||
// | ||
// AutomationSettingsScreen.swift | ||
// PIA-VPN_E2E_Tests | ||
// | ||
// Created by Geneva Parayno on 6/11/23. | ||
// Copyright © 2023 Private Internet Access Inc. All rights reserved. | ||
// | ||
|
||
import XCTest | ||
|
||
extension XCUIApplication { | ||
var enableAutomationSwitch: XCUIElement{ | ||
switches(with: "Enable Automation") | ||
} | ||
|
||
func navigateToAutomationSettings() { | ||
guard dashboardMenuButton.exists else { return } | ||
dashboardMenuButton.tap() | ||
|
||
if settingsButton.waitForExistence(timeout: defaultTimeout) { | ||
settingsButton.tap() | ||
} | ||
|
||
if automationSettingsButton.waitForExistence(timeout: defaultTimeout) { | ||
automationSettingsButton.tap() | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
PIA-VPN_E2E_Tests/Screens/Settings/GeneralSettingsScreen.swift
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,44 @@ | ||
// | ||
// GeneralSettingsScreen.swift | ||
// PIA-VPN_E2E_Tests | ||
// | ||
// Created by Geneva Parayno on 2/11/23. | ||
// Copyright © 2023 Private Internet Access Inc. All rights reserved. | ||
// | ||
|
||
import XCTest | ||
|
||
extension XCUIApplication { | ||
var connectSiriButton: XCUIElement { | ||
staticText(with: "'Connect' Siri Shortcut") | ||
} | ||
|
||
var disconnectSiriButton: XCUIElement { | ||
staticText(with: "'Disconnect' Siri Shortcut") | ||
} | ||
|
||
var serviceCommMessageSwitch: XCUIElement { | ||
switches(with: "Show Service Communication Messages") | ||
} | ||
|
||
var geoLocatedRegionsSwitch: XCUIElement { | ||
switches(with: "Show Geo-located Regions") | ||
} | ||
|
||
var resetSettingsButton: XCUIElement { | ||
staticText(with: "Reset settings to default") | ||
} | ||
|
||
func navigateToGeneralSettings() { | ||
guard dashboardMenuButton.exists else { return } | ||
dashboardMenuButton.tap() | ||
|
||
if settingsButton.waitForExistence(timeout: defaultTimeout) { | ||
settingsButton.tap() | ||
} | ||
|
||
if generalSettingsButton.waitForExistence(timeout: defaultTimeout) { | ||
generalSettingsButton.tap() | ||
} | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
PIA-VPN_E2E_Tests/Screens/Settings/HelpSettingsScreen.swift
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,36 @@ | ||
// | ||
// HelpSettingsScreen.swift | ||
// PIA-VPN_E2E_Tests | ||
// | ||
// Created by Geneva Parayno on 6/11/23. | ||
// Copyright © 2023 Private Internet Access Inc. All rights reserved. | ||
// | ||
|
||
import XCTest | ||
|
||
extension XCUIApplication { | ||
var sendDebugButton: XCUIElement { | ||
staticText(with: "Send Debug Log to support") | ||
} | ||
|
||
var helpImprovePIASwitch: XCUIElement { | ||
switches(with: "Help improve PIA") | ||
} | ||
|
||
var latestNewsButton: XCUIElement { | ||
staticText(with: "Latest News") | ||
} | ||
|
||
func navigateToHelpSettings() { | ||
guard dashboardMenuButton.exists else { return } | ||
dashboardMenuButton.tap() | ||
|
||
if settingsButton.waitForExistence(timeout: defaultTimeout) { | ||
settingsButton.tap() | ||
} | ||
|
||
if helpSettingsButton.waitForExistence(timeout: defaultTimeout) { | ||
automationSettingsButton.tap() | ||
} | ||
} | ||
} |
Oops, something went wrong.