origami icon indicating copy to clipboard operation
origami copied to clipboard

TSX template testing

Open akomiqaia opened this issue 3 years ago • 1 comments

Storybook already has few suggestions around what sort of testing we could do for our TSX templates:

Test runner to automatically test your entire Storybook and catch broken stories. Visual tests capture a screenshot of every story then compare it against baselines to detect appearance and integration issues Accessibility tests catch usability issues related to visual, hearing, mobility, cognitive, speech, or neurological disabilities Interaction tests verify component functionality by simulating user behaviour, firing events, and ensuring that state is updated as expected Snapshot tests detect changes in the rendered markup to surface rendering errors or warnings Import stories in other tests to QA even more UI characteristics

We are already doing accessibility and we might want to do only visual and snapshot testing. For visual testing we will need to start using chromatic but if storybook is the future of origami we might investigate chromatic as well.

akomiqaia avatar Oct 11 '22 15:10 akomiqaia

Out TSX templates are used in production now, not just in demos. We should introduce tests (probably snapshot tests) to ensure that for given props we get the markup we expect. I've added a label to ensure we discuss this in our next planning session and prioritise against other work.

notlee avatar Feb 22 '23 14:02 notlee