-
Notifications
You must be signed in to change notification settings - Fork 363
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
HW_Book_Store_is_ready #330
base: master
Are you sure you want to change the base?
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.
check the comments
cypress/e2e/bookStore.cy.js
Outdated
cy.login(); | ||
cy.visit('/profile'); | ||
cy.contains('#item-2', 'Book Store').click(); | ||
cy.get('#searchBox').type(`Speaking JavaScript{enter}`); |
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.
cy.get('#searchBox').type(`Speaking JavaScript{enter}`); | |
cy.get('#searchBox').type(`Speaking JavaScript{enter}`); |
create a const for 'Speaking JavaScript' string, you use it two times
cypress/support/commands.js
Outdated
Cypress.Commands.add('login', () => { | ||
cy.request({ | ||
method: 'POST', | ||
url: 'https://demoqa.com/Account/v1/Login', | ||
body: { | ||
userName: 'qa_jan24', | ||
password: '12345Qwert!' |
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.
Cypress.Commands.add('login', () => { | |
cy.request({ | |
method: 'POST', | |
url: 'https://demoqa.com/Account/v1/Login', | |
body: { | |
userName: 'qa_jan24', | |
password: '12345Qwert!' | |
Cypress.Commands.add('login', (username, password) => { | |
cy.request({ | |
method: 'POST', | |
url: 'https://demoqa.com/Account/v1/Login', | |
body: { | |
userName: username, | |
password: password, |
try to make this function reusable in this way
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.
Good job!
No description provided.