qwikifiers / qwik-nx

Nx plugin for Qwik
132 stars 24 forks source link

Modifiy cyrpess generator #124

Open shairez opened 1 year ago

shairez commented 1 year ago

When cypress configures an app for component testing, it adds these 3 files under the support folder:

https://github.com/qwikifiers/qwik-ui/tree/main/packages/headless/cypress/support

and add the following configuration to the cypress..config.ts - https://github.com/qwikifiers/qwik-ui/blob/main/packages/headless/cypress.config.ts#L6

Then we (currently manually) do the following steps:

  1. Add the addQwikLoader() - https://github.com/qwikifiers/qwik-ui/blob/main/packages/headless/cypress/support/component.ts#L18

  2. Add the mount command (this line all the way to the bottom of the file) -

https://github.com/qwikifiers/qwik-ui/blob/main/packages/headless/cypress/support/component.ts#L28

intellix commented 1 year ago

Is it possible to generate a cypress project? When running the e2e-project generator it uses playwright and other than that I don't see anything particular to Cypress: https://github.com/qwikifiers/qwik-nx/blob/main/packages/qwik-nx/generators.json#L48

dmitry-stepanenko commented 1 year ago

@intellix you should be able to use it with the --e2eTestRunner=cypress flag