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

update #301

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

update #301

wants to merge 2 commits into from

Conversation

Kronnes15
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 on this pull request! 😊 However, there are a few critical issues that need to be addressed to meet the task requirements fully.

  1. Product Selection: Ensure you select "Sony vaio i7" as specified in the task, instead of "Sony vaio i5".
  2. Missing Assertions:
    • Add an assertion for the alert message after adding a product to the cart.
    • Verify that the product is in the cart after navigating to the cart page.
    • After clicking 'Purchase', assert that the entered data is shown on the modal.
  3. Page Object Model (POM): Refactor checkout.cy.js to use the POM pattern, similar to contactForm.cy.js.

Addressing these points will enhance the reliability and completeness of your test script. Keep up the great work, and I look forward to your updated submission! 🚀

✨ 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.


cy.contains('a', 'Laptops', { timeout: 10000 }).click();
cy.contains('a', 'Sony vaio i5').click();
cy.contains('a', 'Add to cart').click();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to assert the message in the alert after clicking 'Add to cart'. This is a requirement according to the task description.

cy.contains('a', 'Laptops', { timeout: 10000 }).click();
cy.contains('a', 'Sony vaio i5').click();
cy.contains('a', 'Add to cart').click();
cy.contains('a', 'Cart').click();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After clicking 'Cart', you should assert that the product is in the cart. This is necessary to ensure that the product was successfully added.

cy.get('#month').should('be.visible').type(testData.month);
cy.get('#year').should('be.visible').type(testData.year);

cy.contains('button', 'Purchase').click();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After clicking 'Purchase', you should assert that the entered data is shown on the modal. This is important to verify that the purchase details are correctly displayed.

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 submission! 🎉 Your work on the test scripts shows great effort and understanding of the task requirements. However, there are a few critical issues that need attention to enhance the functionality and reliability of your code:

  1. Product Selection: The script currently selects 'Sony vaio i5' instead of 'Sony vaio i7'. Please update this to meet the task requirements.

  2. Missing Assertions:

    • Ensure there is an assertion for the alert message after adding a product to the cart to confirm successful addition.
    • Verify that the product is in the cart after navigating to the cart page with an appropriate assertion.
    • After clicking 'Purchase', add assertions to verify that the entered data (name, country, city, credit card, month, year) is correctly displayed on the modal. This will ensure that the purchase details are accurate.
  3. Page Object Model (POM): The checkout.cy.js file does not utilize the Page Object Model pattern as required. Implementing POM will improve the organization and maintainability of your code.

These improvements will help align your code with the task requirements and enhance its reliability. Despite these issues, your work is approved to help you move forward with your learning journey. Please review the comments and make the necessary adjustments to improve your code. Keep up the great work and continue learning from these experiences! 🚀

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

cy.get('#logInModal .close > span').click();

cy.contains('a', 'Laptops', { timeout: 10000 }).click();
cy.contains('a', 'Sony vaio i5').click();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The task requires selecting 'Sony vaio i7', but the script currently selects 'Sony vaio i5'. Please update this line to select the correct product.


cy.contains('a', 'Laptops', { timeout: 10000 }).click();
cy.contains('a', 'Sony vaio i5').click();
cy.contains('a', 'Add to cart').click();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding an assertion here to verify the alert message after adding the product to the cart. This will ensure that the product was successfully added.

cy.contains('a', 'Laptops', { timeout: 10000 }).click();
cy.contains('a', 'Sony vaio i5').click();
cy.contains('a', 'Add to cart').click();
cy.contains('a', 'Cart').click();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before navigating to the cart, add an assertion to verify that the product is indeed in the cart. This will confirm that the product was added successfully.

cy.get('#month').should('be.visible').type(testData.month);
cy.get('#year').should('be.visible').type(testData.year);

cy.contains('button', 'Purchase').click();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After clicking 'Purchase', add assertions to verify that the entered data (name, country, city, credit card, month, year) is correctly displayed on the modal. This will ensure that the purchase details are accurate.

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