Test for class instead of visibility

This commit is contained in:
Josh Johnson 2018-10-30 21:44:58 +00:00
parent d657b17568
commit 2292b5282f
2 changed files with 10 additions and 6 deletions

View file

@ -291,7 +291,7 @@ describe('Choices - select multiple', () => {
.find('.choices')
.click()
.find('.choices__list--dropdown')
.should('not.be.visible');
.should('not.have.class', 'is-active');
});
});
});
@ -309,7 +309,7 @@ describe('Choices - select multiple', () => {
.find('.choices')
.click()
.find('.choices__list--dropdown')
.should('not.be.visible');
.should('not.have.class', 'is-active');
});
});
});

View file

@ -237,9 +237,11 @@ describe('Choices - select one', () => {
it('does not open choice dropdown', () => {
cy.get('[data-test-hook=add-items-disabled]')
.find('.choices')
.click()
.click();
cy.get('[data-test-hook=add-items-disabled]')
.find('.choices__list--dropdown')
.should('not.be.visible');
.should('not.have.class', 'is-active');
});
});
});
@ -255,9 +257,11 @@ describe('Choices - select one', () => {
it('does not open choice dropdown', () => {
cy.get('[data-test-hook=disabled-via-attr]')
.find('.choices')
.click()
.click();
cy.get('[data-test-hook=disabled-via-attr]')
.find('.choices__list--dropdown')
.should('not.be.visible');
.should('not.have.class', 'is-active');
});
});
});