-
Notifications
You must be signed in to change notification settings - Fork 10
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
Get Cypress up and running again (with docker and interactive testing) #652
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also see my StackOverflow question: https://stackoverflow.com/q/78639075
Also updated the cypress user emails and passwords.
Note that at this point, some cypress commands don't work yet.
Along side this, the schema was automatically updated and got rid of old translation tables originally created by the globalize gem. They were still in here as remnant of #609.
This reverts commit 88f369e.
See https://github.com/rails/rails/blob/d43ee2088118425e493766aeb20575e9ce7159d1/actionmailbox/test/dummy/db/schema.rb#L5-L9 We also abort the script if it is called from the production environment. It's only intended for usage in the dev/test environment. For production, we have the respective master and worker entrypoints.
Splines
commented
Jul 1, 2024
Splines
commented
Jul 1, 2024
Splines
commented
Jul 1, 2024
fosterfarrell9
approved these changes
Jul 2, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Great work!
Merged
This was referenced Aug 13, 2024
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR does not rework the cypress tests. Instead, it sets all the necessary infrastructure to run cypress tests locally and in our GitHub Actions pipeline without a big fuss.
Start cypress interactive GUI
This may be subject to frequent changes as this PR is only a draft right now.
Install VcXsrv Windows X Server. Run XLaunch. In the "Extra settings", make sure to choose "Disable access control".This is not needed anymore, new versions of WSL come with an X11 server, yeah 🙌 See the WSLg repo.
The only thing you have to do is run
wsl --update
(in Powershell).docker/test/
folder:Wait a few seconds and the GUI should automatically pop up. Choose E2E testing and try to run the submission dummy test I've added. You should see the edit profile page at the end.
Note that cypress shares the test database with the Rails unit tests. This shouldn't be a problem as they both clean the whole database before they execute anything. But this means, we shouldn't run cypress and unit tests at the same time. I don't feel like this is a big issue locally, if you feel it is, it's easy to spin up another docker environment.
cypress-on-rails & more links
We don't use
cypress-on-rails
anymore.on-rails.js
TODOs
just
commands for easy startup of cypress GUI -> ▶ in future PR