-
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
Solution #298
base: main
Are you sure you want to change the base?
Solution #298
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 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(), |
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({ 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.
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 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.
No description provided.