-
Notifications
You must be signed in to change notification settings - Fork 318
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 #306
base: main
Are you sure you want to change the base?
Solution #306
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 on this task! While your implementation is mostly correct and aligns with the task requirements, there are a few critical areas that need attention before we can approve the pull request. Specifically, the test script lacks descriptions for the describe
and it
blocks, which are essential for understanding the purpose of the tests. Additionally, there are missing assertions for the alert message after adding a product to the cart and for verifying that the entered data is shown on the modal after clicking 'Purchase'. These assertions are crucial to ensure the test case fully meets the task requirements. Please address these issues, and feel free to reach out if you need any assistance. Keep up the great work! 😊
✨ 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.
import HomeAndCataloguePageObject | ||
from '../support/pages/homeCatalogue.pageObject'; | ||
|
||
const homePage = new HomeAndCataloguePageObject(); | ||
/// <reference types='cypress' /> | ||
|
||
describe('', () => { |
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 describe
block is missing a description. It's important to provide a meaningful description to understand what this test suite is about.
cypress/e2e/checkout.cy.js
Outdated
/// <reference types='cypress' /> | ||
|
||
describe('', () => { | ||
before(() => { | ||
|
||
homePage.visit(); | ||
}); | ||
|
||
it('', () => { |
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 it
block is missing a description. Providing a clear description helps in understanding what this specific test case is verifying.
|
||
homePage.clickOnLinkOther('Laptops'); | ||
cy.get('.hrefch').contains('a', 'Sony vaio i7').click(); | ||
cy.get('.col-sm-12 > .btn').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.
After clicking 'Add to cart', you should assert the message in the alert to ensure it matches the expected result as per the task requirements.
cy.get('#card').type('12345678'); | ||
cy.get('#month').type('September'); | ||
cy.get('#year').type('2024'); | ||
cy.get('[onclick="purchaseOrder()"]').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.
There should be an assertion to verify that the entered data is shown on the modal after clicking 'Purchase'. This is required to ensure the test case meets the task requirements.
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 submission! 🎉 While your code is mostly well-structured, there are a few critical areas that need improvement to fully meet the task requirements.
-
Test Script Descriptions: The
describe
andit
blocks lack descriptions. Providing clear descriptions is essential for understanding the purpose of the tests and maintaining readability. -
Assertions for Alert Message: It's important to include an assertion to verify that an alert message is shown after adding a product to the cart. This ensures that the action was successful.
-
Assertions for Verifying Entered Data: Ensure that there are assertions to verify that the entered data is correctly displayed on the modal after clicking 'Purchase'. This is crucial for validating that the data is handled properly.
Despite these issues, the decision to approve your Pull Request is made to help you move forward with your learning. Please review the comments and address these issues in future submissions to enhance the quality and functionality of your code. Keep up the good work and continue improving! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
import HomeAndCataloguePageObject | ||
from '../support/pages/homeCatalogue.pageObject'; | ||
|
||
const homePage = new HomeAndCataloguePageObject(); | ||
/// <reference types='cypress' /> | ||
|
||
describe('', () => { |
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 describe
block is missing a description. It's important to provide a meaningful description to understand what this test suite is about.
}); | ||
|
||
it('', () => { | ||
|
||
it('should allow a user to add a product to the car', () => { |
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 it
block is missing a description. Please provide a clear description of what this test case is intended to verify.
it('should allow a user to add a product to the car', () => { | ||
homePage.clickOnLinkOther('Laptops'); | ||
cy.get('.hrefch').contains('a', 'Sony vaio i7').click(); | ||
cy.get('.col-sm-12 > .btn').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.
There should be an assertion here to verify that an alert is shown after clicking the button to add a product to the cart. This is crucial to ensure that the action was successful.
cy.get('#card').type('12345678'); | ||
cy.get('#month').type('September'); | ||
cy.get('#year').type('2024'); | ||
cy.get('[onclick="purchaseOrder()"]').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.
Consider adding assertions to verify that the entered data is correctly shown on the modal after clicking 'Purchase'. This will ensure that the data is being handled correctly.
No description provided.