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

Consider creating a more robust comparison system for tests #13

Open
ssnepenthe opened this issue Aug 2, 2017 · 1 comment
Open

Consider creating a more robust comparison system for tests #13

ssnepenthe opened this issue Aug 2, 2017 · 1 comment

Comments

@ssnepenthe
Copy link
Owner

ssnepenthe commented Aug 2, 2017

The ultimate goal would be that tests can still pass even with minor/irrelevant changes to the page.

This is mostly looking at images - I have observed at least the following:

  • Cache buster as part of the path (scripss networks) or query string
  • Switching from http to https or from either to protocol-relative URLs (epicurious)
  • Host changes completely from sharding across multiple domains (general mills)
@ssnepenthe ssnepenthe changed the title Scripps Networks: timestamp as cachebuster Revisit how recipes are compared in tests Aug 4, 2017
ssnepenthe added a commit that referenced this issue Mar 28, 2018
This is a small step toward a (hopefully) more robust comparison system such as mentioned in #13.
@ssnepenthe ssnepenthe changed the title Revisit how recipes are compared in tests Revisit create a more robust comparison system for tests Mar 28, 2018
@ssnepenthe ssnepenthe changed the title Revisit create a more robust comparison system for tests Consider creating a more robust comparison system for tests Mar 28, 2018
@ssnepenthe
Copy link
Owner Author

Quick checklist of the minimum I would like to handle:

  • Similar string comparison
    • "2 sprigs of fresh sage leaves" should match "2 sprigs of sage leaves"
    • Needs to work for arrays of strings as well
  • Similar image comparison
    • Should allow for scheme changes (http => https)
    • Should allow for domain changes (cdn1.example.com => cdn2.example.com)
    • Should handle cache busters in query string (example.com/image.jpg?ac5fd3e)
    • Probably a little more difficult, but would be nice to be able to handle cache buster in the filename (example.com/image.ac5fd3e.jpg)

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

No branches or pull requests

1 participant