-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0d55914
commit df76b77
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:frontegg_flutter_example/main.dart'; | ||
import 'package:patrol/patrol.dart'; | ||
|
||
import '../fixtures/const.dart'; | ||
|
||
void main() { | ||
patrolTest( | ||
'Success Logout', | ||
($) async { | ||
await $.pumpWidget(const MyApp()); | ||
await $.pumpAndSettle(); | ||
|
||
await $.tap(find.byKey(const ValueKey("LoginButton"))); | ||
await Future.delayed(const Duration(seconds: 5)); | ||
|
||
await $.native.enterTextByIndex( | ||
loginEmail, | ||
index: 0, | ||
keyboardBehavior: KeyboardBehavior.alternative, | ||
); | ||
|
||
await $.native.enterTextByIndex( | ||
loginPassword, | ||
index: 1, | ||
keyboardBehavior: KeyboardBehavior.alternative, | ||
); | ||
|
||
await $.native.tap(Selector(text: "Sign in")); | ||
|
||
await $.waitUntilVisible(find.text("Logout")); | ||
|
||
await $.tap(find.byKey(const ValueKey("LogoutButton"))); | ||
await $.pumpAndSettle(); | ||
await $.waitUntilVisible(find.text("Not Authenticated")); | ||
}, | ||
); | ||
} |