diff --git a/catalyst_voices/apps/voices/integration_test/main.dart b/catalyst_voices/apps/voices/integration_test/main.dart deleted file mode 100644 index 680a863c6a..0000000000 --- a/catalyst_voices/apps/voices/integration_test/main.dart +++ /dev/null @@ -1,5 +0,0 @@ -import './scenarios/login_scenario.dart' as login_scenario; - -void main() { - login_scenario.main(); -} diff --git a/catalyst_voices/apps/voices/integration_test/scenarios/login_scenario.dart b/catalyst_voices/apps/voices/integration_test/scenarios/login_scenario.dart deleted file mode 100644 index 12c88e0dd4..0000000000 --- a/catalyst_voices/apps/voices/integration_test/scenarios/login_scenario.dart +++ /dev/null @@ -1,36 +0,0 @@ -import 'package:catalyst_voices/configs/main_dev.dart' as app; -import 'package:flutter_test/flutter_test.dart'; -import 'package:integration_test/integration_test.dart'; - -import 'robots/login_robot.dart'; - -void main() { - IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - LoginRobot loginRobot; - - group('Login', () { - testWidgets('shows error message when login information is missing', - (tester) async { - loginRobot = await _configure(tester); - - await loginRobot.enterEmail('Not Valid'); - await loginRobot.tapLoginButton(); - await loginRobot.checkInvalidCredentialsMessageIsShown(); - }); - - testWidgets('authenticates a user with an email and password', - (tester) async { - loginRobot = await _configure(tester); - - await loginRobot.enterEmail('mail@example.com'); - await loginRobot.enterPassword('MyPass123'); - await loginRobot.tapLoginButton(); - }); - }); -} - -Future _configure(WidgetTester tester) async { - app.main(); - await tester.pumpAndSettle(); - return LoginRobot(widgetTester: tester); -} diff --git a/catalyst_voices/apps/voices/integration_test/scenarios/robots/login_robot.dart b/catalyst_voices/apps/voices/integration_test/scenarios/robots/login_robot.dart deleted file mode 100644 index 4adc148806..0000000000 --- a/catalyst_voices/apps/voices/integration_test/scenarios/robots/login_robot.dart +++ /dev/null @@ -1,46 +0,0 @@ -import 'package:catalyst_voices/pages/login/login.dart'; -import 'package:catalyst_voices/pages/login/login_email_text_filed.dart'; -import 'package:catalyst_voices/pages/login/login_password_text_field.dart'; -import 'package:flutter_test/flutter_test.dart'; - -final class LoginRobot { - final WidgetTester widgetTester; - - const LoginRobot({ - required this.widgetTester, - }); - - Future checkInvalidCredentialsMessageIsShown() async { - final loginErrorSnackbar = find.byKey(LoginForm.loginErrorSnackbarKey); - expect(loginErrorSnackbar, findsOneWidget); - await widgetTester.pump(); - } - - Future enterEmail(String email) async { - final emailTextField = find.byKey(LoginEmailTextFiled.emailInputKey); - expect(emailTextField, findsOneWidget); - await widgetTester.enterText(emailTextField, email); - await widgetTester.pump(); - } - - Future enterPassword(String password) async { - final passwordTextField = find.byKey( - LoginPasswordTextField.passwordInputKey, - ); - expect(passwordTextField, findsOneWidget); - await widgetTester.enterText(passwordTextField, password); - await widgetTester.pump(); - } - - Future tapLoginButton() async { - final loginButton = find.byKey(LoginInButton.loginButtonKey); - expect(loginButton, findsOneWidget); - await widgetTester.tap(loginButton); - await widgetTester.pump(); - } - - void verifyLoginScreenIsShown() { - final loginScreen = find.byKey(LoginForm.loginFormKey); - expect(loginScreen, findsOneWidget); - } -} diff --git a/catalyst_voices/apps/voices/test_driver/Earthfile b/catalyst_voices/apps/voices/test_driver/Earthfile deleted file mode 100644 index 092d407d31..0000000000 --- a/catalyst_voices/apps/voices/test_driver/Earthfile +++ /dev/null @@ -1,43 +0,0 @@ -# TODO(minikin): Temporary disabled until we have useful integration tests. - -# IMPORT ../ AS catalyst-voices - -# integration-test-web: -# FROM catalyst-voices+build-web -# ARG TARGETARCH -# ARG browser -# LET driver_port = 4444 - -# IF [ $browser = "chrome" ] -# LET driver = "chromedriver" -# END - -# IF [ $browser = "firefox" ] -# LET driver = "geckodriver" -# END -# # Commenting out Edge tests as they are failing due to: -# # https://github.com/flutter/flutter/issues/76213 -# # https://github.com/flutter/flutter/issues/142021 -# #IF [ $browser = "edge" && $TARGETARCH = "amd64" ]] -# # LET driver = "msedgedriver" -# #END -# RUN ($driver --port=$driver_port > $driver.log &) && \ -# flutter drive --driver=test_driver/integration_tests.dart \ -# --target=integration_test/main.dart \ -# --flavor development -d web-server --profile \ -# --browser-name=$browser --driver-port=$driver_port || echo fail > fail -# # Using WAIT instead of TRY because TRY/CATCH/FINALLY does not (currently) support expanding args for SAVE ARTIFACT paths -# WAIT -# SAVE ARTIFACT $driver.log AS LOCAL $driver.log -# END -# IF [ -f fail ] -# RUN echo ""$browser" integration test failed" && \ -# echo "Printing "$driver" logs..." && \ -# cat $driver.log && \ -# exit 1 -# END - -# test-web-all: -# BUILD +integration-test-web \ -# --browser=chrome \ -# --browser=firefox