-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
Description
Currently with the option --phantomCSS we split the webpage screenshot into blocks of arbitrary size and perform a visual regression test against those, however this is not robust. See https://github.com/Huddle/PhantomCSS#best-practices.
https://github.com/Huddle/PhantomCSS#full-page-screenshots-are-a-bad-idea
Ideally we want to compare small sections of a page. Logically it makes sense to select these sections, or 'slices' by CSS selector.
Proposed approach:
- Compile a list of the CSS selectors for major page elements, eg: header, footer.
- Obtain the absolute position, height, width of each element
- Obtain baseline full-page screenshots from Browserstack
- Slice the screenshots according to the positional data
- Test: Repeat steps 3-4 and perform PhantomCSS visual regression test
Questions to address:
- can browserstack screenshots API support what we want to do?
- Each browser renders the page slightly differently, does this matter when we have absolute x,y coords?
- Is it trivial to automatically identify all major page elements rather than doing this process manually?