chore(mobile): add login integration tests and reorganize CI definitions (#1417)

* Add integration tests for the login process

* Reorganize tests

* Test wrong instance URL

* Run mobile unit tests in CI

* Fix CI

* Pin Flutter Version to 3.3.10

* Push something stupid to re-trigger CI
This commit is contained in:
Matthias Rupp
2023-01-25 17:10:04 +01:00
committed by GitHub
parent d1db47ee34
commit f64db3a2f9
8 changed files with 212 additions and 76 deletions

View File

@@ -8,12 +8,11 @@ void main() async {
await ImmichTestHelper.initialize();
group("Login input validation test", () {
immichWidgetTest("Test leading/trailing whitespace", (tester) async {
await ImmichTestLoginHelper.waitForLoginScreen(tester);
await ImmichTestLoginHelper.acknowledgeNewServerVersion(tester);
immichWidgetTest("Test leading/trailing whitespace", (tester, helper) async {
await helper.loginHelper.waitForLoginScreen();
await helper.loginHelper.acknowledgeNewServerVersion();
await ImmichTestLoginHelper.enterLoginCredentials(
tester,
await helper.loginHelper.enterCredentials(
email: " demo@immich.app"
);
@@ -21,8 +20,7 @@ void main() async {
expect(find.text("login_form_err_leading_whitespace".tr()), findsOneWidget);
await ImmichTestLoginHelper.enterLoginCredentials(
tester,
await helper.loginHelper.enterCredentials(
email: "demo@immich.app "
);
@@ -31,12 +29,11 @@ void main() async {
expect(find.text("login_form_err_trailing_whitespace".tr()), findsOneWidget);
});
immichWidgetTest("Test invalid email", (tester) async {
await ImmichTestLoginHelper.waitForLoginScreen(tester);
await ImmichTestLoginHelper.acknowledgeNewServerVersion(tester);
immichWidgetTest("Test invalid email", (tester, helper) async {
await helper.loginHelper.waitForLoginScreen();
await helper.loginHelper.acknowledgeNewServerVersion();
await ImmichTestLoginHelper.enterLoginCredentials(
tester,
await helper.loginHelper.enterCredentials(
email: "demo.immich.app"
);