diff options
| author | Niklas Berglund <niklas.berglund@gmail.com> | 2024-06-10 14:09:53 +0200 |
|---|---|---|
| committer | Bug Magnet <marco.nikic@mullvad.net> | 2024-06-19 13:10:26 +0200 |
| commit | 6d905da1b7610baf6a006dcd8ea998817a8fb0e4 (patch) | |
| tree | 9947ed2396152ab8b81210f7466ee65ceaf6df93 /ios | |
| parent | 121286df1096aa5981c5dbe57155b92a4cb05d8b (diff) | |
| download | mullvadvpn-6d905da1b7610baf6a006dcd8ea998817a8fb0e4.tar.xz mullvadvpn-6d905da1b7610baf6a006dcd8ea998817a8fb0e4.zip | |
Fix for failing iOS screenshot tests
Diffstat (limited to 'ios')
| -rw-r--r-- | ios/Configurations/Screenshots.xcconfig.template | 3 | ||||
| -rw-r--r-- | ios/Configurations/UITests.xcconfig.template | 2 | ||||
| -rw-r--r-- | ios/MullvadVPN/Supporting Files/Info.plist | 2 | ||||
| -rw-r--r-- | ios/MullvadVPNUITests/Networking/PartnerAPIClient.swift | 2 | ||||
| -rw-r--r-- | ios/MullvadVPNUITests/Pages/SelectLocationPage.swift | 3 | ||||
| -rw-r--r-- | ios/Snapfile | 12 |
6 files changed, 14 insertions, 10 deletions
diff --git a/ios/Configurations/Screenshots.xcconfig.template b/ios/Configurations/Screenshots.xcconfig.template index 025de82739..e885dd21d0 100644 --- a/ios/Configurations/Screenshots.xcconfig.template +++ b/ios/Configurations/Screenshots.xcconfig.template @@ -5,6 +5,3 @@ PROVISIONING_PROFILE_SPECIFIER[config=Debug][sdk=*][arch=*] = Screenshots Development PROVISIONING_PROFILE_SPECIFIER[config=Staging][sdk=*][arch=*] = Screenshots Development PROVISIONING_PROFILE_SPECIFIER[config=MockRelease][sdk=*][arch=*] = Screenshots Development - -// Mullvad account number used when taking screenshots -MULLVAD_ACCOUNT_TOKEN = diff --git a/ios/Configurations/UITests.xcconfig.template b/ios/Configurations/UITests.xcconfig.template index 030fe46d31..74fb0355ee 100644 --- a/ios/Configurations/UITests.xcconfig.template +++ b/ios/Configurations/UITests.xcconfig.template @@ -7,7 +7,7 @@ IOS_DEVICE_PIN_CODE = TEST_DEVICE_IDENTIFIER_UUID = // Base64 encoded token for the partner API. Will only be used if account numbers are not configured. -PARTNER_API_TOKEN = +// PARTNER_API_TOKEN = // Mullvad accounts used by UI tests HAS_TIME_ACCOUNT_NUMBER[config=Debug] = diff --git a/ios/MullvadVPN/Supporting Files/Info.plist b/ios/MullvadVPN/Supporting Files/Info.plist index c62f632af0..48854dc4c3 100644 --- a/ios/MullvadVPN/Supporting Files/Info.plist +++ b/ios/MullvadVPN/Supporting Files/Info.plist @@ -32,6 +32,8 @@ <string>$(MARKETING_VERSION)</string> <key>CFBundleVersion</key> <string>$(CURRENT_PROJECT_VERSION)</string> + <key>HasTimeAccountNumber</key> + <string>$(HAS_TIME_ACCOUNT_NUMBER)</string> <key>ITSAppUsesNonExemptEncryption</key> <false/> <key>LSRequiresIPhoneOS</key> diff --git a/ios/MullvadVPNUITests/Networking/PartnerAPIClient.swift b/ios/MullvadVPNUITests/Networking/PartnerAPIClient.swift index 67d1d7acdd..2a26d5bf99 100644 --- a/ios/MullvadVPNUITests/Networking/PartnerAPIClient.swift +++ b/ios/MullvadVPNUITests/Networking/PartnerAPIClient.swift @@ -107,7 +107,7 @@ class PartnerAPIClient { XCTFail("Failed to deserialize JSON response") } } else { - XCTFail("Request failed") + XCTFail("Request failed with status code \(response.statusCode)") } completionHandlerInvokedExpectation.fulfill() diff --git a/ios/MullvadVPNUITests/Pages/SelectLocationPage.swift b/ios/MullvadVPNUITests/Pages/SelectLocationPage.swift index 8c87309a04..95b9416c1c 100644 --- a/ios/MullvadVPNUITests/Pages/SelectLocationPage.swift +++ b/ios/MullvadVPNUITests/Pages/SelectLocationPage.swift @@ -68,6 +68,9 @@ class SelectLocationPage: Page { } @discardableResult func tapCustomListEllipsisButton() -> Self { + // This wait should not be needed, but is due to the issues we are having with the ellipsis button + _ = app.buttons[.openCustomListsMenuButton].waitForExistence(timeout: BaseUITestCase.shortTimeout) + let customListEllipsisButtons = app.buttons .matching(identifier: AccessibilityIdentifier.openCustomListsMenuButton.rawValue).allElementsBoundByIndex diff --git a/ios/Snapfile b/ios/Snapfile index 43c55ae82d..bed7cfd3f1 100644 --- a/ios/Snapfile +++ b/ios/Snapfile @@ -1,10 +1,12 @@ +ios_version '17.2' + # A list of devices you want to take the screenshots from devices([ "iPhone SE (3rd generation)", "iPhone 15 Pro", - "iPhone 15 Pro Max", - "iPad Pro (11-inch) (4th generation)", - "iPad Pro (12.9-inch) (6th generation)" + "iPhone 15 Pro Max" + #"iPad Pro (11-inch) (4th generation)", + #"iPad Pro (12.9-inch) (6th generation)" ]) languages([ @@ -14,8 +16,8 @@ languages([ # ["pt", "pt_BR"] # Portuguese with Brazilian locale ]) -# The name of the scheme which contains the UI Tests -scheme("MullvadVPNUITests") +# The name of the scheme which contains the screenshot UI Tests +scheme("MullvadVPN") # The name of the test plan which contains the UI Tests testplan("MullvadVPNScreenshots") |
