-
Notifications
You must be signed in to change notification settings - Fork 289
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
🧹 In cypress, use getBySel("") instead of get('[data-cy=""]') #5575
Conversation
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 are still places where .get("[data-cy='....
is used. For instance, in
- https://github.com/hedyorg/hedy/blob/main/tests/cypress/e2e/for-teacher_page/class_page/second_teachers_invites.cy.js#L55
- https://github.com/hedyorg/hedy/blob/main/tests/cypress/e2e/for-teacher_page/general/preview-class.cy.js
- https://github.com/hedyorg/hedy/blob/main/tests/cypress/e2e/hedy_page/quiz.cy.js
- https://github.com/hedyorg/hedy/blob/main/tests/cypress/e2e/public_programs/programs_page.cy.js
- ...
Perhaps do a search for data-cy
in all .cy.js files, so that you can change them everywhere!
@hasan-sh Thanks for the contribution, looks good! Can you fix the tests? Then it's ready I think |
Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork). |
This is a lot cleaner to read:
cy.getBySel('view_class_link')
instead of:
cy.get('[data-cy="view_class_link"]')