Screenshots: Add more screenshots

* Add another note and then take a screenshot of the list view
* Take a screenshot of the Git Host Setup
This commit is contained in:
Vishesh Handa
2019-02-16 00:54:58 +01:00
parent e97300b7b1
commit 2c6e5b2e9c
2 changed files with 33 additions and 19 deletions

View File

@ -53,6 +53,7 @@ class NoteEditorState extends State<NoteEditor> {
appBar: AppBar(
title: Text(title),
leading: IconButton(
key: ValueKey("NewEntry"),
icon: Icon(Icons.check),
onPressed: () {
final stateContainer = StateContainer.of(context);

View File

@ -35,25 +35,6 @@ void main() {
await driver.waitFor(loadedFinder, timeout: Duration(seconds: 5));
await _takeScreenshot();
// Open the Drawer
final drawerButtonFinder = find.byValueKey("DrawerButton");
await driver.tap(drawerButtonFinder);
await Future.delayed(Duration(milliseconds: 500));
await _takeScreenshot();
// The Git Host setup screen
/*
await driver.tap(find.text("Setup Git Host"));
await driver.waitFor(find.text("GitHub"), timeout: Duration(seconds: 2));
await _takeScreenshot();
// FIXME: This doesn't seem to work!
await driver.tap(find.pageBack());
*/
// Close the drawer
var app = find.byValueKey("App");
await driver.scroll(app, -300.0, 0.0, const Duration(milliseconds: 300));
// Create a new note
var fab = find.byValueKey("FAB");
await driver.waitFor(fab, timeout: Duration(seconds: 2));
@ -65,6 +46,38 @@ void main() {
await driver.enterText(
"Your notes will be saved in Markdown with a YAML header for the metadata.\n\nThe writing experience is clean and distraction free");
await _takeScreenshot();
await driver.tap(find.byValueKey("NewEntry"));
// Create another note
await driver.waitFor(fab, timeout: Duration(seconds: 2));
await driver.tap(fab);
await driver.waitFor(find.text('Write here'),
timeout: Duration(seconds: 2));
await driver.enterText(
"Journaling is a great way to clear your mind and get all your throughts down into paper. Well, not literal paper, as this is an app, but I think you get the point.");
await _takeScreenshot();
await driver.tap(find.byValueKey("NewEntry"));
await Future.delayed(Duration(milliseconds: 500));
await _takeScreenshot();
// Open the Drawer
final drawerButtonFinder = find.byValueKey("DrawerButton");
await driver.tap(drawerButtonFinder);
await Future.delayed(Duration(milliseconds: 500));
await _takeScreenshot();
// The Git Host setup screen
await driver.tap(find.text("Setup Git Host"));
await driver.waitFor(find.text("GitHub"), timeout: Duration(seconds: 2));
await _takeScreenshot();
// FIXME: This doesn't seem to work!
// await driver.tap(find.pageBack());
// Close the drawer
// var app = find.byValueKey("App");
// await driver.scroll(app, -300.0, 0.0, const Duration(milliseconds: 300));
});
});
}