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

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

solution #618

wants to merge 1 commit into from

Conversation

Jakdet
Copy link

@Jakdet Jakdet commented Dec 2, 2024

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 test cases for the Sign In page! 🎉 Your code effectively covers the key scenarios of valid login, invalid login, and logout, meeting the task requirements. While there are a couple of minor issues, such as the generic selector for the logout button and the incorrect URL assertion, these do not significantly impact the functionality. Consider refining the selector to be more specific and correcting the URL assertion for better accuracy. Keep up the excellent work and continue refining your skills! 🚀

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


it('should redirect to the correct site', () => {
cy.get('form').find('button[type="submit"]').click();
cy.url().should('eq', rightSite);

Choose a reason for hiding this comment

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

The URL assertion is incorrect. The cy.url().should('eq', rightSite); should use cy.url().should('eq', rightSite); instead of cy.url().should('eq', rightSite);. Make sure to use cy.url().should('eq', rightSite); to correctly compare the current URL with the expected URL.


it('should properly log out user', () => {
cy.get('.button').click();

Choose a reason for hiding this comment

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

The selector .button for the logout button might be too generic. Ensure that this selector uniquely identifies the logout button to avoid potential issues if there are multiple elements with the same class.

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