Use strings from Localazy (#718)

* Adopt strings from Localazy.

* Remove all old Android strings.

* Disable german snapshot tests for now.

* Rebase and add latest strings.
This commit is contained in:
Doug
2023-03-27 18:18:59 +01:00
committed by GitHub
parent 8daa23b27a
commit 2b753b1135
215 changed files with 1911 additions and 118672 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ class HomeScreenUITests: XCTestCase {
func testInitialStateComponents() {
let app = Application.launch(.home)
XCTAssert(app.navigationBars[ElementL10n.allChats].exists)
XCTAssert(app.navigationBars[L10n.screenRoomlistMainSpaceTitle].exists)
app.assertScreenshot(.home)
}
+2 -2
View File
@@ -28,8 +28,8 @@ class OnboardingUITests: XCTestCase {
let app = Application.launch(.onboarding)
// Given the splash screen in its initial state.
let page1TitleText = app.staticTexts[ElementL10n.ftueAuthCarouselSecureTitle]
let page2TitleText = app.staticTexts[ElementL10n.ftueAuthCarouselControlTitle]
let page1TitleText = app.staticTexts[L10n.screenOnboardingWelcomeTitle]
let page2TitleText = app.staticTexts[L10n.screenOnboardingWelcomeTitle] // There isn't a second string to match any more.
let hiddenPageTitleText = app.staticTexts[A11yIdentifiers.onboardingScreen.hidden].firstMatch
XCTAssertTrue(page1TitleText.isHittable, "The title from the first page of the carousel should be onscreen.")
+4 -4
View File
@@ -26,7 +26,7 @@ class ServerSelectionUITests: XCTestCase {
// Then it should be configured for matrix.org
app.assertScreenshot(.serverSelection, step: 0)
XCTAssertEqual(app.textFields[A11yIdentifiers.changeServerScreen.server].value as? String, "matrix.org", "The server shown should be matrix.org with the https scheme hidden.")
XCTAssertEqual(app.buttons[A11yIdentifiers.changeServerScreen.continue].label, ElementL10n.continue, "The confirm button should say Confirm when in modal presentation.")
XCTAssertEqual(app.buttons[A11yIdentifiers.changeServerScreen.continue].label, L10n.actionContinue, "The confirm button should say Confirm when in modal presentation.")
}
func testEmptyAddress() async {
@@ -39,7 +39,7 @@ class ServerSelectionUITests: XCTestCase {
// Then the screen should not allow the user to continue.
app.assertScreenshot(.serverSelection, step: 1)
XCTAssertEqual(app.textFields[A11yIdentifiers.changeServerScreen.server].value as? String, ElementL10n.ftueAuthChooseServerEntryHint, "The text field should show placeholder text in this state.")
XCTAssertEqual(app.textFields[A11yIdentifiers.changeServerScreen.server].value as? String, L10n.commonServerUrl, "The text field should show placeholder text in this state.")
XCTAssertFalse(app.buttons[A11yIdentifiers.changeServerScreen.continue].isEnabled, "The confirm button should be disabled when the address is empty.")
}
@@ -52,7 +52,7 @@ class ServerSelectionUITests: XCTestCase {
// Then an error should be shown and the confirmation button disabled.
app.assertScreenshot(.serverSelection, step: 2)
XCTAssertTrue(app.staticTexts[ElementL10n.loginErrorHomeserverNotFound].exists)
XCTAssertTrue(app.staticTexts[L10n.screenChangeServerErrorInvalidHomeserver].exists)
XCTAssertFalse(app.buttons[A11yIdentifiers.changeServerScreen.continue].isEnabled, "The confirm button should be disabled when there is an error.")
}
@@ -63,6 +63,6 @@ class ServerSelectionUITests: XCTestCase {
// Then the screen should be tweaked slightly to reflect the change of navigation.
app.assertScreenshot(.serverSelectionNonModal)
XCTAssertFalse(app.buttons[A11yIdentifiers.changeServerScreen.dismiss].exists, "The dismiss button should be hidden when not in modal presentation.")
XCTAssertEqual(app.buttons[A11yIdentifiers.changeServerScreen.continue].label, ElementL10n.actionNext, "The confirm button should say Next when not in modal presentation.")
XCTAssertEqual(app.buttons[A11yIdentifiers.changeServerScreen.continue].label, L10n.actionNext, "The confirm button should say Next when not in modal presentation.")
}
}
@@ -49,7 +49,7 @@ class SessionVerificationUITests: XCTestCase {
app.buttons[A11yIdentifiers.sessionVerificationScreen.acceptChallenge].tap()
app.assertScreenshot(.sessionVerification, step: Step.acceptingEmojis)
XCTAssert(app.staticTexts[ElementL10n.verificationConclusionOkSelfNoticeTitle].waitForExistence(timeout: 5.0))
XCTAssert(app.staticTexts[L10n.commonVerificationComplete].waitForExistence(timeout: 5.0))
app.assertScreenshot(.sessionVerification, step: Step.verificationComplete)
app.buttons[A11yIdentifiers.sessionVerificationScreen.close].tap()