You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using vue-cli-service test:e2e a development server is started and the cypress config value baseUrl is overridden with the address of the development server. Passing the --url argument will stop the development server from starting, but still overrides the baseUrl config value.
It would be useful to be able to pass an option to NOT start the development server, but leave the baseUrl config value unchanged. The option could be --remote or similar.
The desired end user experience is this:
Maintainer sets test:e2e script in package.json to read vue-cli-service test:e2e --remote
User sets desired target server URL in cypress.json config file
User runs npm run test:e2e with no need for additional parameters
Cypress starts WITHOUT a development server, and correctly targets the specified server
Currently the baseUrl value is always overriden, unless the user specifies one, e.g.
npm run test:e2e -- --url <url>,
which is not clear to the user. It is not desirable to hard code a URL into package.json, as different users may require different target servers. When looking at the Cypress docs for information on changing the target URL, it directs you to change the baseUrl in cypress.json, and the user will then be confused that this does not work, not knowing that the value is being overriden by either vue-cli-service if no --url value is passed, or package.json if one is hardcoded there.
What does the proposed API look like?
Add additional option '--remote' or similar to command 'vue-cli-service test:e2e' to instruct it NOT to start a development server, and use the baseUrl value as specified in cypress.json (the default expected behaviour)
The text was updated successfully, but these errors were encountered:
I am not sure if a --remote flag would be the best idea, probably an additional flag is not needed, but I completely agree with @ajewers about the expected behavior being to be able to overwrite this on cypress.json or cypress.env.json.
I think a good first step would be to make this a bit more explicit on the documentation.
What problem does this feature solve?
When using vue-cli-service test:e2e a development server is started and the cypress config value baseUrl is overridden with the address of the development server. Passing the --url argument will stop the development server from starting, but still overrides the baseUrl config value.
It would be useful to be able to pass an option to NOT start the development server, but leave the baseUrl config value unchanged. The option could be --remote or similar.
The desired end user experience is this:
test:e2e
script in package.json to readvue-cli-service test:e2e --remote
npm run test:e2e
with no need for additional parametersCurrently the baseUrl value is always overriden, unless the user specifies one, e.g.
npm run test:e2e -- --url <url>
,which is not clear to the user. It is not desirable to hard code a URL into package.json, as different users may require different target servers. When looking at the Cypress docs for information on changing the target URL, it directs you to change the baseUrl in cypress.json, and the user will then be confused that this does not work, not knowing that the value is being overriden by either vue-cli-service if no --url value is passed, or package.json if one is hardcoded there.
What does the proposed API look like?
Add additional option '--remote' or similar to command 'vue-cli-service test:e2e' to instruct it NOT to start a development server, and use the baseUrl value as specified in cypress.json (the default expected behaviour)
The text was updated successfully, but these errors were encountered: