Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
54194a90
Commit
54194a90
authored
Feb 24, 2016
by
yjbanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wait for text to change in the sample driver test
parent
ccc9a25a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
e2e_test.dart.tmpl
packages/flutter_tools/templates/driver/e2e_test.dart.tmpl
+9
-4
No files found.
packages/flutter_tools/templates/driver/e2e_test.dart.tmpl
View file @
54194a90
...
@@ -32,13 +32,18 @@ main() {
...
@@ -32,13 +32,18 @@ main() {
});
});
test('tap on the floating action button; verify counter', () async {
test('tap on the floating action button; verify counter', () async {
// Find floating action button (fab) to tap on
ObjectRef fab = await driver.findByValueKey('fab');
ObjectRef fab = await driver.findByValueKey('fab');
expect(fab, isNotNull);
expect(fab, isNotNull);
// Tap on the fab
await driver.tap(fab);
await driver.tap(fab);
// Wait for text to change to the desired value
await driver.waitFor(() async {
ObjectRef counter = await driver.findByValueKey('counter');
ObjectRef counter = await driver.findByValueKey('counter');
expect(counter, isNotNull);
return await driver.getText(counter);
String text = await driver.getText(counter);
}, contains("Button tapped 1 times."));
expect(text, contains("Button tapped 1 times."));
});
});
});
});
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment