16 Commits

Author SHA1 Message Date
Leosvel Pérez Espinosa
5feafd64d4
feat(testing): add support for cypress v14 (#30618)
## Current Behavior

Cypress v14 is not supported.

## Expected Behavior

Cypress v14 is supported.

## Related Issue(s)

Fixes #30097
2025-04-09 17:12:39 -04:00
Jack Hsu
1e032fb9e5
fix(misc): update e2e config generators to align with new TS solution setup (#29638)
This PR updates the `@nx/detox:app` generator to match the new TS
solution setup. The `@nx/cypress:configuration` and
`@nx/cypress:configuration` generators are also updated so that they can
be run on existing projects and generator the correct tsconfig files.

The Playwright/Cypress example can be seen as follows:

```shell
# Skip e2e
nx g @nx/react:app apps/demo --bundler vite --e2eTestRunner none

# now configure e2e
nx g @nx/playwright --project demo
```

Now if you add this line to `apps/demo/e2e/example.spec.ts`:
```
const x: number = 'a';
```

And run `nx typecheck demo`, it will pass. This happens because the
`e2e/**/*.ts` pattern is missing. Thus, we need to ensure that a
`tsconfig.e2e.json` project is added for the Playwright spec files. Same
thing with Cypress.

The Detox generator does not support adding configuration to existing
project, so we don't quite get the same problem. The fix for Detox is
just to make sure the tsconfig content is not following the old
(integrated) version, but the updated TS solution version.

## Current Behavior
Detox TS setup is incorrect. Running Cypress and Playwright
configuration generator on existing projects generate invalid setup,
such that spec files are not typechecked.

## Expected Behavior
E2E generators should all generate correct TS setup.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2025-01-16 13:10:34 -05:00
Leosvel Pérez Espinosa
f922e2bcf0
fix(misc): fix misc generation issues with the ts solution setup (#29350)
Fix misc generation issues related to the new TS solution setup:

- Improve Cypress config default formatting (when no prettier)
- Remove leftover compiler options from `tsconfig.json` files
- Do not add TS path mappings
- Update `outDir` for `typecheck` tasks to be `out-tsc/...`
- Generate Nx configuration in `package.json` files for e2e test runner
projects
- Fix issue with `@nx/js:library` and `--bundler=vite`
- Other smaller changes

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2024-12-16 16:23:50 +00:00
Jason Jean
bf206e578e
feat(misc): non conflicting init/add flow (#22791) 2024-04-15 16:45:08 -04:00
Katerina Skroumpelou
5971ae17f6
fix(misc): make sure to add e2e crystal plugin (#22041) 2024-02-29 16:54:07 +02:00
Leosvel Pérez Espinosa
ca3965fcf3
fix(angular): do not force explicit targets for separate e2e projects (#21865) 2024-02-20 15:57:28 +01:00
Leosvel Pérez Espinosa
5b6d1b4017
feat(angular): force explicit targets when NX_ADD_PLUGINS is not explicitly true (#21852)
Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-02-16 17:42:51 -05:00
Jason Jean
396ffc4636
feat(core): enable project crystal by default (#21403)
Co-authored-by: Katerina Skroumpelou <sk.katherine@gmail.com>
Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
Co-authored-by: Colum Ferry <cferry09@gmail.com>
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Co-authored-by: Emily Xiong <xiongemi@gmail.com>
Co-authored-by: Nicholas Cunningham <ndcunningham@gmail.com>
2024-02-02 03:40:59 -05:00
Jack Hsu
79648bc484
fix(testing): add support for generating and loading cypress config in ESM format (#21471) 2024-02-01 17:29:08 -05:00
Remco Krams
e4b1ab6c61
fix(testing): fix config references to js files (#21018) 2024-01-31 18:45:48 +02:00
Jason Jean
c2be2ade1a
fix(testing): add webServerCommands/ciWebServerCommands option for cy… (#20616) 2023-12-07 16:10:17 -05:00
Jason Jean
78ab39b895
feat(testing): allow cypress preset to execute a command for a web server (#20355) 2023-11-27 13:30:01 -05:00
Jason Jean
a86d926612
feat(testing): add cypress create nodes plugin (#19840) 2023-11-09 14:05:19 -05:00
Jack Hsu
b5ed979b90
feat(misc): remove usages of @nx/cypress:cypress-project internally (#19766) 2023-10-24 21:04:15 -04:00
Miroslav Jonaš
e34219ab96
feat(linter): add flat config support to generators (#18534) 2023-08-23 01:36:58 +02:00
Jack Hsu
9940a0c544
feat(testing): renamed cypress-e2e-configuration to configuration to maintain consistency between plugins (#17998) 2023-07-07 12:43:29 -04:00