vue-cli icon indicating copy to clipboard operation
vue-cli copied to clipboard

--url option is not working for plugin cli-plugin-e2e-cypress

Open ness-EE opened this issue 8 years ago • 5 comments

Version

3.0.3

Node and OS info

node 8.9.4", npm 6.2.0", Windows 10 (Platform: win32 (10.0.17134))

Steps to reproduce

  1. Set up a Vue CLI application that uses an external local dev server like IIS (not through npm run serve)
  2. Add cypress e2e test supported by VueCLI
  3. Add "test:e2e": "vue-cli-service test:e2e --url http://localhost:33333" to scripts in package.json
  4. Run npm run test:e2e

What is expected?

Cypress to run as normal, testing http://localhost:33333

What is actually happening?

I receive the following error:

Error: Command failed: C:\Users\...\node_modules\cypress\bin\cypress open --config baseUrl=http://localhost:33333

ness-EE avatar Sep 19 '18 17:09 ness-EE

Set up a Vue CLI application that uses an external local dev server like IIS (not through npm run serve)

So:

  1. that server is already running on port 33333 while you start cypress
  2. you tested it's reachable under that port
  3. And that server is actually serving your app when you tested 2.?
  4. ...and it fails as described above,
  5. while with a dev-server started manually through yarn serve, the --url option works? Or does it fail with that as well?

LinusBorg avatar Sep 19 '18 17:09 LinusBorg

Thanks for the swift response,

More info...

I've tried the above on a different set-up: Mac OS, node 10.7.0, npm 6.1.0 with the same versions of Vue CLI and all the plugins... using a remote url through --url works, so I'll close the issue.

ness-EE avatar Sep 19 '18 19:09 ness-EE

Well if this is a windows-related problem we might still be able to do something. But it might also be a Cypress bug.

LinusBorg avatar Sep 19 '18 19:09 LinusBorg

To... I found something that may or may not be useful: after clearing out node_modules etc... I re-installed everything. I was served the following message:

Cypress 3.1.0 is already installed in C:\Users\...\AppData\Local\Cypress\Cache\3.1.0

The error from the open command that comes from node_modules looks like this:

Command failed: C:\Users\...\node_modules\cypress\bin\cypress open --config baseUrl=http://localhost:33333/

Around the time this stopped working I updated from:

"@vue/cli-plugin-e2e-cypress": "^3.0.0-rc.7",

To:

"@vue/cli-plugin-e2e-cypress": "^3.0.3",

A funny thing about this project, though it shouldn't have a bearing on Cypress, is: we're not using npm run serve. We're building to dist and watching src. This is because our templates are served by an IIS server through x-template script tags, and, quite honestly, because I can't get the devServer proxy to work.

ness-EE avatar Sep 20 '18 10:09 ness-EE

This https://github.com/cypress-io/cypress/issues/5466 seems to be a root cause of the issue

irriss avatar Nov 10 '19 19:11 irriss