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

develop #300

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

develop #300

wants to merge 1 commit into from

Conversation

vladisssi
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 using the Page Object Model in Cypress! 🎉 While there are a couple of improvements to consider, such as updating the assertModalData method to verify modal data accurately and using a valid method to generate a future year, these are minor and don't impact the core functionality. Keep up the good work and happy coding! 😊

✨ 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 does not exist in the Faker.js library. You should use a valid method to generate a future year, such as new Date().getFullYear() + 5 to get a year 5 years in the future.

Comment on lines +27 to +34
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 should verify that the modal contains the expected values for name, country, city, creditCard, month, and year. Currently, it only checks for the presence of certain text elements. Consider using assertions that compare the actual text content of these elements with the expected values passed as parameters.

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