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