notwaldorf / ama

:raising_hand: Ask @notwaldorf anything!
94 stars 13 forks source link

Visual Diffing - How to handle data showing on screen when not in UX comps? #118

Closed dman777 closed 4 years ago

dman777 commented 4 years ago

I really enjoyed and got a lot out of your article Automatic visual diffing with Puppeteer. Question, please.... when using this in a application at work.... if the screen being diffed is like a account page and shows user: John and the comps UX gave are just user:, can that being handled in the test somehow? Otherwise I believe it will fail because the app screenshot will have user: John and the UX comp will have just user:.

notwaldorf commented 4 years ago

Ah, that's a good question. I think I would always run these kinds of tests with mock data, or with no data at all (so either both the golden screenshots and the tests have user:, or you always populate the tests with fake data). I generate my golden screenshots from the actual tests being run, so they should always match.