mirror of
https://github.com/immich-app/immich.git
synced 2025-11-23 10:40:41 +09:00
feat(mobile): Add integration tests (#1359)
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user