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

Failing Playwright component test in JIT mode #409

Closed
2 tasks
sand4rt opened this issue May 21, 2023 · 4 comments
Closed
2 tasks

Failing Playwright component test in JIT mode #409

sand4rt opened this issue May 21, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@sand4rt
Copy link
Contributor

sand4rt commented May 21, 2023

Please provide the environment you discovered this bug in.

  1. Clone the PR: https://github.com/sand4rt/playwright-ct-angular/pull/4
  2. Install packages: pnpm i
  3. Run tests: pnpm run test

Which area/package is the issue in?

vite-plugin-angular

Description

I have a failing test that works in AOT mode but fails in JIT mode: https://github.com/sand4rt/playwright-ct-angular/blob/main/ct-angular/tests/angular-router.spec.ts#L5

What is special about this test is that the router is registered in: https://github.com/sand4rt/playwright-ct-angular/blob/main/ct-angular/playwright/index.ts#L18. The index.ts file is imported with a script tag in: https://github.com/sand4rt/playwright-ct-angular/blob/main/ct-angular/playwright/index.html#L10

Please provide the exception or error you saw

NG0304: 'router-outlet' is not a known element (used in the 'AppComponent' component template):
1. If 'router-outlet' is an Angular component, then verify that it is included in the '@Component.imports' of this component.
2. If 'router-outlet' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@Component.schemas' of this component to suppress this message.

Other information

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No
@brandonroberts
Copy link
Member

@sand4rt is this still an issue?

@sand4rt
Copy link
Contributor Author

sand4rt commented Sep 5, 2023

Yeah still an issue. Also tried to debug it but without success :/

@brandonroberts
Copy link
Member

I think this has been resolved in Angular v16.x. The example in your repo is still on v16. Have you tried it with an Angular v16 project?

@brandonroberts
Copy link
Member

Closing as resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants