-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'PE-6873-setup-integration-tests-flutter' of github.com:…
…ardriveapp/ardrive-web into PE-6873-setup-integration-tests-flutter
- Loading branch information
Showing
5 changed files
with
113 additions
and
22 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
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
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,30 @@ | ||
// ignore_for_file: non_constant_identifier_names | ||
|
||
import 'package:ardrive/utils/widget_keys.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:integration_test/integration_test.dart'; | ||
|
||
import 'app_test.dart'; | ||
import 'dsl/dsl.dart'; | ||
import 'utils.dart'; | ||
import 'login_tests.dart'; | ||
|
||
void main() { | ||
final binding = IntegrationTestWidgetsFlutterBinding.ensureInitialized(); | ||
binding.framePolicy = LiveTestWidgetsFlutterBindingFramePolicy.fullyLive; | ||
|
||
group('Logout Tests', () { | ||
testWidgets('User can log out successfully', (WidgetTester tester) async { | ||
await runPreConditionUserLoggedIn(tester); | ||
await testLogoutSuccess(tester); | ||
}); | ||
}); | ||
} | ||
|
||
Future<void> testLogoutSuccess(WidgetTester tester) async { | ||
I.see.page(driveDetailPageKey).wait(10000); | ||
await I.see.profileCard().tap().wait(5000).go(tester); | ||
await I.wait(1000); | ||
await I.see.button('Log out').tap().wait(1000).go(tester); | ||
I.see.button('Log In'); | ||
} |
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:ardrive/utils/widget_keys.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
|
||
import 'dsl/dsl.dart'; | ||
import 'utils.dart'; | ||
|
||
|
||
|
||
void main() { | ||
group('Snapshot Tests', () { | ||
testWidgets('Create a snapshot of the drive detail page', (tester) async { | ||
await runPreConditionUserLoggedIn(tester); | ||
await testCreateSnapshot(tester); | ||
}); | ||
}); | ||
} | ||
|
||
Future<void> testCreateSnapshot(WidgetTester tester) async { | ||
await I.see.publicDriveButton('drive test snapshot').tap().wait(500).go(tester); | ||
await I.see.newButton().tap().wait(500).go(tester); | ||
await I.see.button('Advanced').tap().wait(100).go(tester); | ||
await I.see.button('New Snapshot').tap().wait(500).go(tester); | ||
await I.see.button('PROCEED').tap().wait(10000).go(tester); | ||
await I.see.button('UPLOAD').tap().wait(10000).go(tester); | ||
I.see.text('Success'); | ||
await I.see.button('OK').tap().wait(100).go(tester); | ||
} | ||
|
||
Future<void> testCreatePrivateSnapshot(WidgetTester tester) async { | ||
await I.see.privateDriveButton('drive test snapshot private').tap().wait(500).go(tester); | ||
await I.see.newButton().tap().wait(500).go(tester); | ||
await I.see.button('Advanced').tap().wait(100).go(tester); | ||
await I.see.button('New Snapshot').tap().wait(500).go(tester); | ||
await I.see.button('PROCEED').tap().wait(10000).go(tester); | ||
await I.see.button('UPLOAD').tap().wait(10000).go(tester); | ||
I.see.text('Success'); | ||
await I.see.button('OK').tap().wait(100).go(tester); | ||
} | ||
|
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