mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-02 05:52:46 +02:00
Remove unnecessary beforeEachs
This commit is contained in:
parent
bd674b5bdf
commit
5fe6e18077
|
@ -279,12 +279,6 @@ describe('Choices - select multiple', () => {
|
|||
addItems: false,
|
||||
}
|
||||
*/
|
||||
beforeEach(() => {
|
||||
cy.get('[data-test-hook=add-items-disabled]')
|
||||
.find('.choices')
|
||||
.click();
|
||||
});
|
||||
|
||||
it('disables the search input', () => {
|
||||
cy.get('[data-test-hook=add-items-disabled]')
|
||||
.find('.choices__input--cloned')
|
||||
|
@ -293,7 +287,10 @@ describe('Choices - select multiple', () => {
|
|||
|
||||
describe('on click', () => {
|
||||
it('does not open choice dropdown', () => {
|
||||
cy.wait(500); // allow for animation frame
|
||||
cy.get('[data-test-hook=add-items-disabled]')
|
||||
.find('.choices')
|
||||
.click();
|
||||
|
||||
cy.get('[data-test-hook=add-items-disabled]')
|
||||
.find('.choices__list--dropdown')
|
||||
.should('not.be.visible');
|
||||
|
@ -302,12 +299,6 @@ describe('Choices - select multiple', () => {
|
|||
});
|
||||
|
||||
describe('disabled via attribute', () => {
|
||||
beforeEach(() => {
|
||||
cy.get('[data-test-hook=disabled-via-attr]')
|
||||
.find('.choices')
|
||||
.click();
|
||||
});
|
||||
|
||||
it('disables the search input', () => {
|
||||
cy.get('[data-test-hook=disabled-via-attr]')
|
||||
.find('.choices__input--cloned')
|
||||
|
@ -316,6 +307,10 @@ describe('Choices - select multiple', () => {
|
|||
|
||||
describe('on click', () => {
|
||||
it('does not opens choice dropdown', () => {
|
||||
cy.get('[data-test-hook=disabled-via-attr]')
|
||||
.find('.choices')
|
||||
.click();
|
||||
|
||||
cy.get('[data-test-hook=disabled-via-attr]')
|
||||
.find('.choices__list--dropdown')
|
||||
.should('not.be.visible');
|
||||
|
|
|
@ -227,12 +227,6 @@ describe('Choices - select one', () => {
|
|||
addItems: false,
|
||||
}
|
||||
*/
|
||||
beforeEach(() => {
|
||||
cy.get('[data-test-hook=add-items-disabled]')
|
||||
.find('.choices')
|
||||
.click();
|
||||
});
|
||||
|
||||
it('disables the search input', () => {
|
||||
cy.get('[data-test-hook=add-items-disabled]')
|
||||
.find('.choices__input--cloned')
|
||||
|
@ -241,7 +235,10 @@ describe('Choices - select one', () => {
|
|||
|
||||
describe('on click', () => {
|
||||
it('does not open choice dropdown', () => {
|
||||
cy.wait(500); // allow for animation frame
|
||||
cy.get('[data-test-hook=add-items-disabled]')
|
||||
.find('.choices')
|
||||
.click();
|
||||
|
||||
cy.get('[data-test-hook=add-items-disabled]')
|
||||
.find('.choices__list--dropdown')
|
||||
.should('not.be.visible');
|
||||
|
@ -250,12 +247,6 @@ describe('Choices - select one', () => {
|
|||
});
|
||||
|
||||
describe('disabled via attribute', () => {
|
||||
beforeEach(() => {
|
||||
cy.get('[data-test-hook=disabled-via-attr]')
|
||||
.find('.choices')
|
||||
.click();
|
||||
});
|
||||
|
||||
it('disables the search input', () => {
|
||||
cy.get('[data-test-hook=disabled-via-attr]')
|
||||
.find('.choices__input--cloned')
|
||||
|
@ -264,7 +255,10 @@ describe('Choices - select one', () => {
|
|||
|
||||
describe('on click', () => {
|
||||
it('does not open choice dropdown', () => {
|
||||
cy.wait(500); // allow for animation frame
|
||||
cy.get('[data-test-hook=disabled-via-attr]')
|
||||
.find('.choices')
|
||||
.click();
|
||||
|
||||
cy.get('[data-test-hook=disabled-via-attr]')
|
||||
.find('.choices__list--dropdown')
|
||||
.should('not.be.visible');
|
||||
|
|
Loading…
Reference in a new issue