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

HW_Book_Store_is_ready #330

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SerhiiSharabura19
Copy link

No description provided.

Copy link

@djtyrf312 djtyrf312 left a comment

Choose a reason for hiding this comment

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

check the comments

cy.login();
cy.visit('/profile');
cy.contains('#item-2', 'Book Store').click();
cy.get('#searchBox').type(`Speaking JavaScript{enter}`);

Choose a reason for hiding this comment

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

Suggested change
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

Comment on lines 26 to 32
Cypress.Commands.add('login', () => {
cy.request({
method: 'POST',
url: 'https://demoqa.com/Account/v1/Login',
body: {
userName: 'qa_jan24',
password: '12345Qwert!'

Choose a reason for hiding this comment

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

Suggested change
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

Copy link

@djtyrf312 djtyrf312 left a comment

Choose a reason for hiding this comment

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

Good job!

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