summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2021-05-25 14:57:19 +0200
committerAndrej Mihajlov <and@mullvad.net>2021-05-27 16:04:33 +0200
commit96170abd51592d05c4ab3e65f658046b17435f72 (patch)
treee07fe2978fa5b2d2b47dbb1f0af33bd17a26bb9a
parent2e742850b4e17d36bde93aaafcd1a86180485cd9 (diff)
downloadmullvadvpn-96170abd51592d05c4ab3e65f658046b17435f72.tar.xz
mullvadvpn-96170abd51592d05c4ab3e65f658046b17435f72.zip
Screenshots: add iPad 12.9-inch support and adapt the screenshotter script for iPad
-rw-r--r--ios/MullvadVPNScreenshots/MullvadVPNScreenshots.swift26
-rw-r--r--ios/Snapfile3
2 files changed, 19 insertions, 10 deletions
diff --git a/ios/MullvadVPNScreenshots/MullvadVPNScreenshots.swift b/ios/MullvadVPNScreenshots/MullvadVPNScreenshots.swift
index c584d280a4..e9e2db3ce1 100644
--- a/ios/MullvadVPNScreenshots/MullvadVPNScreenshots.swift
+++ b/ios/MullvadVPNScreenshots/MullvadVPNScreenshots.swift
@@ -45,11 +45,17 @@ class MullvadVPNScreenshots: XCTestCase {
textField.typeText(accountToken)
// Tap "Log in" button to log in
- app.toolbars["Toolbar"].buttons["LoginBarButtonItem"].tap()
+ if case .phone = UIDevice.current.userInterfaceIdiom {
+ app.toolbars["Toolbar"].buttons["LoginBarButtonItem"].tap()
+ } else {
+ textField.typeText("\n")
+ }
// Select Australia, Melbourne in Select location controller
- _ = app.buttons["SelectLocationButton"].waitForExistence(timeout: 10)
- app.buttons["SelectLocationButton"].tap()
+ if case .phone = UIDevice.current.userInterfaceIdiom {
+ _ = app.buttons["SelectLocationButton"].waitForExistence(timeout: 10)
+ app.buttons["SelectLocationButton"].tap()
+ }
let countryCell = app.cells["au"]
let cityCell = app.cells["au-mel"]
@@ -68,13 +74,15 @@ class MullvadVPNScreenshots: XCTestCase {
snapshot("MainSecured")
- // Re-open Select location controller
- app.buttons["SelectLocationButton"].tap()
- cityCell.buttons["CollapseButton"].tap()
- snapshot("SelectLocation")
+ // Re-open Select location controller (iPhone only)
+ if case .phone = UIDevice.current.userInterfaceIdiom {
+ app.buttons["SelectLocationButton"].tap()
+ cityCell.buttons["CollapseButton"].tap()
+ snapshot("SelectLocation")
- // Tap the "Done" button to dismiss the "Select location" controller
- app.navigationBars.buttons.firstMatch.tap()
+ // Tap the "Done" button to dismiss the "Select location" controller
+ app.navigationBars.buttons.firstMatch.tap()
+ }
// Open Settings
app.buttons["SettingsButton"].tap()
diff --git a/ios/Snapfile b/ios/Snapfile
index d73fe87c62..d3382aafc5 100644
--- a/ios/Snapfile
+++ b/ios/Snapfile
@@ -4,7 +4,8 @@ devices([
"iPhone 8 Plus",
"iPhone 11",
"iPhone 11 Pro",
- "iPhone 11 Pro Max"
+ "iPhone 11 Pro Max",
+ "iPad Pro (12.9-inch) (5th generation)"
])
languages([