feat(mobile): Add integration tests (#1359)

This commit is contained in:
Matthias Rupp
2023-01-22 04:43:28 +01:00
committed by GitHub
parent e5d798581c
commit f4c90426a5
10 changed files with 246 additions and 15 deletions

View File

@@ -0,0 +1,36 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter_test/flutter_test.dart';
import '../test_utils/general_helper.dart';
import '../test_utils/login_helper.dart';
void main() async {
await ImmichTestHelper.initialize();
group("Login input validation test", () {
immichWidgetTest("Test http warning message", (tester) async {
await ImmichTestLoginHelper.waitForLoginScreen(tester);
await ImmichTestLoginHelper.acknowledgeNewServerVersion(tester);
// Test https URL
await ImmichTestLoginHelper.enterLoginCredentials(
tester,
server: "https://demo.immich.app/api",
);
await tester.pump(const Duration(milliseconds: 300));
expect(find.text("login_form_err_http_insecure".tr()), findsNothing);
// Test http URL
await ImmichTestLoginHelper.enterLoginCredentials(
tester,
server: "http://demo.immich.app/api",
);
await tester.pump(const Duration(milliseconds: 300));
expect(find.text("login_form_err_http_insecure".tr()), findsOneWidget);
});
});
}