feat(testing): make playwright default e2e test runner option (#22511)

This commit is contained in:
Colum Ferry 2024-04-23 16:27:09 +01:00 committed by GitHub
parent 8ded3807ac
commit 739e2e7115
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
66 changed files with 163 additions and 163 deletions

View File

@ -75,7 +75,7 @@ Generate a Dockerfile for the Node API
Type: `string` Type: `string`
Choices: [cypress, playwright, none] Choices: [playwright, cypress, none]
Test runner to use for end to end (E2E) tests. Test runner to use for end to end (E2E) tests.

View File

@ -3,12 +3,12 @@
"githubRoot": "https://github.com/nrwl/nx/blob/master", "githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "angular", "name": "angular",
"packageName": "@nx/angular", "packageName": "@nx/angular",
"description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.", "description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, Playwright and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
"documents": { "documents": {
"/nx-api/angular/documents/overview": { "/nx-api/angular/documents/overview": {
"id": "overview", "id": "overview",
"name": "Overview", "name": "Overview",
"description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.", "description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, Playwright and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
"file": "generated/packages/angular/documents/overview", "file": "generated/packages/angular/documents/overview",
"itemList": [], "itemList": [],
"isExternal": false, "isExternal": false,
@ -19,7 +19,7 @@
"/nx-api/angular/documents/angular-nx-version-matrix": { "/nx-api/angular/documents/angular-nx-version-matrix": {
"id": "angular-nx-version-matrix", "id": "angular-nx-version-matrix",
"name": "Angular and Nx Version Matrix", "name": "Angular and Nx Version Matrix",
"description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.", "description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, Playwright and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
"file": "generated/packages/angular/documents/angular-nx-version-matrix", "file": "generated/packages/angular/documents/angular-nx-version-matrix",
"itemList": [], "itemList": [],
"isExternal": false, "isExternal": false,
@ -1410,12 +1410,12 @@
"githubRoot": "https://github.com/nrwl/nx/blob/master", "githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "next", "name": "next",
"packageName": "@nx/next", "packageName": "@nx/next",
"description": "The Next.js plugin for Nx contains executors and generators for managing Next.js applications and libraries within an Nx workspace. It provides:\n\n\n- Scaffolding for creating, building, serving, linting, and testing Next.js applications.\n\n- Integration with building, serving, and exporting a Next.js application.\n\n- Integration with React libraries within the workspace. \n\nWhen using Next.js in Nx, you get the out-of-the-box support for TypeScript, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work.", "description": "The Next.js plugin for Nx contains executors and generators for managing Next.js applications and libraries within an Nx workspace. It provides:\n\n\n- Scaffolding for creating, building, serving, linting, and testing Next.js applications.\n\n- Integration with building, serving, and exporting a Next.js application.\n\n- Integration with React libraries within the workspace. \n\nWhen using Next.js in Nx, you get the out-of-the-box support for TypeScript, Playwright, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work.",
"documents": { "documents": {
"/nx-api/next/documents/overview": { "/nx-api/next/documents/overview": {
"id": "overview", "id": "overview",
"name": "Overview", "name": "Overview",
"description": "The Next.js plugin for Nx contains executors and generators for managing Next.js applications and libraries within an Nx workspace. It provides:\n\n\n- Scaffolding for creating, building, serving, linting, and testing Next.js applications.\n\n- Integration with building, serving, and exporting a Next.js application.\n\n- Integration with React libraries within the workspace. \n\nWhen using Next.js in Nx, you get the out-of-the-box support for TypeScript, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work.", "description": "The Next.js plugin for Nx contains executors and generators for managing Next.js applications and libraries within an Nx workspace. It provides:\n\n\n- Scaffolding for creating, building, serving, linting, and testing Next.js applications.\n\n- Integration with building, serving, and exporting a Next.js application.\n\n- Integration with React libraries within the workspace. \n\nWhen using Next.js in Nx, you get the out-of-the-box support for TypeScript, Playwright, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work.",
"file": "generated/packages/next/documents/overview", "file": "generated/packages/next/documents/overview",
"itemList": [], "itemList": [],
"isExternal": false, "isExternal": false,
@ -1587,7 +1587,7 @@
"githubRoot": "https://github.com/nrwl/nx/blob/master", "githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "nuxt", "name": "nuxt",
"packageName": "@nx/nuxt", "packageName": "@nx/nuxt",
"description": "The Nuxt plugin for Nx contains executors and generators for managing Nuxt applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Cypress, and Storybook.\n\n- Generators for applications, libraries, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.", "description": "The Nuxt plugin for Nx contains executors and generators for managing Nuxt applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
"documents": { "documents": {
"/nx-api/nuxt/documents/overview": { "/nx-api/nuxt/documents/overview": {
"id": "overview", "id": "overview",
@ -2114,12 +2114,12 @@
"githubRoot": "https://github.com/nrwl/nx/blob/master", "githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "react", "name": "react",
"packageName": "@nx/react", "packageName": "@nx/react",
"description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.", "description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
"documents": { "documents": {
"/nx-api/react/documents/overview": { "/nx-api/react/documents/overview": {
"id": "overview", "id": "overview",
"name": "Overview", "name": "Overview",
"description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.", "description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
"file": "generated/packages/react/documents/overview", "file": "generated/packages/react/documents/overview",
"itemList": [], "itemList": [],
"isExternal": false, "isExternal": false,
@ -2517,12 +2517,12 @@
"githubRoot": "https://github.com/nrwl/nx/blob/master", "githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "remix", "name": "remix",
"packageName": "@nx/remix", "packageName": "@nx/remix",
"description": "The Remix plugin for Nx contains executors and generators for managing Remix applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Jest, Cypress, and Storybook.\n\n- Generators for applications, libraries, routes, loaders, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.", "description": "The Remix plugin for Nx contains executors and generators for managing Remix applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Jest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, routes, loaders, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
"documents": { "documents": {
"/nx-api/remix/documents/overview": { "/nx-api/remix/documents/overview": {
"id": "overview", "id": "overview",
"name": "Overview", "name": "Overview",
"description": "The Remix plugin for Nx contains executors and generators for managing Remix applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Jest, Cypress, and Storybook.\n\n- Generators for applications, libraries, routes, loaders, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.", "description": "The Remix plugin for Nx contains executors and generators for managing Remix applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Jest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, routes, loaders, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
"file": "generated/packages/remix/documents/overview", "file": "generated/packages/remix/documents/overview",
"itemList": [], "itemList": [],
"isExternal": false, "isExternal": false,
@ -2940,7 +2940,7 @@
"githubRoot": "https://github.com/nrwl/nx/blob/master", "githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "vue", "name": "vue",
"packageName": "@nx/vue", "packageName": "@nx/vue",
"description": "The Vue plugin for Nx contains executors and generators for managing Vue applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Cypress, and Storybook.\n\n- Generators for applications, libraries, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.", "description": "The Vue plugin for Nx contains executors and generators for managing Vue applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
"documents": { "documents": {
"/nx-api/vue/documents/overview": { "/nx-api/vue/documents/overview": {
"id": "overview", "id": "overview",
@ -3028,12 +3028,12 @@
"githubRoot": "https://github.com/nrwl/nx/blob/master", "githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "web", "name": "web",
"packageName": "@nx/web", "packageName": "@nx/web",
"description": "The Nx Plugin for Web Components contains generators for managing Web Component applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Cypress, and Storybook.\n\n- Scaffolding for creating buildable libraries that can be published to npm.\n\n- Utilities for automatic workspace refactoring.", "description": "The Nx Plugin for Web Components contains generators for managing Web Component applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Playwright, Cypress, and Storybook.\n\n- Scaffolding for creating buildable libraries that can be published to npm.\n\n- Utilities for automatic workspace refactoring.",
"documents": { "documents": {
"/nx-api/web/documents/overview": { "/nx-api/web/documents/overview": {
"id": "overview", "id": "overview",
"name": "Overview", "name": "Overview",
"description": "The Nx Plugin for Web Components contains generators for managing Web Component applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Cypress, and Storybook.\n\n- Scaffolding for creating buildable libraries that can be published to npm.\n\n- Utilities for automatic workspace refactoring.", "description": "The Nx Plugin for Web Components contains generators for managing Web Component applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Playwright, Cypress, and Storybook.\n\n- Scaffolding for creating buildable libraries that can be published to npm.\n\n- Utilities for automatic workspace refactoring.",
"file": "generated/packages/web/documents/overview", "file": "generated/packages/web/documents/overview",
"itemList": [], "itemList": [],
"isExternal": false, "isExternal": false,

View File

@ -1,11 +1,11 @@
[ [
{ {
"description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.", "description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, Playwright and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
"documents": [ "documents": [
{ {
"id": "overview", "id": "overview",
"name": "Overview", "name": "Overview",
"description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.", "description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, Playwright and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
"file": "generated/packages/angular/documents/overview", "file": "generated/packages/angular/documents/overview",
"itemList": [], "itemList": [],
"isExternal": false, "isExternal": false,
@ -16,7 +16,7 @@
{ {
"id": "angular-nx-version-matrix", "id": "angular-nx-version-matrix",
"name": "Angular and Nx Version Matrix", "name": "Angular and Nx Version Matrix",
"description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.", "description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, Playwright and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
"file": "generated/packages/angular/documents/angular-nx-version-matrix", "file": "generated/packages/angular/documents/angular-nx-version-matrix",
"itemList": [], "itemList": [],
"isExternal": false, "isExternal": false,
@ -1392,12 +1392,12 @@
"source": "/packages/nest/src" "source": "/packages/nest/src"
}, },
{ {
"description": "The Next.js plugin for Nx contains executors and generators for managing Next.js applications and libraries within an Nx workspace. It provides:\n\n\n- Scaffolding for creating, building, serving, linting, and testing Next.js applications.\n\n- Integration with building, serving, and exporting a Next.js application.\n\n- Integration with React libraries within the workspace. \n\nWhen using Next.js in Nx, you get the out-of-the-box support for TypeScript, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work.", "description": "The Next.js plugin for Nx contains executors and generators for managing Next.js applications and libraries within an Nx workspace. It provides:\n\n\n- Scaffolding for creating, building, serving, linting, and testing Next.js applications.\n\n- Integration with building, serving, and exporting a Next.js application.\n\n- Integration with React libraries within the workspace. \n\nWhen using Next.js in Nx, you get the out-of-the-box support for TypeScript, Playwright, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work.",
"documents": [ "documents": [
{ {
"id": "overview", "id": "overview",
"name": "Overview", "name": "Overview",
"description": "The Next.js plugin for Nx contains executors and generators for managing Next.js applications and libraries within an Nx workspace. It provides:\n\n\n- Scaffolding for creating, building, serving, linting, and testing Next.js applications.\n\n- Integration with building, serving, and exporting a Next.js application.\n\n- Integration with React libraries within the workspace. \n\nWhen using Next.js in Nx, you get the out-of-the-box support for TypeScript, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work.", "description": "The Next.js plugin for Nx contains executors and generators for managing Next.js applications and libraries within an Nx workspace. It provides:\n\n\n- Scaffolding for creating, building, serving, linting, and testing Next.js applications.\n\n- Integration with building, serving, and exporting a Next.js application.\n\n- Integration with React libraries within the workspace. \n\nWhen using Next.js in Nx, you get the out-of-the-box support for TypeScript, Playwright, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work.",
"file": "generated/packages/next/documents/overview", "file": "generated/packages/next/documents/overview",
"itemList": [], "itemList": [],
"isExternal": false, "isExternal": false,
@ -1567,7 +1567,7 @@
"source": "/packages/node/src" "source": "/packages/node/src"
}, },
{ {
"description": "The Nuxt plugin for Nx contains executors and generators for managing Nuxt applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Cypress, and Storybook.\n\n- Generators for applications, libraries, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.", "description": "The Nuxt plugin for Nx contains executors and generators for managing Nuxt applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
"documents": [ "documents": [
{ {
"id": "overview", "id": "overview",
@ -2090,12 +2090,12 @@
"source": "/packages/plugin/src" "source": "/packages/plugin/src"
}, },
{ {
"description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.", "description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
"documents": [ "documents": [
{ {
"id": "overview", "id": "overview",
"name": "Overview", "name": "Overview",
"description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.", "description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
"file": "generated/packages/react/documents/overview", "file": "generated/packages/react/documents/overview",
"itemList": [], "itemList": [],
"isExternal": false, "isExternal": false,
@ -2491,12 +2491,12 @@
"source": "/packages/react-native/src" "source": "/packages/react-native/src"
}, },
{ {
"description": "The Remix plugin for Nx contains executors and generators for managing Remix applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Jest, Cypress, and Storybook.\n\n- Generators for applications, libraries, routes, loaders, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.", "description": "The Remix plugin for Nx contains executors and generators for managing Remix applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Jest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, routes, loaders, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
"documents": [ "documents": [
{ {
"id": "overview", "id": "overview",
"name": "Overview", "name": "Overview",
"description": "The Remix plugin for Nx contains executors and generators for managing Remix applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Jest, Cypress, and Storybook.\n\n- Generators for applications, libraries, routes, loaders, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.", "description": "The Remix plugin for Nx contains executors and generators for managing Remix applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Jest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, routes, loaders, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
"file": "generated/packages/remix/documents/overview", "file": "generated/packages/remix/documents/overview",
"itemList": [], "itemList": [],
"isExternal": false, "isExternal": false,
@ -2909,7 +2909,7 @@
"source": "/packages/vite/src" "source": "/packages/vite/src"
}, },
{ {
"description": "The Vue plugin for Nx contains executors and generators for managing Vue applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Cypress, and Storybook.\n\n- Generators for applications, libraries, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.", "description": "The Vue plugin for Nx contains executors and generators for managing Vue applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
"documents": [ "documents": [
{ {
"id": "overview", "id": "overview",
@ -2996,12 +2996,12 @@
"source": "/packages/vue/src" "source": "/packages/vue/src"
}, },
{ {
"description": "The Nx Plugin for Web Components contains generators for managing Web Component applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Cypress, and Storybook.\n\n- Scaffolding for creating buildable libraries that can be published to npm.\n\n- Utilities for automatic workspace refactoring.", "description": "The Nx Plugin for Web Components contains generators for managing Web Component applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Playwright, Cypress, and Storybook.\n\n- Scaffolding for creating buildable libraries that can be published to npm.\n\n- Utilities for automatic workspace refactoring.",
"documents": [ "documents": [
{ {
"id": "overview", "id": "overview",
"name": "Overview", "name": "Overview",
"description": "The Nx Plugin for Web Components contains generators for managing Web Component applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Cypress, and Storybook.\n\n- Scaffolding for creating buildable libraries that can be published to npm.\n\n- Utilities for automatic workspace refactoring.", "description": "The Nx Plugin for Web Components contains generators for managing Web Component applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Playwright, Cypress, and Storybook.\n\n- Scaffolding for creating buildable libraries that can be published to npm.\n\n- Utilities for automatic workspace refactoring.",
"file": "generated/packages/web/documents/overview", "file": "generated/packages/web/documents/overview",
"itemList": [], "itemList": [],
"isExternal": false, "isExternal": false,

View File

@ -107,10 +107,10 @@
}, },
"e2eTestRunner": { "e2eTestRunner": {
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "none"], "enum": ["playwright", "cypress", "none"],
"description": "Test runner to use for end to end (E2E) tests.", "description": "Test runner to use for end to end (E2E) tests.",
"x-prompt": "Which E2E test runner would you like to use?", "x-prompt": "Which E2E test runner would you like to use?",
"default": "cypress" "default": "playwright"
}, },
"tags": { "tags": {
"type": "string", "type": "string",

View File

@ -114,10 +114,10 @@
}, },
"e2eTestRunner": { "e2eTestRunner": {
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "none"], "enum": ["playwright", "cypress", "none"],
"description": "Test runner to use for end to end (E2E) tests.", "description": "Test runner to use for end to end (E2E) tests.",
"x-prompt": "Which E2E test runner would you like to use?", "x-prompt": "Which E2E test runner would you like to use?",
"default": "cypress" "default": "playwright"
}, },
"tags": { "tags": {
"type": "string", "type": "string",

View File

@ -108,10 +108,10 @@
}, },
"e2eTestRunner": { "e2eTestRunner": {
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "none"], "enum": ["playwright", "cypress", "none"],
"description": "Test runner to use for end to end (E2E) tests.", "description": "Test runner to use for end to end (E2E) tests.",
"x-prompt": "Which E2E test runner would you like to use?", "x-prompt": "Which E2E test runner would you like to use?",
"default": "cypress" "default": "playwright"
}, },
"tags": { "tags": {
"type": "string", "type": "string",

View File

@ -75,8 +75,8 @@
"e2eTestRunner": { "e2eTestRunner": {
"description": "Adds the specified e2e test runner", "description": "Adds the specified e2e test runner",
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "detox", "none"], "enum": ["playwright", "cypress", "detox", "none"],
"default": "cypress" "default": "playwright"
}, },
"standaloneConfig": { "standaloneConfig": {
"description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.", "description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",

View File

@ -86,10 +86,10 @@
}, },
"e2eTestRunner": { "e2eTestRunner": {
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "none"], "enum": ["playwright", "cypress", "none"],
"description": "Test runner to use for end to end (E2E) tests.", "description": "Test runner to use for end to end (E2E) tests.",
"x-prompt": "Which E2E test runner would you like to use?", "x-prompt": "Which E2E test runner would you like to use?",
"default": "cypress" "default": "playwright"
}, },
"tags": { "tags": {
"type": "string", "type": "string",

View File

@ -49,10 +49,10 @@
}, },
"e2eTestRunner": { "e2eTestRunner": {
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "none"], "enum": ["playwright", "cypress", "none"],
"description": "Test runner to use for end to end (E2E) tests.", "description": "Test runner to use for end to end (E2E) tests.",
"x-prompt": "Which E2E test runner would you like to use?", "x-prompt": "Which E2E test runner would you like to use?",
"default": "cypress" "default": "playwright"
}, },
"tags": { "tags": {
"type": "string", "type": "string",

View File

@ -75,7 +75,7 @@ Generate a Dockerfile for the Node API
Type: `string` Type: `string`
Choices: [cypress, playwright, none] Choices: [playwright, cypress, none]
Test runner to use for end to end (E2E) tests. Test runner to use for end to end (E2E) tests.

View File

@ -75,8 +75,8 @@
"e2eTestRunner": { "e2eTestRunner": {
"description": "Adds the specified e2e test runner.", "description": "Adds the specified e2e test runner.",
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "detox", "none"], "enum": ["playwright", "cypress", "detox", "none"],
"default": "cypress" "default": "playwright"
}, },
"install": { "install": {
"type": "boolean", "type": "boolean",

View File

@ -116,10 +116,10 @@
}, },
"e2eTestRunner": { "e2eTestRunner": {
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "none"], "enum": ["playwright", "cypress", "none"],
"description": "Test runner to use for end to end (E2E) tests.", "description": "Test runner to use for end to end (E2E) tests.",
"x-prompt": "Which E2E test runner would you like to use?", "x-prompt": "Which E2E test runner would you like to use?",
"default": "cypress" "default": "playwright"
}, },
"tags": { "tags": {
"type": "string", "type": "string",

View File

@ -97,10 +97,10 @@
}, },
"e2eTestRunner": { "e2eTestRunner": {
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "none"], "enum": ["playwright", "cypress", "none"],
"description": "Test runner to use for end to end (E2E) tests.", "description": "Test runner to use for end to end (E2E) tests.",
"x-prompt": "Which E2E test runner would you like to use?", "x-prompt": "Which E2E test runner would you like to use?",
"default": "cypress" "default": "playwright"
}, },
"tags": { "tags": {
"type": "string", "type": "string",

View File

@ -103,10 +103,10 @@
}, },
"e2eTestRunner": { "e2eTestRunner": {
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "none"], "enum": ["playwright", "cypress", "none"],
"description": "Test runner to use for end to end (E2E) tests.", "description": "Test runner to use for end to end (E2E) tests.",
"x-prompt": "Which E2E test runner would you like to use?", "x-prompt": "Which E2E test runner would you like to use?",
"default": "cypress" "default": "playwright"
}, },
"tags": { "tags": {
"type": "string", "type": "string",

View File

@ -45,8 +45,8 @@
}, },
"e2eTestRunner": { "e2eTestRunner": {
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "none"], "enum": ["playwright", "cypress", "none"],
"default": "cypress", "default": "playwright",
"description": "Test runner to use for e2e tests", "description": "Test runner to use for e2e tests",
"x-prompt": "Which E2E test runner would you like to use?" "x-prompt": "Which E2E test runner would you like to use?"
}, },

View File

@ -91,10 +91,10 @@
}, },
"e2eTestRunner": { "e2eTestRunner": {
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "none"], "enum": ["playwright", "cypress", "none"],
"description": "Test runner to use for end to end (E2E) tests.", "description": "Test runner to use for end to end (E2E) tests.",
"x-prompt": "Which E2E test runner would you like to use?", "x-prompt": "Which E2E test runner would you like to use?",
"default": "cypress" "default": "playwright"
}, },
"tags": { "tags": {
"type": "string", "type": "string",

View File

@ -84,10 +84,10 @@
}, },
"e2eTestRunner": { "e2eTestRunner": {
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "none"], "enum": ["playwright", "cypress", "none"],
"x-prompt": "Which E2E test runner would you like to use?", "x-prompt": "Which E2E test runner would you like to use?",
"description": "Test runner to use for end to end (e2e) tests", "description": "Test runner to use for end to end (e2e) tests",
"default": "cypress" "default": "playwright"
}, },
"tags": { "tags": {
"type": "string", "type": "string",

View File

@ -73,7 +73,7 @@
"e2eTestRunner": { "e2eTestRunner": {
"description": "The tool to use for running e2e tests.", "description": "The tool to use for running e2e tests.",
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "jest", "detox", "none"] "enum": ["playwright", "cypress", "jest", "detox", "none"]
}, },
"ssr": { "ssr": {
"description": "Enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) for the Angular application.", "description": "Enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) for the Angular application.",

View File

@ -90,7 +90,7 @@
"e2eTestRunner": { "e2eTestRunner": {
"description": "The tool to use for running e2e tests.", "description": "The tool to use for running e2e tests.",
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "jest", "detox", "none"] "enum": ["playwright", ",cypress", "jest", "detox", "none"]
}, },
"ssr": { "ssr": {
"description": "Enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) for the Angular application.", "description": "Enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) for the Angular application.",

View File

@ -126,9 +126,9 @@ describe('Angular Projects', () => {
); );
// check e2e tests // check e2e tests
if (runE2ETests('cypress')) { if (runE2ETests('playwright')) {
const e2eResults = runCLI(`e2e ${app1}-e2e`); const e2eResults = runCLI(`e2e ${app1}-e2e`);
expect(e2eResults).toContain('All specs passed!'); expect(e2eResults).toContain('Successfully ran target e2e for project');
expect(await killPort(4200)).toBeTruthy(); expect(await killPort(4200)).toBeTruthy();
} }

View File

@ -319,7 +319,7 @@ describe('Angular Module Federation', () => {
const hostPort = 4200; const hostPort = 4200;
runCLI( runCLI(
`generate @nx/angular:host ${host} --remotes=${remote} --no-interactive --projectNameAndRootFormat=as-provided` `generate @nx/angular:host ${host} --remotes=${remote} --e2eTestRunner=cypress --no-interactive --projectNameAndRootFormat=as-provided`
); );
runCLI( runCLI(
@ -393,7 +393,7 @@ describe('Angular Module Federation', () => {
const hostPort = 4200; const hostPort = 4200;
runCLI( runCLI(
`generate @nx/angular:host ${host} --remotes=${remote} --no-interactive --projectNameAndRootFormat=as-provided` `generate @nx/angular:host ${host} --remotes=${remote} --e2eTestRunner=cypress --no-interactive --projectNameAndRootFormat=as-provided`
); );
runCLI( runCLI(

View File

@ -595,7 +595,6 @@ describe('Linter', () => {
expect(appOverrides).toContain('plugin:@nx/typescript'); expect(appOverrides).toContain('plugin:@nx/typescript');
let e2eOverrides = JSON.stringify(e2eEslint.overrides); let e2eOverrides = JSON.stringify(e2eEslint.overrides);
expect(e2eOverrides).toContain('plugin:@nx/javascript'); expect(e2eOverrides).toContain('plugin:@nx/javascript');
expect(e2eOverrides).toContain('plugin:@nx/typescript');
runCLI(`generate @nx/js:lib ${mylib} --unitTestRunner=jest`); runCLI(`generate @nx/js:lib ${mylib} --unitTestRunner=jest`);
verifySuccessfulMigratedSetup(myapp, mylib); verifySuccessfulMigratedSetup(myapp, mylib);
@ -628,7 +627,7 @@ describe('Linter', () => {
let appOverrides = JSON.stringify(appEslint.overrides); let appOverrides = JSON.stringify(appEslint.overrides);
expect(appOverrides).toContain('plugin:@nx/typescript'); expect(appOverrides).toContain('plugin:@nx/typescript');
let e2eOverrides = JSON.stringify(e2eEslint.overrides); let e2eOverrides = JSON.stringify(e2eEslint.overrides);
expect(e2eOverrides).toContain('plugin:@nx/typescript'); expect(e2eOverrides).toContain('plugin:@nx/javascript');
runCLI(`generate @nx/js:lib ${mylib} --no-interactive`); runCLI(`generate @nx/js:lib ${mylib} --no-interactive`);
verifySuccessfulMigratedSetup(myapp, mylib); verifySuccessfulMigratedSetup(myapp, mylib);

View File

@ -57,12 +57,8 @@ describe('React Applications', () => {
checkFilesExist(`dist/apps/${appName}/index.html`); checkFilesExist(`dist/apps/${appName}/index.html`);
if (runE2ETests()) { if (runE2ETests()) {
const e2eResults = runCLI(`e2e ${appName}-e2e`, { const e2eResults = runCLI(`e2e ${appName}-e2e`);
env: { expect(e2eResults).toContain('Successfully ran target e2e for project');
DEBUG: 'cypress:server:*',
},
});
expect(e2eResults).toContain('All specs passed!');
expect(await killPorts()).toBeTruthy(); expect(await killPorts()).toBeTruthy();
} }
}, 250_000); }, 250_000);

View File

@ -43,7 +43,7 @@ describe('React Module Federation', () => {
const defaultRemotePort = 4201; const defaultRemotePort = 4201;
runCLI( runCLI(
`generate @nx/react:host ${shell} --remotes=${remote1},${remote2},${remote3} --style=css --no-interactive --skipFormat --js=${js}` `generate @nx/react:host ${shell} --remotes=${remote1},${remote2},${remote3} --e2eTestRunner=cypress --style=css --no-interactive --skipFormat --js=${js}`
); );
checkFilesExist( checkFilesExist(
@ -173,7 +173,8 @@ describe('React Module Federation', () => {
const e2eResultsTsNode = await runCommandUntil( const e2eResultsTsNode = await runCommandUntil(
`e2e ${shell}-e2e --no-watch --verbose`, `e2e ${shell}-e2e --no-watch --verbose`,
(output) => output.includes('All specs passed!'), (output) =>
output.includes('Successfully ran target e2e for project'),
{ {
env: { NX_PREFER_TS_NODE: 'true' }, env: { NX_PREFER_TS_NODE: 'true' },
} }
@ -300,7 +301,7 @@ describe('React Module Federation', () => {
const host = uniq('host'); const host = uniq('host');
runCLI( runCLI(
`generate @nx/react:host ${host} --remotes=${remote} --no-interactive --projectNameAndRootFormat=as-provided --skipFormat` `generate @nx/react:host ${host} --remotes=${remote} --e2eTestRunner=cypress --no-interactive --projectNameAndRootFormat=as-provided --skipFormat`
); );
runCLI( runCLI(
@ -401,7 +402,7 @@ describe('React Module Federation', () => {
const host = uniq('host'); const host = uniq('host');
runCLI( runCLI(
`generate @nx/react:host ${host} --remotes=${remote} --no-interactive --projectNameAndRootFormat=as-provided --skipFormat` `generate @nx/react:host ${host} --remotes=${remote} --e2eTestRunner=cypress --no-interactive --projectNameAndRootFormat=as-provided --skipFormat`
); );
runCLI( runCLI(
@ -509,7 +510,7 @@ describe('React Module Federation', () => {
const host = uniq('host'); const host = uniq('host');
runCLI( runCLI(
`generate @nx/react:host ${host} --remotes=${remote} --no-interactive --projectNameAndRootFormat=as-provided --typescriptConfiguration=false --skipFormat` `generate @nx/react:host ${host} --remotes=${remote} --e2eTestRunner=cypress --no-interactive --projectNameAndRootFormat=as-provided --typescriptConfiguration=false --skipFormat`
); );
// Update remote to be loaded via script // Update remote to be loaded via script
@ -643,7 +644,7 @@ describe('React Module Federation', () => {
const lib = uniq('lib'); const lib = uniq('lib');
runCLI( runCLI(
`generate @nx/react:host ${shell} --remotes=${remote} --no-interactive --projectNameAndRootFormat=as-provided --skipFormat` `generate @nx/react:host ${shell} --remotes=${remote} --e2eTestRunner=cypress --no-interactive --projectNameAndRootFormat=as-provided --skipFormat`
); );
runCLI( runCLI(
@ -793,7 +794,7 @@ describe('React Module Federation', () => {
const remote = uniq('remote'); const remote = uniq('remote');
runCLI( runCLI(
`generate @nx/react:host ${shell} --remotes=${remote} --project-name-and-root-format=as-provided --no-interactive --skipFormat` `generate @nx/react:host ${shell} --remotes=${remote} --e2eTestRunner=cypress --project-name-and-root-format=as-provided --no-interactive --skipFormat`
); );
const shellPort = readPort(shell); const shellPort = readPort(shell);
@ -928,7 +929,7 @@ describe('React Module Federation', () => {
const remote = uniq('remote'); const remote = uniq('remote');
runCLI( runCLI(
`generate @nx/react:host ${shell} --remotes=${remote} --dynamic=true --project-name-and-root-format=as-provided --no-interactive --skipFormat` `generate @nx/react:host ${shell} --remotes=${remote} --e2eTestRunner=cypress --dynamic=true --project-name-and-root-format=as-provided --no-interactive --skipFormat`
); );
// Webpack prod config should not exists when loading dynamic modules // Webpack prod config should not exists when loading dynamic modules

View File

@ -36,7 +36,7 @@ describe('Web Components Applications with bundler set as vite', () => {
if (isNotWindows() && runE2ETests()) { if (isNotWindows() && runE2ETests()) {
const e2eResults = runCLI(`e2e ${appName}-e2e`); const e2eResults = runCLI(`e2e ${appName}-e2e`);
expect(e2eResults).toContain('All specs passed!'); expect(e2eResults).toContain('Successfully ran target e2e for project');
await killPorts(); await killPorts();
} }
}, 500000); }, 500000);

View File

@ -42,7 +42,7 @@ describe('Web Components Applications', () => {
if (isNotWindows() && runE2ETests()) { if (isNotWindows() && runE2ETests()) {
const e2eResults = runCLI(`e2e ${appName}-e2e`); const e2eResults = runCLI(`e2e ${appName}-e2e`);
expect(e2eResults).toContain('All specs passed!'); expect(e2eResults).toContain('Successfully ran target e2e for project');
await killPorts(); await killPorts();
} }

View File

@ -2,7 +2,7 @@
"name": "@nx/angular", "name": "@nx/angular",
"version": "0.0.1", "version": "0.0.1",
"private": false, "private": false,
"description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.", "description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, Playwright and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/nrwl/nx.git", "url": "https://github.com/nrwl/nx.git",

View File

@ -61,7 +61,7 @@ export async function normalizeOptions(
skipTests: options.unitTestRunner === UnitTestRunner.None, skipTests: options.unitTestRunner === UnitTestRunner.None,
skipFormat: false, skipFormat: false,
unitTestRunner: UnitTestRunner.Jest, unitTestRunner: UnitTestRunner.Jest,
e2eTestRunner: E2eTestRunner.Cypress, e2eTestRunner: E2eTestRunner.Playwright,
linter: Linter.EsLint, linter: Linter.EsLint,
strict: true, strict: true,
standalone: true, standalone: true,

View File

@ -110,10 +110,10 @@
}, },
"e2eTestRunner": { "e2eTestRunner": {
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "none"], "enum": ["playwright", "cypress", "none"],
"description": "Test runner to use for end to end (E2E) tests.", "description": "Test runner to use for end to end (E2E) tests.",
"x-prompt": "Which E2E test runner would you like to use?", "x-prompt": "Which E2E test runner would you like to use?",
"default": "cypress" "default": "playwright"
}, },
"tags": { "tags": {
"type": "string", "type": "string",

View File

@ -8,6 +8,7 @@ import { componentGenerator } from '../component/component';
import * as storybookUtils from '../utils/storybook-ast/storybook-inputs'; import * as storybookUtils from '../utils/storybook-ast/storybook-inputs';
import { generateTestApplication } from '../utils/testing'; import { generateTestApplication } from '../utils/testing';
import { componentCypressSpecGenerator } from './component-cypress-spec'; import { componentCypressSpecGenerator } from './component-cypress-spec';
import { E2eTestRunner } from '../../utils/test-runners';
// need to mock cypress otherwise it'll use the nx installed version from package.json // need to mock cypress otherwise it'll use the nx installed version from package.json
// which is v9 while we are testing for the new v10 version // which is v9 while we are testing for the new v10 version
@ -23,7 +24,11 @@ describe('componentCypressSpec generator', () => {
beforeEach(async () => { beforeEach(async () => {
tree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' }); tree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
await generateTestApplication(tree, { name: appName, skipFormat: true }); await generateTestApplication(tree, {
name: appName,
skipFormat: true,
e2eTestRunner: E2eTestRunner.Cypress,
});
await componentGenerator(tree, { await componentGenerator(tree, {
name: 'test-button', name: 'test-button',
project: appName, project: appName,

View File

@ -117,10 +117,10 @@
}, },
"e2eTestRunner": { "e2eTestRunner": {
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "none"], "enum": ["playwright", "cypress", "none"],
"description": "Test runner to use for end to end (E2E) tests.", "description": "Test runner to use for end to end (E2E) tests.",
"x-prompt": "Which E2E test runner would you like to use?", "x-prompt": "Which E2E test runner would you like to use?",
"default": "cypress" "default": "playwright"
}, },
"tags": { "tags": {
"type": "string", "type": "string",

View File

@ -111,10 +111,10 @@
}, },
"e2eTestRunner": { "e2eTestRunner": {
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "none"], "enum": ["playwright", "cypress", "none"],
"description": "Test runner to use for end to end (E2E) tests.", "description": "Test runner to use for end to end (E2E) tests.",
"x-prompt": "Which E2E test runner would you like to use?", "x-prompt": "Which E2E test runner would you like to use?",
"default": "cypress" "default": "playwright"
}, },
"tags": { "tags": {
"type": "string", "type": "string",

View File

@ -7,6 +7,7 @@ import {
import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing';
import { generateTestApplication } from '../utils/testing'; import { generateTestApplication } from '../utils/testing';
import { setupMf } from './setup-mf'; import { setupMf } from './setup-mf';
import { E2eTestRunner } from '../../utils/test-runners';
describe('Init MF', () => { describe('Init MF', () => {
let tree: Tree; let tree: Tree;
@ -474,6 +475,7 @@ describe('Init MF', () => {
routing: true, routing: true,
standalone: false, standalone: false,
skipFormat: true, skipFormat: true,
e2eTestRunner: E2eTestRunner.Cypress,
}); });
// ACT // ACT

View File

@ -170,7 +170,7 @@ export const commandsObject: yargs.Argv<Arguments> = yargs
}) })
.option('e2eTestRunner', { .option('e2eTestRunner', {
describe: chalk.dim`Test runner to use for end to end (E2E) tests.`, describe: chalk.dim`Test runner to use for end to end (E2E) tests.`,
choices: ['cypress', 'playwright', 'none'], choices: ['playwright', 'cypress', 'none'],
type: 'string', type: 'string',
}) })
.option('ssr', { .option('ssr', {
@ -1224,14 +1224,14 @@ async function determineE2eTestRunner(
type: 'autocomplete', type: 'autocomplete',
name: 'e2eTestRunner', name: 'e2eTestRunner',
choices: [ choices: [
{
name: 'cypress',
message: 'Cypress [ https://www.cypress.io/ ]',
},
{ {
name: 'playwright', name: 'playwright',
message: 'Playwright [ https://playwright.dev/ ]', message: 'Playwright [ https://playwright.dev/ ]',
}, },
{
name: 'cypress',
message: 'Cypress [ https://www.cypress.io/ ]',
},
{ {
name: 'none', name: 'none',
message: 'None', message: 'None',

View File

@ -17,6 +17,7 @@
"Nest", "Nest",
"Jest", "Jest",
"Cypress", "Cypress",
"Playwright",
"CLI" "CLI"
], ],
"bin": { "bin": {

View File

@ -15,7 +15,7 @@ export interface Schema {
js: boolean; // default is false js: boolean; // default is false
linter: Linter; // default is eslint linter: Linter; // default is eslint
setParserOptionsProject?: boolean; // default is false setParserOptionsProject?: boolean; // default is false
e2eTestRunner: 'cypress' | 'playwright' | 'detox' | 'none'; // default is cypress e2eTestRunner: 'cypress' | 'playwright' | 'detox' | 'none'; // default is playwright
standaloneConfig?: boolean; standaloneConfig?: boolean;
skipPackageJson?: boolean; // default is false skipPackageJson?: boolean; // default is false
addPlugin?: boolean; addPlugin?: boolean;

View File

@ -75,8 +75,8 @@
"e2eTestRunner": { "e2eTestRunner": {
"description": "Adds the specified e2e test runner", "description": "Adds the specified e2e test runner",
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "detox", "none"], "enum": ["playwright", "cypress", "detox", "none"],
"default": "cypress" "default": "playwright"
}, },
"standaloneConfig": { "standaloneConfig": {
"description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.", "description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",

View File

@ -2,7 +2,7 @@
"name": "@nx/next", "name": "@nx/next",
"version": "0.0.1", "version": "0.0.1",
"private": false, "private": false,
"description": "The Next.js plugin for Nx contains executors and generators for managing Next.js applications and libraries within an Nx workspace. It provides:\n\n\n- Scaffolding for creating, building, serving, linting, and testing Next.js applications.\n\n- Integration with building, serving, and exporting a Next.js application.\n\n- Integration with React libraries within the workspace. \n\nWhen using Next.js in Nx, you get the out-of-the-box support for TypeScript, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work.", "description": "The Next.js plugin for Nx contains executors and generators for managing Next.js applications and libraries within an Nx workspace. It provides:\n\n\n- Scaffolding for creating, building, serving, linting, and testing Next.js applications.\n\n- Integration with building, serving, and exporting a Next.js application.\n\n- Integration with React libraries within the workspace. \n\nWhen using Next.js in Nx, you get the out-of-the-box support for TypeScript, Playwright, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work.",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/nrwl/nx.git", "url": "https://github.com/nrwl/nx.git",

View File

@ -68,6 +68,7 @@ export async function addE2e(host: Tree, options: NormalizedSchema) {
root: options.e2eProjectRoot, root: options.e2eProjectRoot,
sourceRoot: joinPathFragments(options.e2eProjectRoot, 'src'), sourceRoot: joinPathFragments(options.e2eProjectRoot, 'src'),
targets: {}, targets: {},
tags: [],
implicitDependencies: [options.projectName], implicitDependencies: [options.projectName],
}); });
return configurationGenerator(host, { return configurationGenerator(host, {

View File

@ -110,7 +110,7 @@ export async function normalizeOptions(
e2eWebServerAddress, e2eWebServerAddress,
e2eWebServerTarget, e2eWebServerTarget,
e2ePort, e2ePort,
e2eTestRunner: options.e2eTestRunner || 'cypress', e2eTestRunner: options.e2eTestRunner || 'playwright',
fileName, fileName,
linter: options.linter || Linter.EsLint, linter: options.linter || Linter.EsLint,
name, name,

View File

@ -89,10 +89,10 @@
}, },
"e2eTestRunner": { "e2eTestRunner": {
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "none"], "enum": ["playwright", "cypress", "none"],
"description": "Test runner to use for end to end (E2E) tests.", "description": "Test runner to use for end to end (E2E) tests.",
"x-prompt": "Which E2E test runner would you like to use?", "x-prompt": "Which E2E test runner would you like to use?",
"default": "cypress" "default": "playwright"
}, },
"tags": { "tags": {
"type": "string", "type": "string",

View File

@ -2,7 +2,7 @@
"name": "@nx/nuxt", "name": "@nx/nuxt",
"version": "0.0.1", "version": "0.0.1",
"private": false, "private": false,
"description": "The Nuxt plugin for Nx contains executors and generators for managing Nuxt applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Cypress, and Storybook.\n\n- Generators for applications, libraries, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.", "description": "The Nuxt plugin for Nx contains executors and generators for managing Nuxt applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/nrwl/nx.git", "url": "https://github.com/nrwl/nx.git",

View File

@ -198,14 +198,11 @@ exports[`app generated files content - as-provided general application should cr
"vitest.workspace.ts", "vitest.workspace.ts",
"my-app/vitest.config.ts", "my-app/vitest.config.ts",
"my-app-e2e/project.json", "my-app-e2e/project.json",
"my-app-e2e/src/e2e/app.cy.ts", "my-app-e2e/src/example.spec.ts",
"my-app-e2e/src/support/app.po.ts", "my-app-e2e/playwright.config.ts",
"my-app-e2e/src/support/e2e.ts",
"my-app-e2e/src/fixtures/example.json",
"my-app-e2e/src/support/commands.ts",
"my-app-e2e/cypress.config.ts",
"my-app-e2e/tsconfig.json", "my-app-e2e/tsconfig.json",
"my-app-e2e/.eslintrc.json", "my-app-e2e/.eslintrc.json",
".vscode/extensions.json",
] ]
`; `;

View File

@ -76,7 +76,7 @@ describe('app', () => {
options: { buildTargetName: 'build', serveTargetName: 'serve' }, options: { buildTargetName: 'build', serveTargetName: 'serve' },
}, },
{ {
plugin: '@nx/cypress/plugin', plugin: '@nx/playwright/plugin',
options: { targetName: 'e2e' }, options: { targetName: 'e2e' },
}, },
]); ]);

View File

@ -76,7 +76,7 @@ export async function normalizeOptions(
} as NormalizedSchema; } as NormalizedSchema;
normalized.unitTestRunner ??= 'vitest'; normalized.unitTestRunner ??= 'vitest';
normalized.e2eTestRunner = normalized.e2eTestRunner ?? 'cypress'; normalized.e2eTestRunner = normalized.e2eTestRunner ?? 'playwright';
return normalized; return normalized;
} }

View File

@ -49,10 +49,10 @@
}, },
"e2eTestRunner": { "e2eTestRunner": {
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "none"], "enum": ["playwright", "cypress", "none"],
"description": "Test runner to use for end to end (E2E) tests.", "description": "Test runner to use for end to end (E2E) tests.",
"x-prompt": "Which E2E test runner would you like to use?", "x-prompt": "Which E2E test runner would you like to use?",
"default": "cypress" "default": "playwright"
}, },
"tags": { "tags": {
"type": "string", "type": "string",

View File

@ -165,7 +165,9 @@ function createTempWorkspace(options: NormalizedOptions) {
options.isVite ? 'vite' : 'webpack' options.isVite ? 'vite' : 'webpack'
} --packageManager=${options.packageManager} ${ } --packageManager=${options.packageManager} ${
options.nxCloud ? '--nxCloud=yes' : '--nxCloud=skip' options.nxCloud ? '--nxCloud=yes' : '--nxCloud=skip'
} ${options.addE2e ? '--e2eTestRunner=cypress' : '--e2eTestRunner=none'}`, } ${
options.addE2e ? '--e2eTestRunner=playwright' : '--e2eTestRunner=none'
}`,
{ stdio: [0, 1, 2] } { stdio: [0, 1, 2] }
); );

View File

@ -75,8 +75,8 @@
"e2eTestRunner": { "e2eTestRunner": {
"description": "Adds the specified e2e test runner.", "description": "Adds the specified e2e test runner.",
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "detox", "none"], "enum": ["playwright", "cypress", "detox", "none"],
"default": "cypress" "default": "playwright"
}, },
"install": { "install": {
"type": "boolean", "type": "boolean",

View File

@ -2,7 +2,7 @@
"name": "@nx/react", "name": "@nx/react",
"version": "0.0.1", "version": "0.0.1",
"private": false, "private": false,
"description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.", "description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/nrwl/nx.git", "url": "https://github.com/nrwl/nx.git",

View File

@ -121,7 +121,7 @@ export async function normalizeOptions<T extends Schema = Schema>(
normalized.compiler = normalized.compiler ?? 'babel'; normalized.compiler = normalized.compiler ?? 'babel';
normalized.bundler = normalized.bundler ?? 'webpack'; normalized.bundler = normalized.bundler ?? 'webpack';
normalized.unitTestRunner = normalized.unitTestRunner ?? 'jest'; normalized.unitTestRunner = normalized.unitTestRunner ?? 'jest';
normalized.e2eTestRunner = normalized.e2eTestRunner ?? 'cypress'; normalized.e2eTestRunner = normalized.e2eTestRunner ?? 'playwright';
normalized.inSourceTests = normalized.minimal || normalized.inSourceTests; normalized.inSourceTests = normalized.minimal || normalized.inSourceTests;
normalized.devServerPort ??= findFreePort(host); normalized.devServerPort ??= findFreePort(host);
normalized.minimal = normalized.minimal ?? false; normalized.minimal = normalized.minimal ?? false;

View File

@ -122,10 +122,10 @@
}, },
"e2eTestRunner": { "e2eTestRunner": {
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "none"], "enum": ["playwright", "cypress", "none"],
"description": "Test runner to use for end to end (E2E) tests.", "description": "Test runner to use for end to end (E2E) tests.",
"x-prompt": "Which E2E test runner would you like to use?", "x-prompt": "Which E2E test runner would you like to use?",
"default": "cypress" "default": "playwright"
}, },
"tags": { "tags": {
"type": "string", "type": "string",

View File

@ -103,10 +103,10 @@
}, },
"e2eTestRunner": { "e2eTestRunner": {
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "none"], "enum": ["playwright", "cypress", "none"],
"description": "Test runner to use for end to end (E2E) tests.", "description": "Test runner to use for end to end (E2E) tests.",
"x-prompt": "Which E2E test runner would you like to use?", "x-prompt": "Which E2E test runner would you like to use?",
"default": "cypress" "default": "playwright"
}, },
"tags": { "tags": {
"type": "string", "type": "string",

View File

@ -109,10 +109,10 @@
}, },
"e2eTestRunner": { "e2eTestRunner": {
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "none"], "enum": ["playwright", "cypress", "none"],
"description": "Test runner to use for end to end (E2E) tests.", "description": "Test runner to use for end to end (E2E) tests.",
"x-prompt": "Which E2E test runner would you like to use?", "x-prompt": "Which E2E test runner would you like to use?",
"default": "cypress" "default": "playwright"
}, },
"tags": { "tags": {
"type": "string", "type": "string",

View File

@ -1,7 +1,7 @@
{ {
"name": "@nx/remix", "name": "@nx/remix",
"version": "0.0.1", "version": "0.0.1",
"description": "The Remix plugin for Nx contains executors and generators for managing Remix applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Jest, Cypress, and Storybook.\n\n- Generators for applications, libraries, routes, loaders, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.", "description": "The Remix plugin for Nx contains executors and generators for managing Remix applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Jest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, routes, loaders, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/nrwl/nx.git", "url": "https://github.com/nrwl/nx.git",

View File

@ -45,8 +45,8 @@
}, },
"e2eTestRunner": { "e2eTestRunner": {
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "none"], "enum": ["playwright", "cypress", "none"],
"default": "cypress", "default": "playwright",
"description": "Test runner to use for e2e tests", "description": "Test runner to use for e2e tests",
"x-prompt": "Which E2E test runner would you like to use?" "x-prompt": "Which E2E test runner would you like to use?"
}, },

View File

@ -2,7 +2,7 @@
"name": "@nx/vue", "name": "@nx/vue",
"version": "0.0.1", "version": "0.0.1",
"private": false, "private": false,
"description": "The Vue plugin for Nx contains executors and generators for managing Vue applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Cypress, and Storybook.\n\n- Generators for applications, libraries, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.", "description": "The Vue plugin for Nx contains executors and generators for managing Vue applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/nrwl/nx.git", "url": "https://github.com/nrwl/nx.git",

View File

@ -135,16 +135,13 @@ exports[`application generator should set up project correctly with given option
".eslintrc.json", ".eslintrc.json",
".prettierignore", ".prettierignore",
".prettierrc", ".prettierrc",
".vscode/extensions.json",
"nx.json", "nx.json",
"package.json", "package.json",
"test-e2e/.eslintrc.json", "test-e2e/.eslintrc.json",
"test-e2e/cypress.config.ts", "test-e2e/playwright.config.ts",
"test-e2e/project.json", "test-e2e/project.json",
"test-e2e/src/e2e/app.cy.ts", "test-e2e/src/example.spec.ts",
"test-e2e/src/fixtures/example.json",
"test-e2e/src/support/app.po.ts",
"test-e2e/src/support/commands.ts",
"test-e2e/src/support/e2e.ts",
"test-e2e/tsconfig.json", "test-e2e/tsconfig.json",
"test/.eslintrc.json", "test/.eslintrc.json",
"test/index.html", "test/index.html",

View File

@ -50,7 +50,7 @@ export async function normalizeOptions(
normalized.style = options.style ?? 'css'; normalized.style = options.style ?? 'css';
normalized.routing = normalized.routing ?? false; normalized.routing = normalized.routing ?? false;
normalized.unitTestRunner ??= 'vitest'; normalized.unitTestRunner ??= 'vitest';
normalized.e2eTestRunner = normalized.e2eTestRunner ?? 'cypress'; normalized.e2eTestRunner = normalized.e2eTestRunner ?? 'playwright';
return normalized; return normalized;
} }

View File

@ -97,10 +97,10 @@
}, },
"e2eTestRunner": { "e2eTestRunner": {
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "none"], "enum": ["playwright", "cypress", "none"],
"description": "Test runner to use for end to end (E2E) tests.", "description": "Test runner to use for end to end (E2E) tests.",
"x-prompt": "Which E2E test runner would you like to use?", "x-prompt": "Which E2E test runner would you like to use?",
"default": "cypress" "default": "playwright"
}, },
"tags": { "tags": {
"type": "string", "type": "string",

View File

@ -2,7 +2,7 @@
"name": "@nx/web", "name": "@nx/web",
"version": "0.0.1", "version": "0.0.1",
"private": false, "private": false,
"description": "The Nx Plugin for Web Components contains generators for managing Web Component applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Cypress, and Storybook.\n\n- Scaffolding for creating buildable libraries that can be published to npm.\n\n- Utilities for automatic workspace refactoring.", "description": "The Nx Plugin for Web Components contains generators for managing Web Component applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Playwright, Cypress, and Storybook.\n\n- Scaffolding for creating buildable libraries that can be published to npm.\n\n- Utilities for automatic workspace refactoring.",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/nrwl/nx.git", "url": "https://github.com/nrwl/nx.git",

View File

@ -85,7 +85,7 @@ describe('app', () => {
expect(tsconfigApp.compilerOptions.outDir).toEqual('../dist/out-tsc'); expect(tsconfigApp.compilerOptions.outDir).toEqual('../dist/out-tsc');
expect(tsconfigApp.extends).toEqual('./tsconfig.json'); expect(tsconfigApp.extends).toEqual('./tsconfig.json');
expect(tree.exists('my-app-e2e/cypress.config.ts')).toBeTruthy(); expect(tree.exists('my-app-e2e/playwright.config.ts')).toBeTruthy();
const tsconfigE2E = readJson(tree, 'my-app-e2e/tsconfig.json'); const tsconfigE2E = readJson(tree, 'my-app-e2e/tsconfig.json');
expect(tsconfigE2E).toMatchInlineSnapshot(` expect(tsconfigE2E).toMatchInlineSnapshot(`
{ {
@ -94,19 +94,17 @@ describe('app', () => {
"module": "commonjs", "module": "commonjs",
"outDir": "../dist/out-tsc", "outDir": "../dist/out-tsc",
"sourceMap": false, "sourceMap": false,
"types": [
"cypress",
"node",
],
}, },
"extends": "../tsconfig.base.json", "extends": "../tsconfig.base.json",
"include": [ "include": [
"**/*.ts", "**/*.ts",
"**/*.js", "**/*.js",
"cypress.config.ts", "playwright.config.ts",
"**/*.cy.ts", "src/**/*.spec.ts",
"**/*.cy.js", "src/**/*.spec.js",
"**/*.d.ts", "src/**/*.test.ts",
"src/**/*.test.js",
"src/**/*.d.ts",
], ],
} }
`); `);
@ -181,7 +179,7 @@ describe('app', () => {
path: './tsconfig.spec.json', path: './tsconfig.spec.json',
}, },
]); ]);
expect(tree.exists('my-app-e2e/cypress.config.ts')).toBeTruthy(); expect(tree.exists('my-app-e2e/playwright.config.ts')).toBeTruthy();
expect(tree.exists('my-app/index.html')).toBeTruthy(); expect(tree.exists('my-app/index.html')).toBeTruthy();
expect(tree.exists('my-app/vite.config.ts')).toBeTruthy(); expect(tree.exists('my-app/vite.config.ts')).toBeTruthy();
expect(tree.exists(`my-app/environments/environment.ts`)).toBeFalsy(); expect(tree.exists(`my-app/environments/environment.ts`)).toBeFalsy();

View File

@ -380,6 +380,7 @@ export async function applicationGeneratorInternal(host: Tree, schema: Schema) {
sourceRoot: joinPathFragments(options.e2eProjectRoot, 'src'), sourceRoot: joinPathFragments(options.e2eProjectRoot, 'src'),
projectType: 'application', projectType: 'application',
targets: {}, targets: {},
tags: [],
implicitDependencies: [options.projectName], implicitDependencies: [options.projectName],
}); });
const playwrightTask = await playwrightConfigGenerator(host, { const playwrightTask = await playwrightConfigGenerator(host, {
@ -528,7 +529,7 @@ async function normalizeOptions(
options.style = options.style || 'css'; options.style = options.style || 'css';
options.linter = options.linter || ('eslint' as Linter.EsLint); options.linter = options.linter || ('eslint' as Linter.EsLint);
options.unitTestRunner = options.unitTestRunner || 'jest'; options.unitTestRunner = options.unitTestRunner || 'jest';
options.e2eTestRunner = options.e2eTestRunner || 'cypress'; options.e2eTestRunner = options.e2eTestRunner || 'playwright';
return { return {
...options, ...options,

View File

@ -87,10 +87,10 @@
}, },
"e2eTestRunner": { "e2eTestRunner": {
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "none"], "enum": ["playwright", "cypress", "none"],
"x-prompt": "Which E2E test runner would you like to use?", "x-prompt": "Which E2E test runner would you like to use?",
"description": "Test runner to use for end to end (e2e) tests", "description": "Test runner to use for end to end (e2e) tests",
"default": "cypress" "default": "playwright"
}, },
"tags": { "tags": {
"type": "string", "type": "string",

View File

@ -76,7 +76,7 @@
"e2eTestRunner": { "e2eTestRunner": {
"description": "The tool to use for running e2e tests.", "description": "The tool to use for running e2e tests.",
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "jest", "detox", "none"] "enum": ["playwright", "cypress", "jest", "detox", "none"]
}, },
"ssr": { "ssr": {
"description": "Enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) for the Angular application.", "description": "Enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) for the Angular application.",

View File

@ -36,7 +36,7 @@ async function createPreset(tree: Tree, options: Schema) {
linter: options.linter, linter: options.linter,
standalone: options.standaloneApi, standalone: options.standaloneApi,
routing: options.routing, routing: options.routing,
e2eTestRunner: options.e2eTestRunner ?? 'cypress', e2eTestRunner: options.e2eTestRunner ?? 'playwright',
bundler: options.bundler, bundler: options.bundler,
ssr: options.ssr, ssr: options.ssr,
prefix: options.prefix, prefix: options.prefix,
@ -55,7 +55,7 @@ async function createPreset(tree: Tree, options: Schema) {
routing: options.routing, routing: options.routing,
rootProject: true, rootProject: true,
standalone: options.standaloneApi, standalone: options.standaloneApi,
e2eTestRunner: options.e2eTestRunner ?? 'cypress', e2eTestRunner: options.e2eTestRunner ?? 'playwright',
bundler: options.bundler, bundler: options.bundler,
ssr: options.ssr, ssr: options.ssr,
prefix: options.prefix, prefix: options.prefix,
@ -71,7 +71,7 @@ async function createPreset(tree: Tree, options: Schema) {
style: options.style, style: options.style,
linter: options.linter, linter: options.linter,
bundler: options.bundler ?? 'webpack', bundler: options.bundler ?? 'webpack',
e2eTestRunner: options.e2eTestRunner ?? 'cypress', e2eTestRunner: options.e2eTestRunner ?? 'playwright',
addPlugin, addPlugin,
}); });
} else if (options.preset === Preset.ReactStandalone) { } else if (options.preset === Preset.ReactStandalone) {
@ -86,7 +86,7 @@ async function createPreset(tree: Tree, options: Schema) {
linter: options.linter, linter: options.linter,
rootProject: true, rootProject: true,
bundler: options.bundler ?? 'vite', bundler: options.bundler ?? 'vite',
e2eTestRunner: options.e2eTestRunner ?? 'cypress', e2eTestRunner: options.e2eTestRunner ?? 'playwright',
unitTestRunner: options.bundler === 'vite' ? 'vitest' : 'jest', unitTestRunner: options.bundler === 'vite' ? 'vitest' : 'jest',
addPlugin, addPlugin,
}); });
@ -99,7 +99,7 @@ async function createPreset(tree: Tree, options: Schema) {
directory: join('apps', options.name), directory: join('apps', options.name),
projectNameAndRootFormat: 'as-provided', projectNameAndRootFormat: 'as-provided',
linter: options.linter, linter: options.linter,
e2eTestRunner: options.e2eTestRunner ?? 'cypress', e2eTestRunner: options.e2eTestRunner ?? 'playwright',
unitTestRunner: 'vitest', unitTestRunner: 'vitest',
addPlugin, addPlugin,
}); });
@ -112,7 +112,7 @@ async function createPreset(tree: Tree, options: Schema) {
directory: '.', directory: '.',
projectNameAndRootFormat: 'as-provided', projectNameAndRootFormat: 'as-provided',
linter: options.linter, linter: options.linter,
e2eTestRunner: options.e2eTestRunner ?? 'cypress', e2eTestRunner: options.e2eTestRunner ?? 'playwright',
rootProject: true, rootProject: true,
unitTestRunner: 'vitest', unitTestRunner: 'vitest',
addPlugin, addPlugin,
@ -127,7 +127,7 @@ async function createPreset(tree: Tree, options: Schema) {
projectNameAndRootFormat: 'as-provided', projectNameAndRootFormat: 'as-provided',
style: options.style, style: options.style,
linter: options.linter, linter: options.linter,
e2eTestRunner: options.e2eTestRunner ?? 'cypress', e2eTestRunner: options.e2eTestRunner ?? 'playwright',
addPlugin, addPlugin,
}); });
} else if (options.preset === Preset.VueStandalone) { } else if (options.preset === Preset.VueStandalone) {
@ -141,7 +141,7 @@ async function createPreset(tree: Tree, options: Schema) {
style: options.style, style: options.style,
linter: options.linter, linter: options.linter,
rootProject: true, rootProject: true,
e2eTestRunner: options.e2eTestRunner ?? 'cypress', e2eTestRunner: options.e2eTestRunner ?? 'playwright',
unitTestRunner: 'vitest', unitTestRunner: 'vitest',
addPlugin, addPlugin,
}); });
@ -155,7 +155,7 @@ async function createPreset(tree: Tree, options: Schema) {
projectNameAndRootFormat: 'as-provided', projectNameAndRootFormat: 'as-provided',
style: options.style, style: options.style,
linter: options.linter, linter: options.linter,
e2eTestRunner: options.e2eTestRunner ?? 'cypress', e2eTestRunner: options.e2eTestRunner ?? 'playwright',
addPlugin, addPlugin,
}); });
} else if (options.preset === Preset.NuxtStandalone) { } else if (options.preset === Preset.NuxtStandalone) {
@ -169,7 +169,7 @@ async function createPreset(tree: Tree, options: Schema) {
style: options.style, style: options.style,
linter: options.linter, linter: options.linter,
rootProject: true, rootProject: true,
e2eTestRunner: options.e2eTestRunner ?? 'cypress', e2eTestRunner: options.e2eTestRunner ?? 'playwright',
unitTestRunner: 'vitest', unitTestRunner: 'vitest',
addPlugin, addPlugin,
}); });
@ -185,7 +185,7 @@ async function createPreset(tree: Tree, options: Schema) {
linter: options.linter, linter: options.linter,
appDir: options.nextAppDir, appDir: options.nextAppDir,
src: options.nextSrcDir, src: options.nextSrcDir,
e2eTestRunner: options.e2eTestRunner ?? 'cypress', e2eTestRunner: options.e2eTestRunner ?? 'playwright',
addPlugin, addPlugin,
}); });
} else if (options.preset === Preset.NextJsStandalone) { } else if (options.preset === Preset.NextJsStandalone) {
@ -199,7 +199,7 @@ async function createPreset(tree: Tree, options: Schema) {
linter: options.linter, linter: options.linter,
appDir: options.nextAppDir, appDir: options.nextAppDir,
src: options.nextSrcDir, src: options.nextSrcDir,
e2eTestRunner: options.e2eTestRunner ?? 'cypress', e2eTestRunner: options.e2eTestRunner ?? 'playwright',
rootProject: true, rootProject: true,
addPlugin, addPlugin,
}); });
@ -214,7 +214,7 @@ async function createPreset(tree: Tree, options: Schema) {
style: options.style, style: options.style,
linter: options.linter, linter: options.linter,
bundler: 'vite', bundler: 'vite',
e2eTestRunner: options.e2eTestRunner ?? 'cypress', e2eTestRunner: options.e2eTestRunner ?? 'playwright',
addPlugin, addPlugin,
}); });
} else if (options.preset === Preset.Nest) { } else if (options.preset === Preset.Nest) {

View File

@ -93,7 +93,7 @@
"e2eTestRunner": { "e2eTestRunner": {
"description": "The tool to use for running e2e tests.", "description": "The tool to use for running e2e tests.",
"type": "string", "type": "string",
"enum": ["cypress", "playwright", "jest", "detox", "none"] "enum": ["playwright", ",cypress", "jest", "detox", "none"]
}, },
"ssr": { "ssr": {
"description": "Enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) for the Angular application.", "description": "Enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) for the Angular application.",