-
Notifications
You must be signed in to change notification settings - Fork 288
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 #244
base: main
Are you sure you want to change the base?
Solution #244
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.
Please check the comments
|
||
describe('Web Tables page', () => { | ||
it('', () => { | ||
beforeEach(() => { |
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.
add empty lines between beforeEach and all tests
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.
beforeEach(() => { | ||
cy.visit('https://demoqa.com/webtables'); | ||
}); | ||
it('should check Pagination', () => { |
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.
Please consider that describe + test name should create summary together - in this case we have
Web Tables page + should check Pagination // Web Tables shouldn't check pagination.
Better to write
Web Tables page + should allow user to change page
Check and fix everywhere
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.visit('https://demoqa.com/webtables'); | ||
}); | ||
it('should check Pagination', () => { | ||
cy.get('.rt-tbody .rt-tr-group').should('have.length', 10); |
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.
Try to use more descriptive selectors everywhere
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.
сhange
cy.get('.rt-tbody .rt-tr-group').should('have.length', 10); | ||
cy.get('.-next').should('be.visible').and('not.be.disabled'); | ||
cy.get('img[src="/images/Toolsqa.jpg"]').should('exist'); | ||
cy.url().should('eq', 'https://demoqa.com/webtables'); |
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.
Not sure what this assert is doing here
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.
change
cy.get(`.rt-noData`).should('contain', 'No rows found'); | ||
}); | ||
it('should Find a worker in the search field and edit it.', () => { | ||
cy.get('input#searchBox').type('Cierra'); |
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.
add search keyword to const
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.
add
}); | ||
it('should Find a worker in the search field and edit it.', () => { | ||
cy.get('input#searchBox').type('Cierra'); | ||
cy.get('input#searchBox').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.
Where do we have asserts to check search results?
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.