ripe-student-91560
09/09/2021, 4:16 PMbulky-sundown-74498
09/09/2021, 4:17 PMripe-student-91560
09/09/2021, 4:18 PMadorable-state-61786
09/20/2021, 3:36 PMMount(SlotTest, {
slots: {
default: 'slot content'
}
})
plain-knife-50783
10/08/2021, 2:51 AMplain-knife-50783
10/08/2021, 8:08 PMthen
after clicking the button which fires the event. Is there any way to capture an async emit?
// MyComponent.vue
const emitAsync = async () => {
const x = await something();
emit('myEvent', x);
};
// MyComponent.spec.js
cy.get('.button-which-fires-my-event').click().then(() => {
// Cypress.vueWrapper.emitted('myEvent') is always undefined 😢
})
astonishing-football-22754
11/02/2021, 7:08 PMsetData
on vue-test-utils-next
will not initialise any data that we define on the setup, is there a way of setting mocked data for a ref inside of a component (without using props)bulky-sundown-74498
11/17/2021, 7:05 PMbulky-sundown-74498
11/17/2021, 7:08 PMbulky-sundown-74498
11/17/2021, 7:08 PMbetter-piano-6669
11/24/2021, 9:56 AMCannot read properties of undefined (reading 'props')
It works when I mount my component like this:`mount(TestComponent)`
Do you know what I am missing here? Let me know if you need further information.bored-nightfall-61392
11/24/2021, 5:24 PMjs
mount(<TestComponent />)
.get(textSelector)
.should('be.visible')
better-piano-6669
11/25/2021, 6:50 AMbored-nightfall-61392
11/25/2021, 8:49 AMsalmon-oxygen-44652
11/25/2021, 9:41 AMbetter-piano-6669
12/02/2021, 6:34 AMfierce-arm-74985
12/12/2021, 7:21 PMorange-animal-45080
12/22/2021, 3:42 PMswift-glass-92692
01/03/2022, 4:31 PMmount
command. In this case, you would likely be adding PrimeVue
here.
The documentation here should help https://next.vue-test-utils.vuejs.org/api/#globalcolossal-horse-50990
01/03/2022, 4:38 PMswift-glass-92692
01/03/2022, 6:00 PMthankful-battery-80804
01/05/2022, 5:52 PMimport AppCard from '~/components/base/AppCard/AppCard.vue'
However, when I run the test, no AppCard is rendered. No error is displayed. I assume that Cypress cannot reload the downstream components. How can I make this happen?user
01/07/2022, 6:20 PMconst { startDevServer } = require('@cypress/webpack-dev-server')
const webpackOptions = {
module: {
rules: [
{
test: /\.vue$/,
use: { loader: 'vue-loader' }
}
]
}
}
const options = {
webpackOptions,
watchOptions: {}
}
module.exports = (on, config) => {
on('dev-server:start', async () => startDevServer({ options }))
require('@cypress/code-coverage/task')(on, config)
return Object.assign({}, config, {
fixturesFolder: 'tests/e2e/fixtures',
integrationFolder: 'tests/e2e/specs',
screenshotsFolder: 'tests/e2e/screenshots',
videosFolder: 'tests/e2e/videos',
supportFile: 'tests/e2e/support/index.js'
})
}
Does anybody see what I am doing wrong?user
01/11/2022, 4:32 PMcypress.json
file in your project directory. Perhaps since you're using vue templates you'll want to investigate how to have that file configured properly.user
01/11/2022, 4:34 PMloud-zebra-21352
01/14/2022, 1:10 PMloud-zebra-21352
01/14/2022, 1:11 PMloud-zebra-21352
01/14/2022, 1:12 PMloud-zebra-21352
01/14/2022, 2:34 PM