diff --git a/cypress/integration/select-multiple.spec.js b/cypress/integration/select-multiple.spec.js index d020ffe..c6bdbff 100644 --- a/cypress/integration/select-multiple.spec.js +++ b/cypress/integration/select-multiple.spec.js @@ -197,7 +197,6 @@ describe('Choices - select multiple', () => { removeItemButton: true, }; */ - beforeEach(() => { cy.get('[data-test-hook=remove-button]') .find('.choices__input--cloned') @@ -259,7 +258,6 @@ describe('Choices - select multiple', () => { maxItemCount: 5, }; */ - const selectionLimit = 5; beforeEach(() => { @@ -347,7 +345,6 @@ describe('Choices - select multiple', () => { renderChoiceLimit: 1, }; */ - it('only displays given number of choices in the dropdown', () => { cy.get('[data-test-hook=render-choice-limit]') .find('.choices__list--dropdown .choices__list') @@ -401,5 +398,21 @@ describe('Choices - select multiple', () => { }); }); }); + + describe('placeholder', () => { + /* + { + placeholder: true, + placeholderValue: 'I am a placeholder', + } + */ + describe('when no value has been inputted', () => { + it('displays a placeholder', () => { + cy.get('[data-test-hook=placeholder]') + .find('.choices__input--cloned') + .should('have.attr', 'placeholder', 'I am a placeholder'); + }); + }); + }); }); }); diff --git a/cypress/integration/text.spec.js b/cypress/integration/text.spec.js index 181cca3..8aa288f 100644 --- a/cypress/integration/text.spec.js +++ b/cypress/integration/text.spec.js @@ -283,5 +283,21 @@ describe('Choices - text element', () => { }); }); }); + + describe('placeholder', () => { + /* + { + placeholder: true, + placeholderValue: 'I am a placeholder', + } + */ + describe('when no value has been inputted', () => { + it('displays a placeholder', () => { + cy.get('[data-test-hook=placeholder]') + .find('.choices__input--cloned') + .should('have.attr', 'placeholder', 'I am a placeholder'); + }); + }); + }); }); }); diff --git a/public/test/select-multiple.html b/public/test/select-multiple.html index ea909a2..73a5ebc 100644 --- a/public/test/select-multiple.html +++ b/public/test/select-multiple.html @@ -31,7 +31,7 @@