summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJon Petersson <jon.petersson@kvadrat.se>2024-05-24 16:05:52 +0200
committerJon Petersson <jon.petersson@kvadrat.se>2024-05-28 12:53:36 +0200
commitdc921992588109c7050bb59ecdce62c6b32b3b90 (patch)
tree0bc66dcbc3866c2d853d312db329a7d1d9df90de
parent2211f2875fc7953eea2ec2caa04f03d91f58be49 (diff)
downloadmullvadvpn-update-screenshots-to-use-pq-tunnels-ios-684.tar.xz
mullvadvpn-update-screenshots-to-use-pq-tunnels-ios-684.zip
Update screenshots to use post quantum tunnelupdate-screenshots-to-use-pq-tunnels-ios-684
-rw-r--r--ios/MullvadVPN/AppDelegate.swift4
-rw-r--r--ios/MullvadVPNScreenshots/MullvadVPNScreenshots.swift24
2 files changed, 19 insertions, 9 deletions
diff --git a/ios/MullvadVPN/AppDelegate.swift b/ios/MullvadVPN/AppDelegate.swift
index b31acdcaab..54b0d8343a 100644
--- a/ios/MullvadVPN/AppDelegate.swift
+++ b/ios/MullvadVPN/AppDelegate.swift
@@ -407,6 +407,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
}
private func setupNotifications() {
+ // We can't close banners in the screenshot tests due to how the NotificationController view
+ // is overridden, so we need this horrible workaround to make sure that no banners are visible.
+ guard launchArguments.target != .screenshots else { return }
+
NotificationManager.shared.notificationProviders = [
TunnelStatusNotificationProvider(tunnelManager: tunnelManager),
AccountExpirySystemNotificationProvider(tunnelManager: tunnelManager),
diff --git a/ios/MullvadVPNScreenshots/MullvadVPNScreenshots.swift b/ios/MullvadVPNScreenshots/MullvadVPNScreenshots.swift
index 55debaa9b3..764dbc2632 100644
--- a/ios/MullvadVPNScreenshots/MullvadVPNScreenshots.swift
+++ b/ios/MullvadVPNScreenshots/MullvadVPNScreenshots.swift
@@ -88,7 +88,7 @@ class MullvadVPNScreenshots: XCTestCase {
// Wait for Disconnect button to appear
_ = app.buttons[AccessibilityIdentifier.disconnectButton.rawValue].waitForExistence(timeout: 2)
- snapshot("MainSecured")
+ snapshot("ConnectionSecured")
// Re-open Select location controller (iPhone only)
if case .phone = UIDevice.current.userInterfaceIdiom {
@@ -113,15 +113,14 @@ class MullvadVPNScreenshots: XCTestCase {
// Tap on VPN settings cell
_ = app.tables.cells[AccessibilityIdentifier.vpnSettingsCell.rawValue].waitForExistence(timeout: 2)
app.tables.cells[AccessibilityIdentifier.vpnSettingsCell.rawValue].tap()
+ snapshot("VPNSettings")
- app.tables.element
- .cells
- .matching(NSPredicate(format: "identifier BEGINSWITH %@", "mullvadDNS"))
- .switches
- .matching(NSPredicate(format: "value = %@", "0"))
- .allElementsBoundByAccessibilityElement
- .forEach { $0.tap() }
- snapshot("VPN Settings")
+ let quantumCell = app.tables.otherElements.containing(
+ .any,
+ identifier: AccessibilityIdentifier.quantumResistantTunnelCell.rawValue
+ )
+ quantumCell.buttons[AccessibilityIdentifier.expandButton.rawValue].tap()
+ app.cells[AccessibilityIdentifier.quantumResistanceOn.rawValue].tap()
// Tap back button
app.navigationBars.buttons.firstMatch.tap()
@@ -129,6 +128,13 @@ class MullvadVPNScreenshots: XCTestCase {
// Tap dismiss button
app.navigationBars.buttons.firstMatch.tap()
+ // Acquire a quantum resistant connection
+ app.buttons[AccessibilityIdentifier.disconnectButton.rawValue].tap()
+ app.buttons[AccessibilityIdentifier.secureConnectionButton.rawValue].tap()
+ _ = app.staticTexts[AccessibilityIdentifier.connectionStatusConnectedLabel.rawValue]
+ .waitForExistence(timeout: 5)
+ snapshot("QuantumResistantConnectionSecured")
+
// Open Account
app.buttons[AccessibilityIdentifier.accountButton.rawValue].tap()