Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing keyless tests #1515

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 26 additions & 11 deletions integration_test/keyless_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,22 @@ void main() {
});
group('Settings', () {
appTestKeyless('Click through all Themes', (WidgetTester tester) async {
var settingDrawerButton = find.byKey(settingDrawerIcon).hitTestable();
await tester.tap(settingDrawerButton);
await tester.longWait();
await tester.tap(find.byKey(actionsIconButtonKey).hitTestable());
await tester.shortWait();
await tester.tap(find.byKey(settingDrawerIcon).hitTestable());
await tester.shortWait();
await tester.tap(find.byKey(themeModeSetting));
await tester.longWait();
await tester.shortWait();
await tester
.tap(find.byKey(themeModeOption(ThemeMode.light)).hitTestable());
await tester.longWait();
await tester.tap(find.byKey(themeModeSetting));
await tester.longWait();
await tester.shortWait();
await tester
.tap(find.byKey(themeModeOption(ThemeMode.dark)).hitTestable());
await tester.longWait();
await tester.tap(find.byKey(themeModeSetting));
await tester.longWait();
await tester.shortWait();
await tester
.tap(find.byKey(themeModeOption(ThemeMode.system)).hitTestable());
await tester.longWait();
Expand All @@ -60,6 +61,8 @@ void main() {
var helpDrawerButton = find.byKey(helpDrawerIcon).hitTestable();

appTestKeyless('Check Licenses view', (WidgetTester tester) async {
await tester.tap(find.byKey(actionsIconButtonKey).hitTestable());
await tester.shortWait();
await tester.tap(helpDrawerButton);
await tester.shortWait();
var licensesButtonText = find.byKey(licensesButton).hitTestable();
Expand All @@ -70,8 +73,10 @@ void main() {
});
group('Opening of URLs', () {
appTestKeyless('TOS link', (WidgetTester tester) async {
await tester.tap(find.byKey(actionsIconButtonKey).hitTestable());
await tester.shortWait();
await tester.tap(helpDrawerButton);
await tester.longWait();
await tester.shortWait();
if (isAndroid) {
expect(find.byKey(tosButton).hitTestable(), findsOneWidget);
} else {
Expand All @@ -80,8 +85,10 @@ void main() {
}
});
appTestKeyless('Privacy link', (WidgetTester tester) async {
await tester.tap(find.byKey(actionsIconButtonKey).hitTestable());
await tester.shortWait();
await tester.tap(helpDrawerButton);
await tester.longWait();
await tester.shortWait();
if (isAndroid) {
expect(find.byKey(privacyButton).hitTestable(), findsOneWidget);
} else {
Expand All @@ -90,8 +97,10 @@ void main() {
}
});
appTestKeyless('Feedback link', (WidgetTester tester) async {
await tester.tap(find.byKey(actionsIconButtonKey).hitTestable());
await tester.shortWait();
await tester.tap(helpDrawerButton);
await tester.longWait();
await tester.shortWait();
if (isAndroid) {
expect(find.byKey(userGuideButton).hitTestable(), findsOneWidget);
} else {
Expand All @@ -100,6 +109,8 @@ void main() {
}
});
appTestKeyless('Help link', (WidgetTester tester) async {
await tester.tap(find.byKey(actionsIconButtonKey).hitTestable());
await tester.shortWait();
await tester.tap(helpDrawerButton);
await tester.longWait();
if (isAndroid) {
Expand All @@ -113,14 +124,18 @@ void main() {
group('Troubleshooting', () {
appTestKeyless('Diagnostics Button', skip: isAndroid,
(WidgetTester tester) async {
await tester.tap(find.byKey(actionsIconButtonKey).hitTestable());
await tester.shortWait();
await tester.tap(helpDrawerButton);
await tester.longWait();
await tester.shortWait();
await tester.tap(find.byKey(diagnosticsChip).hitTestable());
await tester.longWait();
});
appTestKeyless('Log button', (WidgetTester tester) async {
await tester.tap(find.byKey(actionsIconButtonKey).hitTestable());
await tester.shortWait();
await tester.tap(helpDrawerButton);
await tester.longWait();
await tester.shortWait();
await tester.tap(find.byKey(logChip).hitTestable());
await tester.longWait();
});
Expand Down
Loading
Loading