Skip to content

Commit

Permalink
test: 💍 Fix test for header dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
netchampfaris committed Jan 14, 2019
1 parent 3e044a5 commit 836b13b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 6 additions & 3 deletions cypress/integration/datatable_spec.js
Expand Up @@ -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');
});
Expand Down Expand Up @@ -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"]')
Expand Down
3 changes: 1 addition & 2 deletions cypress/support/commands.js
Expand Up @@ -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 });
});

Expand Down

0 comments on commit 836b13b

Please sign in to comment.