Skip to content

Commit

Permalink
Add auth flow integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
bizz84 committed Nov 6, 2024
1 parent 31d8a84 commit 8027028
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions ecommerce_app/integration_test/auth_flow_test.dart
Original file line number Diff line number Diff line change
@@ -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();
});
}

0 comments on commit 8027028

Please sign in to comment.