19 lines
584 B
TypeScript
19 lines
584 B
TypeScript
import PageFormInput from '@/components/page-form/PageFormInput.vue';
|
|
|
|
describe('<PageFormInput />', () => {
|
|
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');
|
|
});
|
|
});
|