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 #298

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

Solution #298

wants to merge 1 commit into from

Conversation

YuliiaDov
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 task requirements and using the Page Object Model effectively! 🎉 While there are a couple of minor issues, such as the assertModalData method not verifying data values and a potential issue with faker.date.future(), these do not critically impact the functionality. Keep up the good work and consider addressing these points to enhance your code further! 😊

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

city: faker.address.city(),
creditCard: faker.finance.creditCardNumber(),
month: faker.date.month(),
year: faker.date.future({ years: 5 }).getFullYear(),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method faker.date.future({ years: 5 }).getFullYear() might not work as expected because faker.date.future() returns a Date object, and calling getFullYear() directly on it may not be valid. Consider using faker.date.future(5).getFullYear() instead.

Comment on lines +25 to +32
assertModalData(name, country, city, creditCard, month, year) {
cy.contains('Id').should('be.visible');
cy.contains('Amount').should('be.visible');
cy.contains('Card Number').should('be.visible');
cy.contains('Name').should('exist');
cy.contains('Date').should('be.visible');
cy.contains('Country').should('be.visible');
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The assertModalData method currently checks for the visibility of certain elements but does not verify that the modal contains the expected data values (name, country, city, credit card, month, year) passed as parameters. Consider adding assertions to check that these values are correctly displayed in the modal.

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