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

Add Autotests #283

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

Add Autotests #283

wants to merge 1 commit into from

Conversation

Lyudmila2024
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 structuring the test script and following the Page Object Model pattern! 🎉 While there are minor improvements suggested for the assertions and the expect function, they don't impact the core functionality. Keep up the good work and consider these suggestions for future enhancements!

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

Comment on lines +23 to +25
cy.get('.modal-body').should('contain', 'Test Name');
cy.get('.modal-body').should('contain', 'Test Country');
cy.get('.modal-body').should('contain', 'Test City');

Choose a reason for hiding this comment

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

The assertions in assertOrderDetails method are currently using hardcoded values ('Test Name', 'Test Country', 'Test City'). Consider using dynamic values or parameters to make the test more flexible and applicable to different scenarios.


assertAlert(expectedMessage) {
cy.on('window:alert', (text) => {
expect(text).to.contains(expectedMessage);

Choose a reason for hiding this comment

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

There is a minor issue here. The expect function should use to.contain instead of to.contains. The correct method is to.contain for checking if a string contains a substring.

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