diff --git a/client/cypress/components/InputWithLabel.cy.ts b/client/cypress/components/InputWithLabel.cy.ts new file mode 100644 index 00000000..28e0e014 --- /dev/null +++ b/client/cypress/components/InputWithLabel.cy.ts @@ -0,0 +1,21 @@ +import InputWithLabel from '@/components/ui/InputWithLabel.vue'; + +describe('InputWithLabel', () => { + it('renders', () => { + const inputSpy = cy.spy().as('inputSpy'); + cy.mount(InputWithLabel, { + props: { + value: '', + label: 'Label', + placeholder: 'Placeholder', + onInput: inputSpy, + }, + }); + cy.getByDataCy('input-with-label-input') + .should('have.attr', 'placeholder', 'Placeholder') + .type('Hello') + .should('have.value', 'Hello'); + cy.getByDataCy('input-with-label-label').should('contain.text', 'Label'); + cy.get('@inputSpy').should('have.been.calledWith', 'Hello'); + }); +}); diff --git a/client/cypress/components/SubmissionForm.cy.ts b/client/cypress/components/SubmissionForm.cy.ts index 429ea1cb..f8ad476a 100644 --- a/client/cypress/components/SubmissionForm.cy.ts +++ b/client/cypress/components/SubmissionForm.cy.ts @@ -19,5 +19,6 @@ describe('SubmissionForm', () => { onReopen: () => { }, }, }); + cy.getByDataCy('submission-textarea').should('exist').should('have.attr', 'placeholder', 'placeholder'); }); }); diff --git a/client/src/components/content-block-form/ContentElementActions.vue b/client/src/components/content-block-form/ContentElementActions.vue index 2f739c18..2953d6bc 100644 --- a/client/src/components/content-block-form/ContentElementActions.vue +++ b/client/src/components/content-block-form/ContentElementActions.vue @@ -39,10 +39,10 @@ @click="emitAndClose('move-down')" />
- +