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

Solution #523

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Solution #523

wants to merge 2 commits into from

Conversation

YuliiaDov
Copy link

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a 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.

Comment on lines +6 to +7
setupNodeEvents(on, config) {
}

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.

const currentAddress = 'Wilhelm-Kalle-Straße 18';

before(() => {
cy.visit('');

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');

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.

cy.contains('tr', 'Address')
.should('contain.text', currentAddress);
cy.contains('tr', 'State and City')
.should('contain.text', 'Uttar Pradesh Merrut');

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) => { ... })

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) => { ... })

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) => { ... })

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) => { ... })

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.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a 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

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.

Comment on lines +5 to +6
setupNodeEvents(on, config) {
}

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();

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.

Comment on lines +56 to +59
cy.contains('tr', 'State and City')
.should('contain.text', 'Uttar Pradesh');
cy.contains('tr', 'State and City')
.should('contain.text', 'Merrut');

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) => { ... })

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) => { ... })

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) => { ... })

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) => { ... })

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.

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