-
Notifications
You must be signed in to change notification settings - Fork 322
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 #309
base: main
Are you sure you want to change the base?
solution #309
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 implementing the Page Object Model effectively in your test automation script! 🎉 Your code meets the task requirements and constraints, and the overall structure is well-organized. There are a few minor improvements you could consider for future enhancements:
-
Descriptive Test Case Name: Providing a meaningful name for your test case will help others understand its purpose more easily.
-
assertPopUpMessage
Enhancements: Currently, this method only checks for visibility. If your test requires verifying specific text, consider adding an assertion to check for the expected message content. Also, ensure that the function is called with the necessary arguments if it requires any.
These are minor suggestions and do not impact the functionality of your code. Keep up the great work and continue refining your skills! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
|
||
describe('Checkout', () => { | ||
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 test case lacks a descriptive name. It's important to provide a meaningful name for the test case to understand its purpose and what it is verifying.
|
||
cartPage.clickOnPurchase(); | ||
cartPage.assertPopUpMessage(); |
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 assertPopUpMessage
function is called without any arguments. Ensure that this function does not require any parameters or modify it to include expected parameters to verify the correct pop-up message.
} | ||
|
||
assertPopUpMessage() { | ||
this.elements.popUpMessage().should('be.visible'); |
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 assertPopUpMessage
method currently only checks if the pop-up is visible. If the test requires verifying specific text within the pop-up, consider adding an assertion to check for the expected message content.
No description provided.