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

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

Solution #620

wants to merge 1 commit into from

Conversation

DianaKhala
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.

Your code meets the task requirements and constraints effectively! 🎉 The test cases for the Sign In page are well-structured, covering valid and invalid login scenarios, as well as logout functionality. Just a small note: ensure that the login step is included in the 'Logout from the app' test case to make it more robust. Keep up the great work and happy coding! 😊

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

Comment on lines +36 to +47
it('Logout from the app', () => {
// First, login with valid credentials
cy.get('input[name="username"]').type(validUsername);
cy.get('input[name="password"]').type(validPassword);
cy.get('button[type="submit"]').click();

// Click the logout button
cy.contains('Logout').click();

// Assert that the login form is displayed again after logout
cy.url().should('include', '/login');
cy.get('input[name="username"]').should('be.visible');

Choose a reason for hiding this comment

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

In the 'Logout from the app' test case, ensure that the user is logged in before attempting to log out. Currently, the test case assumes the user is already logged in, but it should explicitly perform the login steps before proceeding to logout.

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