-
Notifications
You must be signed in to change notification settings - Fork 566
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
Solution #523
base: master
Are you sure you want to change the base?
Solution #523
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.
Thank you for your hard work! There are a few critical issues that need to be addressed: missing implementations for custom commands, incorrect assertions, and a missing URL in the test setup. Once these are fixed, your code will be in great shape! Keep up the great effort! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review
button in the Reviewers tab.
setupNodeEvents(on, config) { | ||
} |
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.
The setupNodeEvents function is currently empty. If you need to handle specific Cypress events, you should add the appropriate event listeners here.
cypress/e2e/registration.cy.js
Outdated
const currentAddress = 'Wilhelm-Kalle-Straße 18'; | ||
|
||
before(() => { | ||
cy.visit(''); |
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.
The cy.visit('') command is missing a URL. Ensure you provide the correct URL for the registration page to visit before running the tests.
cy.contains('tr', 'Mobile').should('contain.text', mobileNumber); | ||
cy.contains('tr', 'Date of Birth') | ||
.should('contain.text', '20 February,1986'); | ||
cy.contains('tr', 'Subjects').should('contain.text', 'Maths'); |
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.
The assertion for 'Subjects' should check for 'Math' instead of 'Maths' to match the input provided earlier.
cypress/e2e/registration.cy.js
Outdated
cy.contains('tr', 'Address') | ||
.should('contain.text', currentAddress); | ||
cy.contains('tr', 'State and City') | ||
.should('contain.text', 'Uttar Pradesh Merrut'); |
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.
The assertion for 'State and City' should match the selected options. Ensure 'Uttar Pradesh Merrut' is correct based on the options selected in the test.
// | ||
// | ||
// -- This is a parent command -- | ||
// Cypress.Commands.add('login', (email, password) => { ... }) |
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.
The 'login' command is defined but lacks implementation. Provide the implementation details if this command is intended to be used.
// | ||
// | ||
// -- This is a child command -- | ||
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) |
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.
The 'drag' command is defined but lacks implementation. Provide the implementation details if this command is intended to be used.
// | ||
// | ||
// -- This is a dual command -- | ||
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) |
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.
The 'dismiss' command is defined but lacks implementation. Provide the implementation details if this command is intended to be used.
// | ||
// | ||
// -- This will overwrite an existing command -- | ||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) |
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.
The 'visit' command is overwritten but lacks implementation. Provide the implementation details if this command is intended to be used.
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.
Great job on setting up your project and tests! 🎉 While there are some areas for improvement, such as implementing the custom commands and ensuring your assertions match the selected values, your overall structure is solid. Addressing these issues will enhance your code quality and testing reliability. Keep up the good work and continue learning from these experiences!
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
node_modules | ||
# Mac OS DS_Store files. | ||
.DS_Store | ||
.favorites.json |
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.
Ensure that .favorites.json is a file that should be ignored. If it's not necessary to ignore this file, consider removing this line.
setupNodeEvents(on, config) { | ||
} |
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.
The setupNodeEvents function is currently empty. If you need to configure custom event listeners for your Cypress tests, consider adding them here. If no event configuration is needed, you can leave it as is.
cy.get('.react-datepicker__day--020').click(); | ||
|
||
// Select hobbies | ||
cy.get('label[for="hobbies-checkbox-2"]').click(); |
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.
The test selects 'Music' as a hobby, but the assertion checks for 'Reading'. Ensure that the selected hobby matches the expected value in the assertion.
cy.contains('tr', 'State and City') | ||
.should('contain.text', 'Uttar Pradesh'); | ||
cy.contains('tr', 'State and City') | ||
.should('contain.text', 'Merrut'); |
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.
The assertions for 'State and City' are split into two separate checks. Consider combining them into a single assertion for clarity, e.g., .should('contain.text', 'Uttar Pradesh Merrut');
.
// | ||
// | ||
// -- This is a parent command -- | ||
// Cypress.Commands.add('login', (email, password) => { ... }) |
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.
The 'login' command is defined but not implemented. Replace the ellipsis (...) with the actual implementation if this command is intended to be used.
// | ||
// | ||
// -- This is a child command -- | ||
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) |
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.
The 'drag' command is defined but not implemented. Replace the ellipsis (...) with the actual implementation if this command is intended to be used.
// | ||
// | ||
// -- This is a dual command -- | ||
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) |
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.
The 'dismiss' command is defined but not implemented. Replace the ellipsis (...) with the actual implementation if this command is intended to be used.
// | ||
// | ||
// -- This will overwrite an existing command -- | ||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) |
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.
The 'visit' command is overwritten but not implemented. Replace the ellipsis (...) with the actual implementation if this command is intended to be used.
No description provided.