polis icon indicating copy to clipboard operation
polis copied to clipboard

Implement Percy for visual review/testing of participation client

Open patcon opened this issue 5 years ago • 4 comments

Re-ticketed from Gitter chat: https://gitter.im/pol-is/polisDeployment?at=5febe53e2084ee4b787de56a

https://percy.io/

patcon avatar Dec 30 '20 18:12 patcon

Hey Pat; Can you please comment further on how this relates to our Cypress setup? I thought Cypress was already doing visual integration testing? Am I misunderstanding or does this do something different/more specific? Thanks.

metasoarous avatar Dec 02 '21 20:12 metasoarous

Good call. Cypress is e2e testing, which tests functionality based on dom selectors, telling something about whether features broke.

Visual testing is to catch when CSS changes and layouts move around.

Different use-cases, and both healthy practices, though e2e testing is def more important.

So it's feature testing vs layout testing :)

EDIT: A tool like cypress (or puppeteer or webdriver etc) is used to navigate the app and take screenshots, which are used by something like percy for visual diffing. There's a cypress plugin: https://docs.percy.io/docs/cypress

patcon avatar Dec 02 '21 21:12 patcon

I see; Thanks for the clarification. That makes sense.

I think this makes sense for the participation interface, but is probably overkill for admin & report.

metasoarous avatar Dec 02 '21 21:12 metasoarous

Agreed, no prob

Related to visual testing of client-participation viz: In the kitchensink e2e test, we fake enough votes to render the viz. I recall that sometimes the hulls are drawn differently, even though the votes registered should * always be the same. If the test waits for math component to catch up on processing, should the the hulls be drawn consistently from one test conversation to the next? Or might there be slight variations?

* It's possible that with the speed of the test, that not all POST requests are registered as votes somehow, which could also explain the variation in hull appearance

patcon avatar Dec 02 '21 23:12 patcon