-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[BUG] Component test. Type error when extending fixture - ComponentFixtures
is not exported and cannot be named
#15352
Comments
@pavelfeldman could you please take a look? |
@pashidlos I ran: git clone https://github.com/pashidlos/pw-component-test-example
git checkout import-interface
yarn
yarn test-ct and the test passed just fine. |
@pavelfeldman try running
|
Here is what I see: yarn run v1.22.18
$ /home/pfeldman/tmp/pw-component-test-example/node_modules/.bin/tsc
node_modules/@visual-regression-tracker/agent-playwright/dist/playwrightVisualRegressionTracker.d.ts:2:37 - error TS2307: Cannot find module 'playwright' or its corresponding type declarations.
2 import { Page, ElementHandle } from "playwright";
~~~~~~~~~~~~
src/component_tests/Fixture.ts:8:14 - error TS4023: Exported variable 'componentTest' has or is using name 'ComponentFixtures' from external module "/home/pfeldman/tmp/pw-component-test-example/node_modules/@playwright/experimental-ct-react/index" but cannot be named.
8 export const componentTest = base.extend<Fixture>({ First issue should be fixed in import { Page, ElementHandle } from "playwright-core"; Second seems to be related to TS's inability to re-export implicit types: microsoft/TypeScript#9944. I'll see if we can export internal type to mitigate it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Context:
Code Snippet
https://github.com/pashidlos/pw-component-test-example/blob/import-interface/src/component_tests/Fixture.ts
Describe the bug
The text was updated successfully, but these errors were encountered: