Skip to content

Commit bbc8795

Browse files
author
Jon Petersson
committed
Update screenshots to use post quantum tunnel
1 parent 2211f28 commit bbc8795

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

ios/MullvadVPN/AppDelegate.swift

+1
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
160160
},
161161
addressCache: addressCache
162162
)
163+
163164
} else {
164165
proxyFactory = REST.ProxyFactory.makeProxyFactory(
165166
transportProvider: REST.AnyTransportProvider { [weak self] in

ios/MullvadVPN/Coordinators/ApplicationCoordinator.swift

+7
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,13 @@ final class ApplicationCoordinator: Coordinator, Presenting, RootContainerViewCo
431431
the reference.
432432
*/
433433
private func setNotificationControllerParent(isPrimary: Bool) {
434+
// We can't close banners in the screenshot tests due to how the NotificationController view
435+
// is overridden, so we need this horrible workaround to make sure that no banners are visible.
436+
guard
437+
let launchArguments = try? ProcessInfo.processInfo.decode(LaunchArguments.self),
438+
launchArguments.target != .screenshots
439+
else { return }
440+
434441
if isPrimary {
435442
secondaryNavigationContainer.notificationController = nil
436443
primaryNavigationContainer.notificationController = notificationController

ios/MullvadVPNScreenshots/MullvadVPNScreenshots.swift

+10-9
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class MullvadVPNScreenshots: XCTestCase {
8888
// Wait for Disconnect button to appear
8989
_ = app.buttons[AccessibilityIdentifier.disconnectButton.rawValue].waitForExistence(timeout: 2)
9090

91-
snapshot("MainSecured")
91+
snapshot("ConnectionSecured")
9292

9393
// Re-open Select location controller (iPhone only)
9494
if case .phone = UIDevice.current.userInterfaceIdiom {
@@ -113,22 +113,23 @@ class MullvadVPNScreenshots: XCTestCase {
113113
// Tap on VPN settings cell
114114
_ = app.tables.cells[AccessibilityIdentifier.vpnSettingsCell.rawValue].waitForExistence(timeout: 2)
115115
app.tables.cells[AccessibilityIdentifier.vpnSettingsCell.rawValue].tap()
116+
snapshot("VPNSettings")
116117

117-
app.tables.element
118-
.cells
119-
.matching(NSPredicate(format: "identifier BEGINSWITH %@", "mullvadDNS"))
120-
.switches
121-
.matching(NSPredicate(format: "value = %@", "0"))
122-
.allElementsBoundByAccessibilityElement
123-
.forEach { $0.tap() }
124-
snapshot("VPN Settings")
118+
let quantumCell = app.tables.otherElements.containing(.any, identifier: AccessibilityIdentifier.quantumResistantTunnelCell.rawValue)
119+
quantumCell.buttons[AccessibilityIdentifier.expandButton.rawValue].tap()
120+
app.cells[AccessibilityIdentifier.quantumResistanceOn.rawValue].tap()
125121

126122
// Tap back button
127123
app.navigationBars.buttons.firstMatch.tap()
128124

129125
// Tap dismiss button
130126
app.navigationBars.buttons.firstMatch.tap()
131127

128+
// Acquire a quantum resistant connection
129+
app.buttons[AccessibilityIdentifier.disconnectButton.rawValue].tap()
130+
app.buttons[AccessibilityIdentifier.secureConnectionButton.rawValue].tap()
131+
snapshot("QuantumResistantConnectionSecured")
132+
132133
// Open Account
133134
app.buttons[AccessibilityIdentifier.accountButton.rawValue].tap()
134135

0 commit comments

Comments
 (0)