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

Allow play function to stop for screenshots #101

Merged
merged 1 commit into from
Nov 22, 2023
Merged

Allow play function to stop for screenshots #101

merged 1 commit into from
Nov 22, 2023

Conversation

trotzig
Copy link
Contributor

@trotzig trotzig commented Nov 21, 2023

By calling e.g. forceHappoScreenshot('empty') you can split up a component in multiple steps with screenshots happening in each step.

Implementation details:
An error is thrown when you call forceHappoScreenshot, only in a Happo environment. This will tell happo to take the screenshot. To get to the next step in the play function, we restart execution. This means that the play function gets invoked several times, halting at the "next" step each time.

By calling e.g. forceHappoScreenshot('empty') you can split up a
component in multiple steps with screenshots happening in each step.

Implementation details:
An error is thrown when you call forceHappoScreenshot, only in a Happo
environment. This will tell happo to take the screenshot. To get to the
next step in the play function, we restart execution. This means that
the play function gets invoked several times, halting at the "next" step
each time.
@trotzig trotzig merged commit d1afc1e into master Nov 22, 2023
@trotzig trotzig deleted the jest-expect branch November 22, 2023 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant