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

[Feature]: @puppeteer/ng-schematics:builder should support setting tsconfig.json, using path aliases, replacing environment.ts and not starting the dev-server #12222

Open
pfeileon opened this issue Apr 5, 2024 · 2 comments

Comments

@pfeileon
Copy link

pfeileon commented Apr 5, 2024

Feature description

  • Right now the path to the tsconfig.json is hard-coded to e2e/tsconfig.json and cannot be set via "options": { "tsconfig": "path/to/tsconfig.json" } which forces you to use the same folder structure and the same filename (I personally would prefer to rename the config to tsconfig.e2e.json).

  • TS path aliases are not replaced right now, so you cannot use an import like import { environment } from '@env/environment.ci'.

  • Replacing the environment.ts file isn't working, nothing is replaced. This makes it awkward to use ng e2e locally and in a CI environment. Normally you'd call something like npm run e2e:ci in your pipeline which would run ng e2e --configuration ci and locally you'd simply run npm run e2e/ng e2e.

  • It's impossible to run ng e2e in a CI environment without also pointlessly starting the dev-server.

@pfeileon pfeileon changed the title [Feature] :@puppeteer/ng-schematics should support setting tsconfig.json, replacing environment.ts and not starting the dev-server [Feature] :@puppeteer/ng-schematics:builder should support setting tsconfig.json, using path aliases, replacing environment.ts and not starting the dev-server Apr 5, 2024
@pfeileon pfeileon changed the title [Feature] :@puppeteer/ng-schematics:builder should support setting tsconfig.json, using path aliases, replacing environment.ts and not starting the dev-server [Feature]: @puppeteer/ng-schematics:builder should support setting tsconfig.json, using path aliases, replacing environment.ts and not starting the dev-server Apr 5, 2024
@Lightning00Blade Lightning00Blade self-assigned this Apr 8, 2024
@Lightning00Blade
Copy link
Collaborator

@pfeileon Could you elaborate on the last point

It's impossible to run ng e2e in a CI environment without also pointlessly starting the dev-server.

What's your use case and why do you deem the starting of the server "pointless"?

@pfeileon
Copy link
Author

pfeileon commented Apr 8, 2024

@pfeileon Could you elaborate on the last point

It's impossible to run ng e2e in a CI environment without also pointlessly starting the dev-server.

What's your use case and why do you deem the starting of the server "pointless"?

Sure. :)
When running the e2e tests locally, it's practical to use the dev-server, of course. But when running the tests in a CI environment they should be running against real instances of the app which is why replacing the environment.ts-file is in this feature request as, well. In this case the dev-server is running for no reason because puppeteer is navigating to the staging or production environment, etc. and not to localhost.

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

No branches or pull requests

3 participants