SolidOS / solidos

The operating system for Solid
https://solidos.solidcommunity.net/
MIT License
127 stars 19 forks source link

[WIP] Configure Cypress tests #76

Closed NoelDeMartin closed 1 week ago

NoelDeMartin commented 3 years ago

This PR configures Cypress to run tests against the entire SolidOS stack, as suggested in https://github.com/solid/solid-ui/issues/436.

This repository is probably not the best place to add this, because the changes that would break these tests will be made in other repositories. And that's where this should be configured, that way we'll be able to notice if something is broken in each commit instead of waiting for new features to be merged in.

However, I'm not sure how to run the entire stack in other repositories, which is required in order to write Cypress tests because they run on a browser using the real application. Maybe we could publish the scripts in this repository to an npm package and use that to run the entire stack from other repositories. But I'm not sure if that's the best way either, so let's talk about it.

In any case, this should be a first step towards using Cypress in SolidOS :).

Regarding the tests, I've just added a couple to see that things work as expected. Registration works fine, but for some reason loging in doesn't redirect properly and the test is stuck on the login page. If you want to try it, remove the .skip part from the test in the auth.spec.js file.

If you want to try running Cypress locally, remember to run npm install in order to get the new dependencies, and you can launch Cypress with the npm run cy:open command (this one, in contrast with cy:test, does not launch the app so you should be running npm start as well).

If you want to see how this looks like once integrated, check out my fork.

NoelDeMartin commented 1 week ago

I'm closing this given that I have no intention to move this forward, anyone is welcome to pick this up if you want.