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

Demoblaze solution #284

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

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

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

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

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

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.

Comment on lines +21 to +22
addToCart() {
cy.get('[onclick="addToCart(9)"]').click();

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.

Comment on lines +25 to +26
assertInCart() {
cy.findById('tbodyid').should('contain', 'Sony vaio i7');

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.

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