-
Notifications
You must be signed in to change notification settings - Fork 37
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
Visual regression testing #31
Comments
I've just bumped into this article https://css-tricks.com/automating-css-regression-testing/ What bugs me is that we would need to store the screenshots in the repo, which will add couple of Megs. But then again, it's not that much of an overhead, isn't it? |
I'm all in for this. 👍 Also, does the Chisel store page index in json as of 0.2.2? I proposed this specifically for such features, which need to iterate over all/some views (pages). |
Looks cool, nice to see it's an active project and the progress they've made. What if screenshots are git ignored and created on previewized too (like |
@danekszy you mean pages list? yes, it is stored in .yo-rc.json. Probably we could extend that list to allow marking certain pages as done or in progress. |
@danekszy I thought on having this on @luboskmetko I think it works this way: get a screenshot => store it => get another screenshot in another commit => compare. |
@luboskmetko Great to hear that. Does out project index (twig as I discovered) use that json? Can we expand it into page object with many properties, or does Yo enforce it to be an array of strings? @thymikee These are the use cases that I considered as well. But like I mentioned, I'd like to be able to manually trigger this before commiting in order to see if I introduced any unwanted changes. This would require us to decouple it from any commit/build-task related logic. |
This would be just another gulp task, so it's not a problem to run it 19 wrz 2016 16:06 "Daniel Szymanek" notifications@github.com napisał(a):
|
That's what I figured. What I meant by decoupling is logical separation - so for example not naming snapshots/screenshots after commit hash etc. |
@danekszy project index is generated with page generator https://github.com/xfiveco/generator-chisel/blob/master/generators/page/index.js and uses index/project-index.html as a template. I think each page can be extended with more properties but we would also have to regenerate the project index then. |
Unfortunately most solutions are based on PhantomJS which is not up to date on newest Webkit features. On the other hand Google is actively working on headless Chromium. It looks like the best option today to wait and see where Chromium work is going. |
Closing for now. Let's reopen this when headless chrome gets stable |
I wouldn't throw away this just yet... Later we could just switch to Chrome (which probably won't be perfect either, bc it takes up a lot of RAM)... |
@danekszy It's flexbox mostly. |
Damn it, that looks like a deal breaker here... |
Note for the future: there is also Wraith made and used by BBC: https://github.com/BBC-News/wraith |
What about looking into Phantom.js v2? |
When I tested BackstopJS I had problems with flexbox and I think it used newest Phantom (2.1), but I'll check it one more time tomorrow. |
Here is simple page with flexbox, and how it looks on PhantomJS 2.1.1: |
Just FYI... We might need to take another look at this feature, if we're done with more important stuff... |
Another update: There's PhantomJS 2.5 going to be released soon and its based on QtWebkit. |
PhantomJS maintainer is stepping down expecting Headless Chrome to take over: https://groups.google.com/d/msg/phantomjs/9aI5d-LDuNE/5Z3SMZrqAQAJ |
Here's a recipe for taking screenshots with Headless Chrome: |
Yeah, I've already used it in one project for testing. It's also worth noting that integration(?) between PhantomJS and Headless Chome is in the talks: ariya/phantomjs#14954. |
Awesome, looks good. 😄 Any observations so far? Is it stable? Any differences in render? |
It worked great, one problem was (that I also noticed when using Chrome dev tools normally) that switching between desktop and mobile mode not always rerenders the page. As situation develops question remains whether we should use Chrome Headless directly or wait for some phantom-like integration/support. |
xfiveco/generator-xh#122
The text was updated successfully, but these errors were encountered: