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

Handling failed snapshot comparisons and missing event targets #17

Open
vialoh opened this issue Jan 20, 2020 · 0 comments
Open

Handling failed snapshot comparisons and missing event targets #17

vialoh opened this issue Jan 20, 2020 · 0 comments
Labels
enhancement New feature or request feedback needed Need feedback to know what to do high priority

Comments

@vialoh
Copy link
Contributor

vialoh commented Jan 20, 2020

If you run tests after changing some element structure which has been snapshotted, all of the snapshot comparisons will fail and/or event targets might not be found, and you'll have to rerecord the entire test sequence to update the snapshots and target selectors.

There are a few solutions I can think of to handle this elegantly/painlessly:

  • Apply diff patches to all remaining snapshots - i.e., when you run into the first diff, there could be an "Apply Patch to All" button which if clicked would resume testing and automatically apply the diff patch to any subsequent diffs that seem to match. Maybe also offer the option to apply one at a time?
  • Replace all matching event target selectors - i.e., if you know how a target selector has changed, it would be nice to be able to immediately update all matching event target selectors.
  • It may also be possible to automatically update event target selectors based on applied diff patches?
  • We could also offer the option to automatically rerecord everything by replaying every action and trusting all the new snapshots. Each action would need updated target selectors as necessary though.
  • We could also offer the option to allow (ignore) particular diffs without actually applying them.
@vialoh vialoh added enhancement New feature or request feedback needed Need feedback to know what to do high priority labels Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feedback needed Need feedback to know what to do high priority
Projects
None yet
Development

No branches or pull requests

1 participant