Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jest running e2e Cypress tests #771

Closed
noahbornstein opened this issue Feb 3, 2018 · 0 comments
Closed

Jest running e2e Cypress tests #771

noahbornstein opened this issue Feb 3, 2018 · 0 comments

Comments

@noahbornstein
Copy link

Version

3.0.0-alpha.7

Reproduction link

https://github.com/noahbornstein/vue-cli-jest-cypress

Steps to reproduce

$ npm run test

For reference, here was the setup:

Vue CLI v3.0.0-alpha.7
? Please pick a preset: Manually select features
? Check the features needed for your project: Router, Vuex, CSS Pre-processors, Linter, Unit,
 E2E
? Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): 
LESS
? Pick a linter / formatter config: Airbnb
? Pick additional lint features: Lint and fix on commit
? Pick a unit testing solution: Jest
? Pick a E2E testing solution: Cypress
? Where do you prefer placing config for Babel, PostCSS, ESLint, etc.? In dedicated config fi
les
? Save this as a preset for future projects? No

What is expected?

$ npm run test should run unit tests

What is actually happening?

$ npm run test also ran e2e tests


Might want to re-open issue #740.

Also, during installation, there were 10 errors from the e2e directory:

...
https://on.cypress.io/installing-cypress
added 1698 packages in 60.584s

🚀  Invoking generators...
📦  Installing additional dependencies...

added 87 packages, updated 1 package and moved 2 packages in 15.388s

⠋  Running completion hooks...error: Assignment to property of function parameter 'config' (no-param-reassign) at baloonr-vue/test/e2e/plugins/index.js:4:3:
  2 | 
  3 | module.exports = (on, config) => {
> 4 |   config.fixturesFolder = 'test/e2e/fixtures';
    |   ^
  5 |   config.integrationFolder = 'test/e2e/specs';
  6 |   config.screenshotsFolder = 'test/e2e/screenshots';
  7 |   config.videosFolder = 'test/e2e/videos';


error: Assignment to property of function parameter 'config' (no-param-reassign) at baloonr-vue/test/e2e/plugins/index.js:5:3:
  3 | module.exports = (on, config) => {
  4 |   config.fixturesFolder = 'test/e2e/fixtures';
> 5 |   config.integrationFolder = 'test/e2e/specs';
    |   ^
  6 |   config.screenshotsFolder = 'test/e2e/screenshots';
  7 |   config.videosFolder = 'test/e2e/videos';
  8 |   config.supportFile = 'test/e2e/support/index.js';


error: Assignment to property of function parameter 'config' (no-param-reassign) at baloonr-vue/test/e2e/plugins/index.js:6:3:
  4 |   config.fixturesFolder = 'test/e2e/fixtures';
  5 |   config.integrationFolder = 'test/e2e/specs';
> 6 |   config.screenshotsFolder = 'test/e2e/screenshots';
    |   ^
  7 |   config.videosFolder = 'test/e2e/videos';
  8 |   config.supportFile = 'test/e2e/support/index.js';
  9 |   return config;


error: Assignment to property of function parameter 'config' (no-param-reassign) at baloonr-vue/test/e2e/plugins/index.js:7:3:
   5 |   config.integrationFolder = 'test/e2e/specs';
   6 |   config.screenshotsFolder = 'test/e2e/screenshots';
>  7 |   config.videosFolder = 'test/e2e/videos';
     |   ^
   8 |   config.supportFile = 'test/e2e/support/index.js';
   9 |   return config;
  10 | };


error: Assignment to property of function parameter 'config' (no-param-reassign) at baloonr-vue/test/e2e/plugins/index.js:8:3:
   6 |   config.screenshotsFolder = 'test/e2e/screenshots';
   7 |   config.videosFolder = 'test/e2e/videos';
>  8 |   config.supportFile = 'test/e2e/support/index.js';
     |   ^
   9 |   return config;
  10 | };
  11 | 


error: 'describe' is not defined (no-undef) at baloonr-vue/test/e2e/specs/test.js:3:1:
  1 | // https://docs.cypress.io/api/introduction/api.html
  2 | 
> 3 | describe('My First Test', () => {
    | ^
  4 |   it('Visits the Kitchen Sink', () => {
  5 |     cy.visit(Cypress.env('VUE_DEV_SERVER_URL'));
  6 |     cy.contains('h1', 'Welcome to Your Vue.js App');


error: 'it' is not defined (no-undef) at baloonr-vue/test/e2e/specs/test.js:4:3:
  2 | 
  3 | describe('My First Test', () => {
> 4 |   it('Visits the Kitchen Sink', () => {
    |   ^
  5 |     cy.visit(Cypress.env('VUE_DEV_SERVER_URL'));
  6 |     cy.contains('h1', 'Welcome to Your Vue.js App');
  7 |   });


error: 'cy' is not defined (no-undef) at baloonr-vue/test/e2e/specs/test.js:5:5:
  3 | describe('My First Test', () => {
  4 |   it('Visits the Kitchen Sink', () => {
> 5 |     cy.visit(Cypress.env('VUE_DEV_SERVER_URL'));
    |     ^
  6 |     cy.contains('h1', 'Welcome to Your Vue.js App');
  7 |   });
  8 | });


error: 'Cypress' is not defined (no-undef) at baloonr-vue/test/e2e/specs/test.js:5:14:
  3 | describe('My First Test', () => {
  4 |   it('Visits the Kitchen Sink', () => {
> 5 |     cy.visit(Cypress.env('VUE_DEV_SERVER_URL'));
    |              ^
  6 |     cy.contains('h1', 'Welcome to Your Vue.js App');
  7 |   });
  8 | });


error: 'cy' is not defined (no-undef) at baloonr-vue/test/e2e/specs/test.js:6:5:
  4 |   it('Visits the Kitchen Sink', () => {
  5 |     cy.visit(Cypress.env('VUE_DEV_SERVER_URL'));
> 6 |     cy.contains('h1', 'Welcome to Your Vue.js App');
    |     ^
  7 |   });
  8 | });
  9 | 


10 errors found.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant