tabvengers / spicy-sections

Creative Commons Zero v1.0 Universal
128 stars 10 forks source link

Add initial tests #26

Closed bkardell closed 2 years ago

bkardell commented 2 years ago

This PR introduces tests using testcafe - it is not intended as a final state, either of test using testcafe, or whether testcafe is even the choice we intend to use ultimately. What it gives us is a useful start and something to build on and discuss.

It introduces 5 initial "tests" that check over 150 expectations about the expected states of attributes as screens resize and different queries are met.

In this initial PR, the markup this is checking is hosted on the glitch project, and that markup is using a modified version of the SpicySections.js that is currently linked in a bunch of places which passes all of these tests (SpicySections-2.js). If we change that to use the one that is currently deployed, some of these fail due to issues in the issue tracker. If you're a reviewer, you have access to the glitch and can change that between including the two modules you should be able to see the delta... Thus, the tests and the thing they are testing in terms of the JS are initially separate, but we'll align those next and discuss whether we want to take steps for gh integration and so on..