-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create macos_app_test for flutter interactions
- Loading branch information
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
packages/patrol/example/integration_test/macos_app_test.dart
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 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
import 'common.dart'; | ||
|
||
void main() { | ||
patrol('taps around', ($) async { | ||
await createApp($); | ||
await $.waitUntilVisible($(#counterText)); | ||
|
||
expect($(#counterText).text, '0'); | ||
|
||
await $(FloatingActionButton).tap(); | ||
|
||
expect($(#counterText).text, '1'); | ||
|
||
await $(#textField).enterText('Hello, Flutter!'); | ||
expect($('Hello, Flutter!'), findsOneWidget); | ||
|
||
await $('Open scrolling screen').scrollTo().tap(); | ||
await $.waitUntilVisible($(#topText)); | ||
|
||
await $.scrollUntilVisible(finder: $(#bottomText)); | ||
|
||
await $.tap($(#backButton)); | ||
await $.scrollUntilVisible( | ||
finder: $(#counterText), | ||
scrollDirection: AxisDirection.up, | ||
); | ||
}); | ||
} |
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