Tag: cypress

Testing svelte-dnd-action with Cypress

Using Drag & Drop is probably easier than ever due to virtually unlimited supply of new front-end libraries appearing every day. Making Drag & Drop for a sortable trello-like boards or for file uploads work in the browser is thus becoming a matter of importing a module an…

Test preserveScroll in InertiaJS with Cypress

A short snippet that makes it possible to test if preserveScroll feature is enabled in InertiaJS. Can be used as a part of Test-Driven Development process (TDD). The snippet can probably be adapted for other scroll related tests, but is especially geared towards the InertiaJS fea…

Prevent push when skipping Cypress tests pt.2

Just a quick update to the article I wrote some time ago that could be considered as part one on this topic. The problem outlined in the article is basic. When developing Cypress tests, it is helpful to use the .only(), a Cypress modifier to exclude other tests to see results for…

How to assert sorted dates in Cypress

Here's how I use Cypress to assert that the user interface I am building displays datetime information sorted chronologically. Consider the list of dates served at the port 3000 that looks like this: <ul id="sorted"> <li>14.12.1999</li> <li>1…

Prevent push when skipping Cypress tests

There is a more updated method I use now descried in the part 2. Here's way I use to prevent pushing changes when some of the Cypress tests are being skipped Install required packages npm i -D cypress husky start-server-and-test Define your dev script in package.json if not d…