import PageFormInput from '@/components/page-form/PageFormInput.vue'; describe('', () => { it('renders', () => { // see: https://test-utils.vuejs.org/guide/ const inputSpy = cy.spy().as('inputSpy'); cy.mount(PageFormInput, { props: { label: 'Hi', value: 'Some', onInput: inputSpy, }, }); cy.get('.page-form-input__label').should('contain.text', 'Hi'); cy.getByDataCy('page-form-input-hi').should('have.value', 'Some').type('A'); cy.get('@inputSpy').should('have.been.calledWith', 'SomeA'); }); });