Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Configure Cypress tests #76

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NoelDeMartin
Copy link
Member

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.

@@ -0,0 +1,24 @@
name: Tests

on: [push, pull_request]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder why the workflow did not trigger yet?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it won't trigger until this is merged in, so we'll have to see the runs in the forks for now. Once it's merged, I think modifications do take effect on the PRs. But I noticed the same thing in other projects, so I think this is normal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants