-
Notifications
You must be signed in to change notification settings - Fork 341
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 #301
base: main
Are you sure you want to change the base?
Solution #301
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.
It looks like there are a couple of critical issues that need attention. The custom command cy.createArticle
should be verified for correct implementation, and the cy.visit('');
command needs a valid URL to ensure proper navigation. Once these are addressed, your code will be in great shape! Keep up the good work! 🌟
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
|
||
beforeEach(() => { | ||
cy.login(user); | ||
cy.visit(''); |
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.
The cy.visit('');
command is visiting an empty URL, which might not be the intended behavior. Ensure that the correct URL or path is provided to navigate to the desired page.
}); | ||
|
||
it('', () => { | ||
it('should delete the article', () => { | ||
cy.createArticle(user, articlePayload); |
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.
The cy.createArticle(user, articlePayload);
command suggests a custom command is being used. Ensure that this custom command is correctly defined in your Cypress support files and that it behaves as expected.
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.
Great job on setting up the configuration! While there are a few areas for improvement, such as optimizing the login process and ensuring correct command definitions, these are minor and don't critically impact functionality. Keep up the good work and consider the feedback for future enhancements! 😊
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
|
||
beforeEach(() => { | ||
cy.login(user); | ||
cy.visit(''); |
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.
The cy.visit('');
command is visiting an empty URL. Ensure that the correct URL or path is provided to visit the intended page.
}); | ||
|
||
it('', () => { | ||
it('should delete the article', () => { | ||
cy.createArticle(user, articlePayload); |
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.
The cy.createArticle(user, articlePayload);
command assumes that a custom command createArticle
exists. Ensure that this command is defined in your Cypress commands file, or replace it with the appropriate steps to create an article.
Cypress.Commands.add('createArticle', (user, article) => { | ||
cy.request({ | ||
method: 'POST', | ||
url: '/api/users/login', |
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.
It seems like the login request is being made again in the 'createArticle' command. If the user is already logged in, this step might be redundant. Consider reusing the authentication token from the 'login' command if possible.
No description provided.