Tokamak icon indicating copy to clipboard operation
Tokamak copied to clipboard

Test DOM output directly

Open j-f1 opened this issue 3 years ago • 1 comments

It would be cool to use something like @testing-library/dom to directly test the rendered output and do things like click buttons, fill out inputs, etc. Since the tool uses the accessibility properties in the DOM API, it would also help make sure the output is accessible.

j-f1 avatar Jul 30 '20 15:07 j-f1

This is spot on! I think as soon as #204 is merged we can start using SnapshotTesting and compare HTML/CSS output with stored expected snapshots of those. In the future we could even make visual snapshots in different browsers with integration tests to ensure wider compatibility.

One other thing I was thinking about is Cypress, which may be a bit easier to maintain than WebDriver end-to-end tests, but I don't have enough experience with either to suggest anything concrete unfortunately.

MaxDesiatov avatar Jul 30 '20 16:07 MaxDesiatov