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

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

Conversation

MarianaQAaug2024
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 effectively, covering all necessary functionalities with well-structured tests. While there are minor suggestions for improvement, they do not impact the core functionality. Great job! 🎉 Keep refining your skills and consider the feedback for future enhancements.

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


describe('Article', () => {
beforeEach(() => {
cy.task('db:clear');

Choose a reason for hiding this comment

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

Consider adding error handling or assertions to verify that the database clearing task is successful. This will ensure that each test starts with a clean state.

Comment on lines +59 to +60
cy.get('.article-preview')
.should('contain.text', 'No articles are here... yet.');

Choose a reason for hiding this comment

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

Ensure that the selector '.article-preview' is correct and specific enough to avoid false positives. If there are multiple elements with this class, the test might pass even if the article is not deleted.

describe('Settings page', () => {
before(() => {
cy.task('db:clear');

Choose a reason for hiding this comment

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

Consider adding assertions to verify that the database clearing task is successful. This will ensure that the test environment is correctly set up before running the tests.


cy.register(user.email, user.username, user.password);

Choose a reason for hiding this comment

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

Ensure that the cy.register command is correctly implemented and that it verifies the registration process. This will help confirm that the user is registered successfully before proceeding with the tests.


settingsPage.assertProfilePage();

Choose a reason for hiding this comment

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

Ensure that assertProfilePage correctly verifies that the profile page is displayed after updating the bio. This will confirm that the form submission was successful.


signUpPage.checkFail('Registration failed!');

Choose a reason for hiding this comment

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

Ensure that the checkFail method correctly verifies that the error message 'Registration failed!' is displayed. This will confirm that the application correctly handles registration attempts without a password.

describe('User', () => {
before(() => {
cy.task('db:clear');

Choose a reason for hiding this comment

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

Consider adding assertions to verify that the database clearing task is successful. This will ensure that the test environment is correctly set up before running the tests.

Comment on lines +26 to +27
cy.register(mainUser.email, mainUser.username, mainUser.password);
cy.register(followUser.email, followUser.username, followUser.password);

Choose a reason for hiding this comment

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

Ensure that the cy.register command is correctly implemented and that it verifies the registration process for both mainUser and followUser. This will help confirm that both users are registered successfully before proceeding with the tests.

homePage.visitUserProfile(followUser.username);
homePage.clickOnFollowBtn();

homePage.assertBtnName('Unfollow');

Choose a reason for hiding this comment

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

Ensure that the assertBtnName method correctly verifies that the button name changes to 'Unfollow' after clicking the follow button. This will confirm that the follow action was successful.


homePage.assertBtnName('Follow');

Choose a reason for hiding this comment

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

Ensure that the assertBtnName method correctly verifies that the button name changes back to 'Follow' after clicking the unfollow button. This will confirm that the unfollow action was successful.

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