Skip to content

Commit

Permalink
Merge PR #1685
Browse files Browse the repository at this point in the history
  • Loading branch information
dainnilsson committed Sep 10, 2024
2 parents 3dee5fd + 43ea6d3 commit 76f60a9
Show file tree
Hide file tree
Showing 12 changed files with 863 additions and 574 deletions.
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

0 comments on commit 76f60a9

Please sign in to comment.