dwp / design-system

One place for service teams to find and share the styles, components and patterns for designing DWP services.
MIT License
15 stars 3 forks source link

Feature: Test improvements - Snapshots #552

Closed htmlandbacon closed 7 months ago

htmlandbacon commented 11 months ago

What

We should look at adding light versions of visual regression, and code snapshots.

Following https://github.com/dwp/design-system/issues/486 a some work was done to understand visual regression in playwright.

We should now look at adding that to our pipeline, as this will well as out putting code snapshots.

Why

Following https://github.com/dwp/design-system/issues/486 some work was done internally how this would apply and while it won't catch everything it will help spot misalignments.

Snapshots of the code could be use to validate output from other implementations of the components.

Done when

Outcomes

We have a documented, approach to this, that excuses in our CI build

Related Links

htmlandbacon commented 10 months ago

This is enabled in our CI - however I'd class this as blocked till we have finished component reviews using https://jestjs.io/docs/snapshot-testing and https://playwright.dev/docs/test-snapshots

htmlandbacon commented 7 months ago

We'll keep going with this on a component by component bases, but no need to keep this open.