sand4rt / playwright-ct-web

Playwright Web component testing.
https://www.npmjs.com/package/@sand4rt/experimental-ct-web
MIT License
41 stars 3 forks source link

does it support older version of @playwright/test? #1

Closed normanlei0901 closed 1 year ago

normanlei0901 commented 1 year ago

@sand4rt my project is using @playwright/test:1.23.2 across the whole project, wonder if it works compatibly. If not, what is the version required? thanks

sand4rt commented 1 year ago

Good question, will get back to it but v1.29.1 works for sure.

sand4rt commented 1 year ago

Ran the test on v1.23.2 and it works as expected. Doesn't work on your end? Did you run npx playwright install?

normanlei0901 commented 1 year ago

@sand4rt thanks for your prompt updates. I am not able to have it running successfully even for this repo. is there any step instruction to run ct-web-lit specifically? thanks `> ct-web-lit@0.0.0 test

npx playwright test

Running 0 tests using 0 workers Error: src/tests.spec.ts:2:1: Playwright Test did not expect test() to be called here. Most common reasons include:

================= no tests found. =================`

sand4rt commented 1 year ago

Did you installed the packages with pnpm install and the tests with pnpm run test?

normanlei0901 commented 1 year ago

@sand4rt 1.23.1 seems like it was not working for me. and realized @sand4rt/experimental-ct-web is integrated with 1.29.1 automatically.

image
normanlei0901 commented 1 year ago

one more question: is Playwright going to support lit-element purely? Seems like its entry point is vite for this package

sand4rt commented 1 year ago

@sand4rt 1.23.1 seems like it was not working for me. and realized @sand4rt/experimental-ct-web is integrated with 1.29.1 automatically.

image

What is not working? Do you get any errors?

sand4rt commented 1 year ago

one more question:

is Playwright going to support lit-element purely? Seems like its entry point is vite for this package

The tests projects are created with Vite however Vite is not required

normanlei0901 commented 1 year ago

getting below error:

image
normanlei0901 commented 1 year ago

thanks, btw, is there any workersRollupPlugin related support?

sand4rt commented 1 year ago

@normanlei0901 you need at least version 1.28.0 of @playwright/test. Could you retry it with v1.0.2?

sand4rt commented 1 year ago

thanks, btw, is there any workersRollupPlugin related support?

Not exactly sure what workersRollupPlugin is? Playwright does have support for Vite plugins: https://playwright.dev/docs/test-components#q-how-can-i-use-vite-plugins

normanlei0901 commented 1 year ago

thanks, btw, is there any workersRollupPlugin related support?

Not exactly sure what workersRollupPlugin is? Playwright does have support for Vite plugins: https://playwright.dev/docs/test-components#q-how-can-i-use-vite-plugins

I am getting below error while testing the component which is using web workers under the hood. Per my understanding, we might need some related plugin to rollup the web workers with component in order to component test it. Any idea? thanks [vite:worker-import-meta-url] Could not resolve entry module "src/worker/.worker.js".

sand4rt commented 1 year ago

Do you have an example Github repo which i can look at?

sand4rt commented 1 year ago

@normanlei0901 i'm closing this one. Feel free to open a new ticket when needed.

davidenke commented 1 year ago

The tests projects are created with Vite however Vite is not required

@sand4rt just a question, as the plugin is loaded in ct-web, how can one opt-out of Vite?

sand4rt commented 1 year ago

@davidenke Could you create a separate ticket/feature request for that? Would like to know the reason.