Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate Screenshots Automation #95

Merged
merged 13 commits into from Oct 31, 2022
Merged

Generate Screenshots Automation #95

merged 13 commits into from Oct 31, 2022

Conversation

TomerPacific
Copy link
Contributor

@TomerPacific TomerPacific commented Oct 29, 2022

Fixes #80

Following the requested changes in the issue, there were a things that needed to happen in order for the feature to work:

  • A new folder called integration_test was created in the main project hierarchy
  • The integration_test dependency was added under dev_dependencies
  • The older screenshots_test.dart has been deleted
  • Integration tests use a WidgetTester, so the older logic had to be refactored
  • Since the older test relied on a timer with an id of 42, which does not exist, the logic has changed to rely on the current default timers which are running.
  • This means that the test selects the first running timer (UI Layout), stops it and then clicks on it to go to the editing screen

The test has been run on an emulated device several times and appears to be working.

A video of the test running:

giphy

@12people
Copy link
Collaborator

@TomerPacific There's one more thing you didn't address — see my latest comment in issue #80 .

I think there's a driver file missing, as described in step 1 at https://dev.to/mjablecnik/take-screenshot-during-flutter-integration-tests-435k . Without it, I don't know where to find the generated screenshots. But it's possible I wasn't looking in the right places.

@TomerPacific
Copy link
Contributor Author

@12people - You're probably right. Let me check things and get back to you.

@12people
Copy link
Collaborator

Looks good to me!

I would probably print the error once it's caught in the driver, but that's a simple line that I can add later. :)

Thanks a lot for contributing this, hope it was a good experience for you. :)

@12people 12people merged commit b5ce02f into hamaluik:master Oct 31, 2022
@TomerPacific
Copy link
Contributor Author

@12people - I didn't know if you would prefer to have the error or not so that is why I omitted it.
Thanks for your patience and assistance 🙏

@TomerPacific TomerPacific deleted the feature/generate-screenshots-automation branch November 1, 2022 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate screenshots using automated integration tests
2 participants