diff --git a/ecommerce_app/integration_test/auth_flow_test.dart b/ecommerce_app/integration_test/auth_flow_test.dart new file mode 100644 index 00000000..29e7eb7b --- /dev/null +++ b/ecommerce_app/integration_test/auth_flow_test.dart @@ -0,0 +1,22 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:integration_test/integration_test.dart'; + +import '../test/src/robot.dart'; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + testWidgets('Sign in and sign out flow', (tester) async { + final r = Robot(tester); + await r.pumpMyApp(); + r.expectFindAllProductCards(); + await r.openPopupMenu(); + await r.auth.openEmailPasswordSignInScreen(); + await r.auth.signInWithEmailAndPassword(); + r.expectFindAllProductCards(); + await r.openPopupMenu(); + await r.auth.openAccountScreen(); + await r.auth.tapLogoutButton(); + await r.auth.tapDialogLogoutButton(); + r.expectFindAllProductCards(); + }); +}