nutritious-restaurant-91514
08/13/2022, 12:17 PMemit
have this onChange
prop. I especially don’t understand the naming,. Obviously, this ties to change
 emit, but where does the on
come from? is this a naming convention? I wasn’t able to find any indicator either in Cypress or Vue test utils docs on thisrapid-yak-87393
08/15/2022, 3:47 PMnutritious-restaurant-91514
08/15/2022, 6:01 PMadorable-leather-85140
08/17/2022, 12:24 PMadorable-leather-85140
08/17/2022, 12:25 PMadorable-leather-85140
08/17/2022, 12:25 PMripe-plumber-61789
08/17/2022, 4:12 PMv-model
in component testing?
I have a DataPickerComp.vue
component. How can I define and pass the v-model value for component testing? Thanks!
<template>
<v-row justify="center">
<v-date-picker v-model="picker" />
</v-row>
</template>
<script>
export default {
data() {
return {
picker: (new Date(Date.now() - (new Date()).getTimezoneOffset() * 60000)).toISOString().substr(0, 10),
};
},
};
</script>
DatePickerComp.cy.js
import DatePickerComp from '../../../../src/components/elements/DatePickerComp.vue';
describe('DatePickerComp', function () {
it('date model', function () {
cy.mount(DatePickerComp);
});
});
ancient-appointment-66951
08/18/2022, 9:12 AMancient-appointment-66951
08/18/2022, 9:13 AMgreat-arm-27075
08/23/2022, 6:51 AMgreat-arm-27075
08/24/2022, 5:20 AMancient-appointment-66951
08/24/2022, 6:13 AMcy.get('select').find('option')
or something along those lines.great-arm-27075
08/26/2022, 7:50 AMancient-appointment-66951
08/30/2022, 12:54 AMcy.get
to get your elements - are you saying the options are simply not displayed during testing? That's weird - is the data fetched correctly?dazzling-ram-7318
08/30/2022, 8:13 PMgreat-arm-27075
09/01/2022, 4:48 AMcolossal-farmer-50435
09/01/2022, 5:34 AMancient-appointment-66951
09/01/2022, 11:07 AMaloof-football-89504
09/02/2022, 10:26 PMaloof-football-89504
09/02/2022, 10:26 PMaloof-football-89504
09/02/2022, 10:27 PMdazzling-ram-7318
09/06/2022, 10:03 PMmicroscopic-ice-2827
09/26/2022, 1:32 PMancient-appointment-66951
10/13/2022, 2:53 AMlimited-room-30929
10/14/2022, 6:52 AMancient-appointment-66951
10/14/2022, 11:15 PMmicroscopic-ice-2827
10/18/2022, 4:32 PMadamant-mouse-7124
10/19/2022, 8:04 AMeager-pager-61350
10/20/2022, 6:08 PMtypescript
mount(SomeVueComponent, { Props: { SomeNumber: 12 } })
doesn't provide intellisense for Props. Nor does it highlight errors when trying to put string inside a number prop etc.
I noticed 'mount' has one overload where options parameter isn't of type 'any'. I had no luck forcing it to use that overload though.
Pls help, I want my component tests to be more future proof with strongly typed props.eager-pager-61350
10/20/2022, 8:49 PM