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

solution #309

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

solution #309

wants to merge 1 commit into from

Conversation

indigo04
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 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:

  1. Descriptive Test Case Name: Providing a meaningful name for your test case will help others understand its purpose more easily.

  2. 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('', () => {

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

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

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.

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