mirror of
https://github.com/immich-app/immich.git
synced 2024-12-29 15:11:58 +00:00
Fix mobile integration tests again (#1384)
This commit is contained in:
parent
a65fea4d64
commit
ffbc9a28ad
1 changed files with 21 additions and 8 deletions
|
@ -8,29 +8,42 @@ void main() async {
|
||||||
await ImmichTestHelper.initialize();
|
await ImmichTestHelper.initialize();
|
||||||
|
|
||||||
group("Login input validation test", () {
|
group("Login input validation test", () {
|
||||||
immichWidgetTest("Test http warning message", (tester) async {
|
immichWidgetTest("Test leading/trailing whitespace", (tester) async {
|
||||||
await ImmichTestLoginHelper.waitForLoginScreen(tester);
|
await ImmichTestLoginHelper.waitForLoginScreen(tester);
|
||||||
await ImmichTestLoginHelper.acknowledgeNewServerVersion(tester);
|
await ImmichTestLoginHelper.acknowledgeNewServerVersion(tester);
|
||||||
|
|
||||||
// Test https URL
|
|
||||||
await ImmichTestLoginHelper.enterLoginCredentials(
|
await ImmichTestLoginHelper.enterLoginCredentials(
|
||||||
tester,
|
tester,
|
||||||
server: "https://demo.immich.app/api",
|
email: " demo@immich.app"
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.pump(const Duration(milliseconds: 300));
|
await tester.pump(const Duration(milliseconds: 300));
|
||||||
|
|
||||||
expect(find.text("login_form_err_http_insecure".tr()), findsNothing);
|
expect(find.text("login_form_err_leading_whitespace".tr()), findsOneWidget);
|
||||||
|
|
||||||
// Test http URL
|
|
||||||
await ImmichTestLoginHelper.enterLoginCredentials(
|
await ImmichTestLoginHelper.enterLoginCredentials(
|
||||||
tester,
|
tester,
|
||||||
server: "http://demo.immich.app/api",
|
email: "demo@immich.app "
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.pump(const Duration(milliseconds: 300));
|
await tester.pump(const Duration(milliseconds: 300));
|
||||||
|
|
||||||
expect(find.text("login_form_err_http_insecure".tr()), findsOneWidget);
|
expect(find.text("login_form_err_trailing_whitespace".tr()), findsOneWidget);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
immichWidgetTest("Test invalid email", (tester) async {
|
||||||
|
await ImmichTestLoginHelper.waitForLoginScreen(tester);
|
||||||
|
await ImmichTestLoginHelper.acknowledgeNewServerVersion(tester);
|
||||||
|
|
||||||
|
await ImmichTestLoginHelper.enterLoginCredentials(
|
||||||
|
tester,
|
||||||
|
email: "demo.immich.app"
|
||||||
|
);
|
||||||
|
|
||||||
|
await tester.pump(const Duration(milliseconds: 300));
|
||||||
|
|
||||||
|
expect(find.text("login_form_err_invalid_email".tr()), findsOneWidget);
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue