-
-
Notifications
You must be signed in to change notification settings - Fork 315
Add Playwright CT CSS fixture and update entry patterns #1252
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR resolves #1213 by restructuring the Playwright Component Testing (CT) plugin configuration to properly handle entry patterns and adds CSS file support.
- Moves
playwright/index.{ts,js}from config patterns to entry patterns in playwright-ct plugin - Adds CSS fixture support with a new test case demonstrating CSS file usage
- Updates test expectations to reflect the additional file being processed
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/knip/src/plugins/playwright-ct/index.ts | Moves playwright/index files from config to entry patterns and removes shared entry import |
| packages/knip/src/plugins/playwright/index.ts | Makes entry pattern internal to prevent shared usage |
| packages/knip/test/plugins/playwright-ct.test.ts | Updates test counter to account for additional processed file |
| packages/knip/fixtures/plugins/playwright-ct/playwright/index.tsx | Enables CSS import to test new functionality |
| packages/knip/fixtures/plugins/playwright-ct/playwright/common.css | Adds CSS fixture for testing |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
commit: |
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Chanakorn! Let's make this happen.
| @@ -1,2 +1,2 @@ | |||
| // Import styles, initialize component theme here. | |||
| // import '../src/common.css'; | |||
| import './common.css'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh interesting this was already here 😅
| @@ -1,6 +1,6 @@ | |||
| import type { IsPluginEnabled, Plugin } from '../../types/config.js'; | |||
| import { hasDependency } from '../../util/plugin.js'; | |||
| import { entry, resolveConfig } from '../playwright/index.js'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could still re-use this entry I guess?
|
|
||
| assert.deepEqual(counters, { | ||
| ...baseCounters, | ||
| files: 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not expect this change. Maybe it's because this fixture does not have a .css compiler installed? What's the file being flagged as unused here?
Resolve #1213
playwright/indexinto playwright-ct entry