-
Notifications
You must be signed in to change notification settings - Fork 318
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
base: main
Are you sure you want to change the base?
develop #300
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 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(), |
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 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.
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') | ||
} |
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 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.
No description provided.