stocky-dream-36427
03/04/2021, 3:59 AMstocky-dream-36427
03/04/2021, 4:01 AMstocky-dream-36427
03/04/2021, 4:01 AMstocky-dream-36427
03/04/2021, 4:03 AMjs
import bootstrapVue from '@/src/plugins/bootstrap-vue';
mount(Score, {
plugins: [bootstrapVue], // <-- this is the change
propsData: {
isEditable: true,
},
});
// You really don't want to do this. This will actually be impossible to do in Vue 3. Is status a prop? If so, set it via propsData.
Cypress.vue.status.loading = true;
cy.get('.spinner').should('exist');
stocky-dream-36427
03/04/2021, 4:04 AMsome-finland-74005
03/05/2021, 4:22 PMstocky-dream-36427
03/06/2021, 6:49 PMstocky-dream-36427
03/06/2021, 6:50 PMstocky-dream-36427
03/06/2021, 6:50 PMsome-finland-74005
03/06/2021, 8:09 PMmelodic-father-50900
03/15/2021, 3:32 PM"@cypress/vue": "^1.1.0-alpha.2"
without problems, but can't seem to upgrade to v2. It seems a lot has changed in the the way preprocessor is called. The Cli2 example folder on Github was the most helpful, but I got stuck because of webpack stuff: I get the infamous You may need an appropriate loader to handle this file type
(I'm using vue-cli and use the exact same config: https://github.com/cypress-io/cypress/blob/master/npm/vue/examples/cli2/plugins.js#L5)
Also, it seems the code doesn't match the Readme in a lot of places.melodic-father-50900
03/15/2021, 3:33 PMstocky-dream-36427
03/16/2021, 3:32 PMstocky-dream-36427
03/16/2021, 3:33 PMstocky-dream-36427
03/16/2021, 3:33 PM@cypress/webpack-dev-server
melodic-father-50900
03/16/2021, 3:53 PMmelodic-father-50900
03/16/2021, 3:54 PM@cypress/webpack-dev-server
is not a dependency in package.json
of @cypress/vue
breezy-australia-64868
03/17/2021, 4:46 PMmapGetters
it's throwing errors. I looked in the VTU docs and found examples of using localVue
but not sure if that's an option here. My general Vuex setup is pretty basic, so if anyone has had any success using it with component tests I'd love some guidance! This link https://www.cypress.io/blog/2017/11/28/testing-vue-web-application-with-vuex-data-store-and-rest-backend/ works well for my non-component testsstocky-dream-36427
03/23/2021, 6:17 PMstocky-dream-36427
03/23/2021, 6:17 PMstocky-dream-36427
03/23/2021, 6:19 PMstocky-dream-36427
03/23/2021, 6:21 PMbreezy-australia-64868
03/23/2021, 6:21 PMstocky-dream-36427
03/23/2021, 6:21 PMstocky-dream-36427
03/23/2021, 6:22 PMbreezy-australia-64868
03/23/2021, 6:22 PMstocky-dream-36427
03/23/2021, 6:22 PMbreezy-australia-64868
03/24/2021, 10:17 PMmount(Component, {...})
or mount({ components: { Component} })
) and passing in a template like you do. The docs have examples where the component is passed in as the first argument to mount
, and that's what errored out for me, although it's been working for almost all of my tests up until this point. As soon as I did it your way everything seems to work for this new component! Anyways - thanks for the reference! ๐numerous-greece-56828
03/26/2021, 1:24 AMstocky-dream-36427
03/26/2021, 2:27 AM