test: 💍 Fix test for header dropdown
This commit is contained in:
parent
3e044a5ffa
commit
836b13bd88
@ -113,12 +113,11 @@ describe('DataTable', function () {
|
||||
.find('.dt-dropdown__toggle')
|
||||
.as('toggle')
|
||||
.click();
|
||||
cy.getColumnCell(2)
|
||||
.find('.dt-dropdown__list')
|
||||
cy.get('.dt-dropdown__list')
|
||||
.as('dropdown-list')
|
||||
.should('be.visible');
|
||||
|
||||
cy.get('@toggle').click();
|
||||
cy.getColumnCell(2).click();
|
||||
|
||||
cy.get('@dropdown-list').should('not.be.visible');
|
||||
});
|
||||
@ -152,6 +151,10 @@ describe('DataTable', function () {
|
||||
});
|
||||
|
||||
describe('Row', function () {
|
||||
before(function () {
|
||||
cy.visit('/');
|
||||
});
|
||||
|
||||
it('check / uncheck row', function () {
|
||||
cy.get('.dt-scrollable .dt-row:first')
|
||||
.find('input[type="checkbox"]')
|
||||
|
||||
@ -43,8 +43,7 @@ Cypress.Commands.add('clickDropdown', (col) => {
|
||||
});
|
||||
|
||||
Cypress.Commands.add('clickDropdownItem', (col, item) => {
|
||||
return cy.getColumnCell(col)
|
||||
.find(`.dt-dropdown__list-item:contains("${item}")`)
|
||||
return cy.get(`.dt-dropdown__list-item:contains("${item}")`)
|
||||
.click({ force: true });
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user