From e8390f46cd852417f2c0b07a9c73eeaf7437e823 Mon Sep 17 00:00:00 2001 From: Lachlan Miller Date: Thu, 6 Apr 2023 13:09:25 +1000 Subject: [PATCH] fix: correctly pass resolvedBaseUrl for Next.js 13.2.0+ (#26399) * add test project * styles * pass resolvedBaseUrl * make project more minimal * build binaries * changelog * remove css * pass supportedBrowsers to next webpack config * handle case of missing getSupportedBrowsers function * add default function --- .circleci/workflows.yml | 6 +- cli/CHANGELOG.md | 1 + .../src/helpers/nextHandler.ts | 25 +- .../projects/issue-25951-next-app/README.md | 1 + .../issue-25951-next-app/cypress.config.ts | 12 + .../cypress/support/component-index.html | 14 ++ .../issue-25951-next-app/next-env.d.ts | 5 + .../issue-25951-next-app/next.config.js | 6 + .../issue-25951-next-app/package.json | 14 ++ .../src/pages/_app.cy.tsx | 11 + .../issue-25951-next-app/src/pages/_app.tsx | 5 + .../src/styles/globals.css | 3 + .../issue-25951-next-app/tsconfig.json | 24 ++ .../projects/issue-25951-next-app/yarn.lock | 226 ++++++++++++++++++ system-tests/test/component_testing_spec.ts | 8 + 15 files changed, 355 insertions(+), 6 deletions(-) create mode 100644 system-tests/projects/issue-25951-next-app/README.md create mode 100644 system-tests/projects/issue-25951-next-app/cypress.config.ts create mode 100644 system-tests/projects/issue-25951-next-app/cypress/support/component-index.html create mode 100644 system-tests/projects/issue-25951-next-app/next-env.d.ts create mode 100644 system-tests/projects/issue-25951-next-app/next.config.js create mode 100644 system-tests/projects/issue-25951-next-app/package.json create mode 100644 system-tests/projects/issue-25951-next-app/src/pages/_app.cy.tsx create mode 100644 system-tests/projects/issue-25951-next-app/src/pages/_app.tsx create mode 100644 system-tests/projects/issue-25951-next-app/src/styles/globals.css create mode 100644 system-tests/projects/issue-25951-next-app/tsconfig.json create mode 100644 system-tests/projects/issue-25951-next-app/yarn.lock diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index dd0f2f7a234f..17b5199a93a7 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -30,7 +30,7 @@ mainBuildFilters: &mainBuildFilters - /^release\/\d+\.\d+\.\d+$/ # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - 'update-v8-snapshot-cache-on-develop' - - 'emily/before-spec-promise' + - 'issue-25951-next-app' # usually we don't build Mac app - it takes a long time # but sometimes we want to really confirm we are doing the right thing @@ -41,7 +41,7 @@ macWorkflowFilters: &darwin-workflow-filters - equal: [ develop, << pipeline.git.branch >> ] # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - - equal: [ 'emily/before-spec-promise', << pipeline.git.branch >> ] + - equal: [ 'issue-25951-next-app', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -139,7 +139,7 @@ commands: - run: name: Check current branch to persist artifacts command: | - if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "emily/before-spec-promise" && "$CIRCLE_BRANCH" != "update-v8-snapshot-cache-on-develop" ]]; then + if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "issue-25951-next-app" && "$CIRCLE_BRANCH" != "update-v8-snapshot-cache-on-develop" ]]; then echo "Not uploading artifacts or posting install comment for this branch." circleci-agent step halt fi diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index bfe2e7220702..9ec5e849e6ff 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -7,6 +7,7 @@ _Released 04/11/2023 (PENDING)_ - Capture the [Azure](https://azure.microsoft.com/) CI provider's environment variable [`SYSTEM_PULLREQUEST_PULLREQUESTNUMBER`](https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#system-variables-devops-services) to display the linked PR number in the Cloud. Addressed in [#26215](https://github.com/cypress-io/cypress/pull/26215). - Fixed an issue in the onboarding wizard where project framework & bundler would not be auto-detected when opening directly into component testing mode using the `--component` CLI flag. Fixes [#22777](https://github.com/cypress-io/cypress/issues/22777). + - Fix an edge case in Component Testing where a custom `baseUrl` in `tsconfig.json` for Next.js 13.2.0+ is not respected. This was partially fixed in [#26005](https://github.com/cypress-io/cypress/pull/26005), but an edge case was missed. Fixes [#25951](https://github.com/cypress-io/cypress/issues/25951). **Misc:** diff --git a/npm/webpack-dev-server/src/helpers/nextHandler.ts b/npm/webpack-dev-server/src/helpers/nextHandler.ts index b1e9a5b632ba..ebd747cbea8a 100644 --- a/npm/webpack-dev-server/src/helpers/nextHandler.ts +++ b/npm/webpack-dev-server/src/helpers/nextHandler.ts @@ -29,7 +29,12 @@ export async function nextHandler (devServerConfig: WebpackDevServerConfig): Pro */ function getNextJsPackages (devServerConfig: WebpackDevServerConfig) { const resolvePaths = { paths: [devServerConfig.cypressConfig.projectRoot] } - const packages = {} as { loadConfig: Function, getNextJsBaseWebpackConfig: Function, nextLoadJsConfig: Function } + const packages = {} as { + loadConfig: (phase: 'development', dir: string) => Promise + getNextJsBaseWebpackConfig: Function + nextLoadJsConfig: Function + getSupportedBrowsers: (dir: string, isDevelopment: boolean, nextJsConfig: any) => Promise + } try { const loadConfigPath = require.resolve('next/dist/server/config', resolvePaths) @@ -55,6 +60,15 @@ function getNextJsPackages (devServerConfig: WebpackDevServerConfig) { throw new Error(`Failed to load "next/dist/build/load-jsconfig" with error: ${ e.message ?? e}`) } + // Does not exist prior to Next 13. + try { + const getUtilsPath = require.resolve('next/dist/build/utils', resolvePaths) + + packages.getSupportedBrowsers = require(getUtilsPath).getSupportedBrowsers ?? (() => Promise.resolve([])) + } catch (e: any) { + throw new Error(`Failed to load "next/dist/build/utils" with error: ${ e.message ?? e}`) + } + return packages } @@ -173,12 +187,13 @@ function getNextJsPackages (devServerConfig: WebpackDevServerConfig) { ] */ async function loadWebpackConfig (devServerConfig: WebpackDevServerConfig): Promise { - const { loadConfig, getNextJsBaseWebpackConfig, nextLoadJsConfig } = getNextJsPackages(devServerConfig) + const { loadConfig, getNextJsBaseWebpackConfig, nextLoadJsConfig, getSupportedBrowsers } = getNextJsPackages(devServerConfig) const nextConfig = await loadConfig('development', devServerConfig.cypressConfig.projectRoot) const runWebpackSpan = getRunWebpackSpan(devServerConfig) const reactVersion = getReactVersion(devServerConfig.cypressConfig.projectRoot) const jsConfigResult = await nextLoadJsConfig?.(devServerConfig.cypressConfig.projectRoot, nextConfig) + const supportedBrowsers = await getSupportedBrowsers(devServerConfig.cypressConfig.projectRoot, true, nextConfig) const webpackConfig = await getNextJsBaseWebpackConfig( devServerConfig.cypressConfig.projectRoot, @@ -196,8 +211,12 @@ async function loadWebpackConfig (devServerConfig: WebpackDevServerConfig): Prom compilerType: 'client', // Required for Next.js > 13 hasReactRoot: reactVersion === 18, - // Required for Next.js > 13.2.1 to respect TS/JS config + // Required for Next.js > 13.2.0 to respect TS/JS config jsConfig: jsConfigResult.jsConfig, + // Required for Next.js > 13.2.0 to respect tsconfig.compilerOptions.baseUrl + resolvedBaseUrl: jsConfigResult.resolvedBaseUrl, + // Added in Next.js 13, passed via `...info`: https://github.com/vercel/next.js/pull/45637/files + supportedBrowsers, }, ) diff --git a/system-tests/projects/issue-25951-next-app/README.md b/system-tests/projects/issue-25951-next-app/README.md new file mode 100644 index 000000000000..5d732f39ced1 --- /dev/null +++ b/system-tests/projects/issue-25951-next-app/README.md @@ -0,0 +1 @@ +Minimal reproduction for https://github.com/cypress-io/cypress/issues/25951. \ No newline at end of file diff --git a/system-tests/projects/issue-25951-next-app/cypress.config.ts b/system-tests/projects/issue-25951-next-app/cypress.config.ts new file mode 100644 index 000000000000..aceed5c3f1e7 --- /dev/null +++ b/system-tests/projects/issue-25951-next-app/cypress.config.ts @@ -0,0 +1,12 @@ +import { defineConfig } from 'cypress' + +export default defineConfig({ + component: { + fixturesFolder: false, + supportFile: false, + devServer: { + framework: 'next', + bundler: 'webpack', + }, + }, +}) diff --git a/system-tests/projects/issue-25951-next-app/cypress/support/component-index.html b/system-tests/projects/issue-25951-next-app/cypress/support/component-index.html new file mode 100644 index 000000000000..3e16e9b07db1 --- /dev/null +++ b/system-tests/projects/issue-25951-next-app/cypress/support/component-index.html @@ -0,0 +1,14 @@ + + + + + + + Components App + +
+ + +
+ + \ No newline at end of file diff --git a/system-tests/projects/issue-25951-next-app/next-env.d.ts b/system-tests/projects/issue-25951-next-app/next-env.d.ts new file mode 100644 index 000000000000..4f11a03dc6cc --- /dev/null +++ b/system-tests/projects/issue-25951-next-app/next-env.d.ts @@ -0,0 +1,5 @@ +/// +/// + +// NOTE: This file should not be edited +// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/system-tests/projects/issue-25951-next-app/next.config.js b/system-tests/projects/issue-25951-next-app/next.config.js new file mode 100644 index 000000000000..a843cbee09af --- /dev/null +++ b/system-tests/projects/issue-25951-next-app/next.config.js @@ -0,0 +1,6 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = { + reactStrictMode: true, +} + +module.exports = nextConfig diff --git a/system-tests/projects/issue-25951-next-app/package.json b/system-tests/projects/issue-25951-next-app/package.json new file mode 100644 index 000000000000..26f2eee3dc0e --- /dev/null +++ b/system-tests/projects/issue-25951-next-app/package.json @@ -0,0 +1,14 @@ +{ + "name": "issue-25951-next-app", + "version": "0.0.0", + "private": true, + "dependencies": { + "@types/node": "18.15.11", + "@types/react": "18.0.32", + "@types/react-dom": "18.0.11", + "next": "13.2.4", + "react": "18.2.0", + "react-dom": "18.2.0", + "typescript": "5.0.3" + } +} diff --git a/system-tests/projects/issue-25951-next-app/src/pages/_app.cy.tsx b/system-tests/projects/issue-25951-next-app/src/pages/_app.cy.tsx new file mode 100644 index 000000000000..7f53404debd6 --- /dev/null +++ b/system-tests/projects/issue-25951-next-app/src/pages/_app.cy.tsx @@ -0,0 +1,11 @@ +import React from 'react' +import { mount } from 'cypress/react18' +import App from './_app' + +describe('', () => { + it('renders', () => { + // see: https://on.cypress.io/mounting-react + mount() + cy.contains('Hello world') + }) +}) diff --git a/system-tests/projects/issue-25951-next-app/src/pages/_app.tsx b/system-tests/projects/issue-25951-next-app/src/pages/_app.tsx new file mode 100644 index 000000000000..cafe3d54edbf --- /dev/null +++ b/system-tests/projects/issue-25951-next-app/src/pages/_app.tsx @@ -0,0 +1,5 @@ +import 'styles/globals.css' + +export default function App () { + return
Hello world
+} diff --git a/system-tests/projects/issue-25951-next-app/src/styles/globals.css b/system-tests/projects/issue-25951-next-app/src/styles/globals.css new file mode 100644 index 000000000000..8ecd0b41f417 --- /dev/null +++ b/system-tests/projects/issue-25951-next-app/src/styles/globals.css @@ -0,0 +1,3 @@ +body { + background: skyblue; +} diff --git a/system-tests/projects/issue-25951-next-app/tsconfig.json b/system-tests/projects/issue-25951-next-app/tsconfig.json new file mode 100644 index 000000000000..3367eaf42d0d --- /dev/null +++ b/system-tests/projects/issue-25951-next-app/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "baseUrl": "src", + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "paths": { + "@/*": ["./src/*"] + } + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], + "exclude": ["node_modules"] +} diff --git a/system-tests/projects/issue-25951-next-app/yarn.lock b/system-tests/projects/issue-25951-next-app/yarn.lock new file mode 100644 index 000000000000..8857ad6f7e75 --- /dev/null +++ b/system-tests/projects/issue-25951-next-app/yarn.lock @@ -0,0 +1,226 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@next/env@13.2.4": + version "13.2.4" + resolved "https://registry.yarnpkg.com/@next/env/-/env-13.2.4.tgz#8b763700262b2445140a44a8c8d088cef676dbae" + integrity sha512-+Mq3TtpkeeKFZanPturjcXt+KHfKYnLlX6jMLyCrmpq6OOs4i1GqBOAauSkii9QeKCMTYzGppar21JU57b/GEA== + +"@next/swc-android-arm-eabi@13.2.4": + version "13.2.4" + resolved "https://registry.yarnpkg.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.2.4.tgz#758d0403771e549f9cee71cbabc0cb16a6c947c0" + integrity sha512-DWlalTSkLjDU11MY11jg17O1gGQzpRccM9Oes2yTqj2DpHndajrXHGxj9HGtJ+idq2k7ImUdJVWS2h2l/EDJOw== + +"@next/swc-android-arm64@13.2.4": + version "13.2.4" + resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-13.2.4.tgz#834d586523045110d5602e0c8aae9028835ac427" + integrity sha512-sRavmUImUCf332Gy+PjIfLkMhiRX1Ez4SI+3vFDRs1N5eXp+uNzjFUK/oLMMOzk6KFSkbiK/3Wt8+dHQR/flNg== + +"@next/swc-darwin-arm64@13.2.4": + version "13.2.4" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.2.4.tgz#5006fca179a36ef3a24d293abadec7438dbb48c6" + integrity sha512-S6vBl+OrInP47TM3LlYx65betocKUUlTZDDKzTiRDbsRESeyIkBtZ6Qi5uT2zQs4imqllJznVjFd1bXLx3Aa6A== + +"@next/swc-darwin-x64@13.2.4": + version "13.2.4" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.2.4.tgz#6549c7c04322766acc3264ccdb3e1b43fcaf7946" + integrity sha512-a6LBuoYGcFOPGd4o8TPo7wmv5FnMr+Prz+vYHopEDuhDoMSHOnC+v+Ab4D7F0NMZkvQjEJQdJS3rqgFhlZmKlw== + +"@next/swc-freebsd-x64@13.2.4": + version "13.2.4" + resolved "https://registry.yarnpkg.com/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.2.4.tgz#0bbe28979e3e868debc2cc06e45e186ce195b7f4" + integrity sha512-kkbzKVZGPaXRBPisoAQkh3xh22r+TD+5HwoC5bOkALraJ0dsOQgSMAvzMXKsN3tMzJUPS0tjtRf1cTzrQ0I5vQ== + +"@next/swc-linux-arm-gnueabihf@13.2.4": + version "13.2.4" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.2.4.tgz#1d28d2203f5a7427d6e7119d7bcb5fc40959fb3e" + integrity sha512-7qA1++UY0fjprqtjBZaOA6cas/7GekpjVsZn/0uHvquuITFCdKGFCsKNBx3S0Rpxmx6WYo0GcmhNRM9ru08BGg== + +"@next/swc-linux-arm64-gnu@13.2.4": + version "13.2.4" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.2.4.tgz#eb26448190948cdf4c44b8f34110a3ecea32f1d0" + integrity sha512-xzYZdAeq883MwXgcwc72hqo/F/dwUxCukpDOkx/j1HTq/J0wJthMGjinN9wH5bPR98Mfeh1MZJ91WWPnZOedOg== + +"@next/swc-linux-arm64-musl@13.2.4": + version "13.2.4" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.2.4.tgz#c4227c0acd94a420bb14924820710e6284d234d3" + integrity sha512-8rXr3WfmqSiYkb71qzuDP6I6R2T2tpkmf83elDN8z783N9nvTJf2E7eLx86wu2OJCi4T05nuxCsh4IOU3LQ5xw== + +"@next/swc-linux-x64-gnu@13.2.4": + version "13.2.4" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.2.4.tgz#6bcb540944ee9b0209b33bfc23b240c2044dfc3e" + integrity sha512-Ngxh51zGSlYJ4EfpKG4LI6WfquulNdtmHg1yuOYlaAr33KyPJp4HeN/tivBnAHcZkoNy0hh/SbwDyCnz5PFJQQ== + +"@next/swc-linux-x64-musl@13.2.4": + version "13.2.4" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.2.4.tgz#ce21e43251eaf09a09df39372b2c3e38028c30ff" + integrity sha512-gOvwIYoSxd+j14LOcvJr+ekd9fwYT1RyMAHOp7znA10+l40wkFiMONPLWiZuHxfRk+Dy7YdNdDh3ImumvL6VwA== + +"@next/swc-win32-arm64-msvc@13.2.4": + version "13.2.4" + resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.2.4.tgz#68220063d8e5e082f5465498675640dedb670ff1" + integrity sha512-q3NJzcfClgBm4HvdcnoEncmztxrA5GXqKeiZ/hADvC56pwNALt3ngDC6t6qr1YW9V/EPDxCYeaX4zYxHciW4Dw== + +"@next/swc-win32-ia32-msvc@13.2.4": + version "13.2.4" + resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.2.4.tgz#7c120ab54a081be9566df310bed834f168252990" + integrity sha512-/eZ5ncmHUYtD2fc6EUmAIZlAJnVT2YmxDsKs1Ourx0ttTtvtma/WKlMV5NoUsyOez0f9ExLyOpeCoz5aj+MPXw== + +"@next/swc-win32-x64-msvc@13.2.4": + version "13.2.4" + resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.2.4.tgz#5abda92fe12b9829bf7951c4a221282c56041144" + integrity sha512-0MffFmyv7tBLlji01qc0IaPP/LVExzvj7/R5x1Jph1bTAIj4Vu81yFQWHHQAP6r4ff9Ukj1mBK6MDNVXm7Tcvw== + +"@swc/helpers@0.4.14": + version "0.4.14" + resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.4.14.tgz#1352ac6d95e3617ccb7c1498ff019654f1e12a74" + integrity sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw== + dependencies: + tslib "^2.4.0" + +"@types/node@18.15.11": + version "18.15.11" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.11.tgz#b3b790f09cb1696cffcec605de025b088fa4225f" + integrity sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q== + +"@types/prop-types@*": + version "15.7.5" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" + integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== + +"@types/react-dom@18.0.11": + version "18.0.11" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.0.11.tgz#321351c1459bc9ca3d216aefc8a167beec334e33" + integrity sha512-O38bPbI2CWtgw/OoQoY+BRelw7uysmXbWvw3nLWO21H1HSh+GOlqPuXshJfjmpNlKiiSDG9cc1JZAaMmVdcTlw== + dependencies: + "@types/react" "*" + +"@types/react@*", "@types/react@18.0.32": + version "18.0.32" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.32.tgz#5e88b2af6833251d54ec7fe86d393224499f41d5" + integrity sha512-gYGXdtPQ9Cj0w2Fwqg5/ak6BcK3Z15YgjSqtyDizWUfx7mQ8drs0NBUzRRsAdoFVTO8kJ8L2TL8Skm7OFPnLUw== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + +"@types/scheduler@*": + version "0.16.3" + resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.3.tgz#cef09e3ec9af1d63d2a6cc5b383a737e24e6dcf5" + integrity sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ== + +caniuse-lite@^1.0.30001406: + version "1.0.30001473" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001473.tgz#3859898b3cab65fc8905bb923df36ad35058153c" + integrity sha512-ewDad7+D2vlyy+E4UJuVfiBsU69IL+8oVmTuZnH5Q6CIUbxNfI50uVpRHbUPDD6SUaN2o0Lh4DhTrvLG/Tn1yg== + +client-only@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/client-only/-/client-only-0.0.1.tgz#38bba5d403c41ab150bff64a95c85013cf73bca1" + integrity sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA== + +csstype@^3.0.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b" + integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ== + +"js-tokens@^3.0.0 || ^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +loose-envify@^1.1.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +nanoid@^3.3.4: + version "3.3.6" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" + integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== + +next@13.2.4: + version "13.2.4" + resolved "https://registry.yarnpkg.com/next/-/next-13.2.4.tgz#2363330392b0f7da02ab41301f60857ffa7f67d6" + integrity sha512-g1I30317cThkEpvzfXujf0O4wtaQHtDCLhlivwlTJ885Ld+eOgcz7r3TGQzeU+cSRoNHtD8tsJgzxVdYojFssw== + dependencies: + "@next/env" "13.2.4" + "@swc/helpers" "0.4.14" + caniuse-lite "^1.0.30001406" + postcss "8.4.14" + styled-jsx "5.1.1" + optionalDependencies: + "@next/swc-android-arm-eabi" "13.2.4" + "@next/swc-android-arm64" "13.2.4" + "@next/swc-darwin-arm64" "13.2.4" + "@next/swc-darwin-x64" "13.2.4" + "@next/swc-freebsd-x64" "13.2.4" + "@next/swc-linux-arm-gnueabihf" "13.2.4" + "@next/swc-linux-arm64-gnu" "13.2.4" + "@next/swc-linux-arm64-musl" "13.2.4" + "@next/swc-linux-x64-gnu" "13.2.4" + "@next/swc-linux-x64-musl" "13.2.4" + "@next/swc-win32-arm64-msvc" "13.2.4" + "@next/swc-win32-ia32-msvc" "13.2.4" + "@next/swc-win32-x64-msvc" "13.2.4" + +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + +postcss@8.4.14: + version "8.4.14" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf" + integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig== + dependencies: + nanoid "^3.3.4" + picocolors "^1.0.0" + source-map-js "^1.0.2" + +react-dom@18.2.0: + version "18.2.0" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" + integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g== + dependencies: + loose-envify "^1.1.0" + scheduler "^0.23.0" + +react@18.2.0: + version "18.2.0" + resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" + integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== + dependencies: + loose-envify "^1.1.0" + +scheduler@^0.23.0: + version "0.23.0" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe" + integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw== + dependencies: + loose-envify "^1.1.0" + +source-map-js@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== + +styled-jsx@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.1.1.tgz#839a1c3aaacc4e735fed0781b8619ea5d0009d1f" + integrity sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw== + dependencies: + client-only "0.0.1" + +tslib@^2.4.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" + integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== + +typescript@5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.3.tgz#fe976f0c826a88d0a382007681cbb2da44afdedf" + integrity sha512-xv8mOEDnigb/tN9PSMTwSEqAnUvkoXMQlicOb0IUVDBSQCgBSaAAROUZYy2IcUy5qU6XajK5jjjO7TMWqBTKZA== diff --git a/system-tests/test/component_testing_spec.ts b/system-tests/test/component_testing_spec.ts index 3081fd713217..28e11e1264bb 100644 --- a/system-tests/test/component_testing_spec.ts +++ b/system-tests/test/component_testing_spec.ts @@ -52,6 +52,14 @@ describe('component testing projects', function () { expectedExitCode: 0, }) + systemTests.it('issue-25951-next-app', { + project: 'issue-25951-next-app', + testingType: 'component', + spec: 'src/pages/_app.cy.tsx', + browser: 'chrome', + expectedExitCode: 0, + }) + systemTests.it('nuxtjs-vue2-configured', { project: 'nuxtjs-vue2-configured', testingType: 'component',