-
Notifications
You must be signed in to change notification settings - Fork 319
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
Demoblaze solution #284
base: main
Are you sure you want to change the base?
Demoblaze solution #284
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.
Great job on the implementation! 🎉 While there are some areas for improvement, like making certain methods more dynamic and fixing a typo, these are minor and don't impact the core functionality of your code. Keep up the good work and consider these suggestions for future enhancements!
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
homePage.clickOnCategory('Laptops'); | ||
homePage.clickOnProduct('Sony vaio i7'); | ||
homePage.addToCart(); | ||
homePage.assertAllert('Product added'); |
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 is a typo in the method name assertAllert
. It should likely be assertAlert
to correctly spell 'alert'.
|
||
homePage.purchaseOrder(); | ||
homePage.assertModal(); |
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 method assertModal
should be checked to ensure it accurately verifies the expected modal behavior. Ensure that this method is implemented correctly in the page object.
|
||
homePage.purchaseOrder(); | ||
homePage.assertModal(); | ||
homePage.confirmBtn(); |
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 method confirmBtn
should be checked to ensure it performs the intended action, such as clicking a confirmation button. Verify its implementation in the page object.
addToCart() { | ||
cy.get('[onclick="addToCart(9)"]').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 selector '[onclick="addToCart(9)"]' is hardcoded with a specific product ID (9). This might not be flexible if you want to add different products to the cart. Consider making this method more dynamic by passing the product ID as a parameter.
assertInCart() { | ||
cy.findById('tbodyid').should('contain', 'Sony vaio i7'); |
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 in 'assertInCart' is hardcoded to check for 'Sony vaio i7'. This might not be flexible if you want to assert different products. Consider making this method more dynamic by passing the product name as a parameter.
No description provided.