Intro Examples not working, Vue-Cli 3, fresh install
See original GitHub issueBUG
- version 1.11.0 package.json:
{
"name": "cypress-test-3000",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"test:e2e": "vue-cli-service test:e2e"
},
"dependencies": {
"vue": "^2.5.17"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.1.0",
"@vue/cli-plugin-e2e-cypress": "^3.1.0",
"@vue/cli-service": "^3.1.0",
"cypress-vue-unit-test": "^1.11.0",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"vue-template-compiler": "^2.5.17"
}
Terminal says
GET /__/ 200 18.770 ms - -
GET /__cypress/runner/cypress_runner.css 200 36.240 ms - -
GET /__cypress/runner/cypress_runner.js 200 281.366 ms - -
GET /__cypress/runner/fonts/fontawesome-webfont.woff2?v=4.6.3 200 1.661 ms - 71896
GET /__cypress/iframes/integration/test.js 200 6.710 ms - 709
(node:2412) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
HEAD / 500 4527.223 ms - -
HEAD / 500 4537.110 ms - -
HEAD / 500 4543.925 ms - -
- platform Win 10, VS Code (Terminal is Git Bash),
- expected behavior to show at least the cypress logs
- actual behavior
On
cypress openornpm run test:e2e, clicking the spec -> chrome opens, not showing anything but “waiting on localhost”. Then after quite a while stops with “not tests found”
Additional Information: fresh install with vue-cli 3, intro examples from docs also don’t work, test.js
import mountVue from 'cypress-vue-unit-test';
import HelloWorld from '../../../src/components/HelloWorld.vue';
describe('HelloWorld', () => {
beforeEach(mountVue(HelloWorld));
describe('clicking the save button', () => {
let spy;
beforeEach(() => {
spy = cy.spy();
Cypress.vue.$on('save', spy);
cy.get("[data-test='messageText']")
.type('New message');
cy.get("[data-test='saveButton']")
.click();
});
it('clears the text field', () => {
cy.get("[data-test='messageText']")
.should('have.value', '');
});
it('emits the "save" event', () => {
expect(spy).to.have.been.calledWith('New message');
});
});
});
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Troubleshooting - Vue CLI
This document covers some common Vue CLI issues and how to resolve them. You should always follow these steps before opening a new...
Read more >Install Vue CLI and create a project in Vue 3 | TSH.io
Install Vue CLI and make it much easier to start and manage new Vue projects. Learn how to create new Vue CLI project....
Read more >A Beginner's Guide to Vue CLI - SitePoint
I'll demonstrate how to install the latest version of Vue CLI and how to create, serve and build an example project. Want to...
Read more >Vue cli 3 hot reload suddenly not working in browsers
I have a Vue project generated by the Vue cli 3 and my hot reloading suddenly stopped working in my browsers. Changes made...
Read more >Creating Your First Vue 3 Project - A Vue Tutorial - LearnVue
First, we have to make sure that we have the most up-to-date version of the Vue CLI and we can do that by...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I think I solved it:
from https://learntdd.in/vue/
on the file tests/e2e/plugins/index.js
Then run “yarn test:e2e” again and component tests should work…
@sebastianjung you have to add a css loader in the webpack config to properly compile them.
Check out the vue-loader documentation for more info.