-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add support for Angular 17 #5
Conversation
…emitter-outputs Handle angular non-EventEmitter outputs
docs(ct): angular
Co-authored-by: Edouard Bozon <bozonedouard@gmail.com>
…analogjs plugin Co-authored-by: Edouard Bozon <bozonedouard@gmail.com>
Co-authored-by: Edouard Bozon <bozonedouard@gmail.com>
b794edd
to
e024fba
Compare
@sand4rt I fixed everything yesterday. One last thing is that |
You can rename the |
Thanks @brandonroberts! The thing is that it generates We'll probably have to move this to an issue on the analog repo. |
Yes, Vite is moving away from CJS altogether. There are deprecation warnings from Vite when its CJS APIs are used. We can discuss options in the Analog repo if needed. |
Angular's esbuild plugin will automatically add it in jit mode anyway. Users who really want to use another plugin that requires it can still add it manually to their playwright/index.ts.
Hi ! Can I help move this forward ? I have a large project where I was hoping I could start using this - which uses standalone components with angular 17.3.1 |
chore(ct): revert adapters imports and template
* feat(ct): angular component testing * test(ct): test non-event-emitter outputs * test(ct): test output listener replacement * feat(ct): support non-event-emitter outputs * docs(ct): angular * fix(ct): angular source maps * chore(ct): new angular logo * refactor(ct-angular): bump to Angular 17 and move out analogjs plugin Co-authored-by: Edouard Bozon <bozonedouard@gmail.com> * refactor(ct-angular): fix component resolution by temporary removing analogjs plugin Co-authored-by: Edouard Bozon <bozonedouard@gmail.com> * refactor(ct-angular): fix mount Co-authored-by: Edouard Bozon <bozonedouard@gmail.com> * refactor(ct-angular): disable analog plugin as it breaks component registration * refactor(ct-angular): fix input forwarding * refactor(ct-angular): fix angular outputs * refactor(ct-angular): fix angular slots * test(ct-angular): fix all tests * test(ct-angular): fix all angular tests * test(ct-angular): use analog's vite plugin to handle template files * refactor(ct-angular): remove router-specific code * refactor(ct-angular): clean up dependencies * refactor(ct-angular): remove compiler import * refactor(ct-angular): fix vite version mismatch in tests * refactor(ct-angular): bump @playwright/experimental-ct-angular to 1.42.0-next * test(ct-angular): add tests for template rendering * feat(ct-angular): render simple template * feat(ct-angular): render template with child components * feat(ct-angular): render component with signal inputs * test(ct-angular): make input required * test(ct-angular): remove now useless import * feat(ct-angular): allow setting providers * refactor(ct-angular): clean up slots remains * feat(ct): angular component testing * test(ct): test non-event-emitter outputs * test(ct): test output listener replacement * feat(ct): support non-event-emitter outputs * fix(ct): angular source maps * docs(ct): angular * chore(ct): new angular logo * feat(ct-angular): add pw-angular bin * test(ct-angular): fix type check use strict dependencies versions to reduce unpredictable behavior as package-lock.json is gitignored * refactor(ct-angular): remove useless NODE_ENV=test as we are setting the tsconfig manually Cf. #5 (comment) * refactor(ct-angular): use playwright.config.mts as analog vite plugin is esm only * chore(ct-angular): lint * fix(ct-angular): resolve Angular component usages * fix(ct-angular): resolve Angular imports/providers usages * test(ct-angular): test url change * test(ct-angular): remove duplicate test * chore(ct-angular): remove useless pw-angular cli * chore(ct-angular): remove duplicate PlaywrightTestConfig type * feat(ct-angular): export the right types * chore(ct-angular): tidy up * feat(ct-angular): throw an explicit error when mounting JSX * chore(ct-angular): remove vite from devDependencies as not used anymore * chore(ct-angular): remove useless skipLibCheck flag * chore(ct-angular): remove useless @angular/compiler Angular's esbuild plugin will automatically add it in jit mode anyway. Users who really want to use another plugin that requires it can still add it manually to their playwright/index.ts. * test(ct-angular): improve output listener update test * chore(ct): revert adapters imports and template --------- Co-authored-by: sand4rt <info@mesander.com> Co-authored-by: Edouard Bozon <bozonedouard@gmail.com>
* feat(ct): angular component testing * test(ct): test non-event-emitter outputs * test(ct): test output listener replacement * feat(ct): support non-event-emitter outputs * docs(ct): angular * fix(ct): angular source maps * chore(ct): new angular logo * refactor(ct-angular): bump to Angular 17 and move out analogjs plugin Co-authored-by: Edouard Bozon <bozonedouard@gmail.com> * refactor(ct-angular): fix component resolution by temporary removing analogjs plugin Co-authored-by: Edouard Bozon <bozonedouard@gmail.com> * refactor(ct-angular): fix mount Co-authored-by: Edouard Bozon <bozonedouard@gmail.com> * refactor(ct-angular): disable analog plugin as it breaks component registration * refactor(ct-angular): fix input forwarding * refactor(ct-angular): fix angular outputs * refactor(ct-angular): fix angular slots * test(ct-angular): fix all tests * test(ct-angular): fix all angular tests * test(ct-angular): use analog's vite plugin to handle template files * refactor(ct-angular): remove router-specific code * refactor(ct-angular): clean up dependencies * refactor(ct-angular): remove compiler import * refactor(ct-angular): fix vite version mismatch in tests * refactor(ct-angular): bump @playwright/experimental-ct-angular to 1.42.0-next * test(ct-angular): add tests for template rendering * feat(ct-angular): render simple template * feat(ct-angular): render template with child components * feat(ct-angular): render component with signal inputs * test(ct-angular): make input required * test(ct-angular): remove now useless import * feat(ct-angular): allow setting providers * refactor(ct-angular): clean up slots remains * feat(ct): angular component testing * test(ct): test non-event-emitter outputs * test(ct): test output listener replacement * feat(ct): support non-event-emitter outputs * fix(ct): angular source maps * docs(ct): angular * chore(ct): new angular logo * feat(ct-angular): add pw-angular bin * test(ct-angular): fix type check use strict dependencies versions to reduce unpredictable behavior as package-lock.json is gitignored * refactor(ct-angular): remove useless NODE_ENV=test as we are setting the tsconfig manually Cf. #5 (comment) * refactor(ct-angular): use playwright.config.mts as analog vite plugin is esm only * chore(ct-angular): lint * fix(ct-angular): resolve Angular component usages * fix(ct-angular): resolve Angular imports/providers usages * test(ct-angular): test url change * test(ct-angular): remove duplicate test * chore(ct-angular): remove useless pw-angular cli * chore(ct-angular): remove duplicate PlaywrightTestConfig type * feat(ct-angular): export the right types * chore(ct-angular): tidy up * feat(ct-angular): throw an explicit error when mounting JSX * chore(ct-angular): remove vite from devDependencies as not used anymore * chore(ct-angular): remove useless skipLibCheck flag * chore(ct-angular): remove useless @angular/compiler Angular's esbuild plugin will automatically add it in jit mode anyway. Users who really want to use another plugin that requires it can still add it manually to their playwright/index.ts. * test(ct-angular): improve output listener update test * chore(ct): revert adapters imports and template --------- Co-authored-by: sand4rt <info@mesander.com> Co-authored-by: Edouard Bozon <bozonedouard@gmail.com>
@edbzn and I upgraded
@playwright/experimental-angular-ct
to fix the items below and make it work with the latest version of Playwright.(the PR looks big because we updated it with playwright's main branch. Updating the target branch should make it more readable 😉)
WrapperComponent
makes it harder to set the child inputs properly usingComponentRef
)typeof plugin.default
check: https://github.com/microsoft/playwright/pull/27783/files#diff-4592ac823d44ec894c518ba459cfab4bd544056a674739fda5fc145cdc596923R28@analogjs/vite-plugin-angular
and related code and move it tocreate-playwright
feat(ct): angular component testing #27783 (comment)