-
Notifications
You must be signed in to change notification settings - Fork 9
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
[React - Vue] - Migrate E2E Tests from Cypress to Playwright #335
Conversation
The test data creation script has been updated to use the `PLAYWRIGHT_TEST_USER_PASS` environment variable instead of `CYPRESS_TEST_USER_PASS` for the password of the Playwright E2E test user.
This commit adds e2e tests for the home page and sign up functionality in the React web client. The tests ensure that the welcome text, login button, and signup button are visible on the home page. Additionally, the tests cover the sign-up workflow, including filling in the required fields and submitting the form. This enhances the test coverage and helps ensure the proper functioning of these critical features.
…riable for Playwright E2E test user password
…de@v4 This commit updates the e2e.yml workflow file to use the latest versions of the actions/checkout and actions/setup-node actions. It also adds a custom name and path for the checkout action, and sets the node version to 18 for the setup-node action. These updates ensure that the e2e workflow is using the most up-to-date dependencies and configurations.
…de@v4 This commit updates the e2e.yml workflow file to use the latest versions of the actions/checkout and actions/setup-node actions. It also adds a custom name and path for the checkout action, and sets the node version to 18 for the setup-node action. These updates ensure that the e2e workflow is using the most up-to-date dependencies and configurations.
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.
await page.getByTestId('last-name').fill('e2e test') | ||
await page | ||
.getByTestId('email') | ||
.fill(`playwright${Math.floor(Math.random() * 1000)}@thinknimble.com`) |
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.
I suggest using a UUID or a larger number here to greatly reduce the chance of a collision.
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.
yeah you are right, I replaced it for a timestamp instead as its value is unique
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.
There is still a chance of collision when browser tests are run in parallel, but that should be very unlikely, so this is a lot better. Thanks!
@whusterj These checks shouldn't be showing as they were part of the Now this is being handled on the playwright config file which makes the tests to run on the 3 major browsers. |
I see - that makes sense! They should disappear after we merge. |
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.
Looks good to go!
What this does
Switches the E2E testing libraries from Cypress to Playwright for the React and Vue sides
Checklist
How to test
Add user steps to achieve desired functionality for this feature.