-
Notifications
You must be signed in to change notification settings - Fork 357
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
base: main
Are you sure you want to change the base?
Solution #282
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.
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'); |
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.
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.
cy.get('.article-preview') | ||
.should('contain.text', 'No articles are here... yet.'); |
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.
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'); |
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.
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); |
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.
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(); |
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.
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!'); |
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.
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'); |
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.
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(mainUser.email, mainUser.username, mainUser.password); | ||
cy.register(followUser.email, followUser.username, followUser.password); |
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.
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'); |
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.
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'); |
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.
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.
No description provided.