Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: CT stack traces #23916

Merged
merged 40 commits into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
5911a1f
feat: ct stack traces
ZachJW34 Sep 7, 2022
3e513f0
Merge branch 'develop' into mikep/21720-ct-stack-traces
mike-plummer Sep 14, 2022
7e8ef64
Merge branch 'develop' into mikep/21720-ct-stack-traces
mike-plummer Sep 16, 2022
68ea7bf
Begin adding tests
mike-plummer Sep 16, 2022
ddb9e3c
Fix event and ts tests for webpack
mike-plummer Sep 16, 2022
2999062
Remove test cases that don't apply to CT
mike-plummer Sep 19, 2022
a6412e7
Merge branch 'develop' into mikep/21720-ct-stack-traces
mike-plummer Sep 19, 2022
477c3d9
Fix tests
mike-plummer Sep 19, 2022
e1d5e69
Generate sourcemap for JS files in vite dev server
mike-plummer Sep 19, 2022
04c3a40
Simplify sourcemap generation for Vite
mike-plummer Sep 19, 2022
f73655d
Fix vite config
mike-plummer Sep 19, 2022
c293c99
Add framework-specific error tests
mike-plummer Sep 20, 2022
f3b4667
Fix tests
mike-plummer Sep 20, 2022
fcfedc9
Fixing tests and ts issue
mike-plummer Sep 21, 2022
1544e16
Fix tests
mike-plummer Sep 21, 2022
4d9a965
Fix tests
mike-plummer Sep 21, 2022
e04f718
Merge branch 'develop' into mikep/21720-ct-stack-traces
mike-plummer Sep 21, 2022
536c0f9
Fix tests
mike-plummer Sep 21, 2022
0b3ece1
Address code review comments
mike-plummer Sep 22, 2022
dac2127
feat: update dev server e2e tests and webpack config test
astone123 Sep 22, 2022
19f7f52
Address code review comments
mike-plummer Sep 22, 2022
2010396
Merge branch 'develop' into mikep/21720-ct-stack-traces
mike-plummer Sep 22, 2022
d54ccd4
Reintroduce stringify when building support file path
mike-plummer Sep 23, 2022
e83ad1e
Fix path quotes
mike-plummer Sep 23, 2022
36ee219
Merge branch 'develop' into mikep/21720-ct-stack-traces
mike-plummer Sep 23, 2022
537c927
run branch on windows CI
lmiller1990 Sep 26, 2022
e8cc459
chore: revert yarn.lock
lmiller1990 Sep 26, 2022
1a0c483
run windows
lmiller1990 Sep 26, 2022
f214dac
fix: correct paths for source map consumer on windows
lmiller1990 Sep 26, 2022
ec90a46
merge in CI fix
lmiller1990 Sep 26, 2022
ee44cc0
update lockfile
lmiller1990 Sep 26, 2022
6470c45
Add Next and Nuxt test cases
mike-plummer Sep 26, 2022
fbb4f63
Refactor `runner-e2e-specs` system test project
mike-plummer Sep 26, 2022
27be22a
Increase timeout for Windows
mike-plummer Sep 26, 2022
9c36f89
Merge branch 'develop' into mikep/21720-ct-stack-traces
mike-plummer Sep 26, 2022
2b02694
Run Windows CI
mike-plummer Sep 26, 2022
0a996b4
Refactor tests to avoid OOM, scaffold in beforeEach for windows
mike-plummer Sep 26, 2022
d6b8203
Fix tests on Windows
mike-plummer Sep 26, 2022
2ccb97b
Increase timeouts
mike-plummer Sep 26, 2022
8ba8aa9
Fix sourcemap path issue on Windows
mike-plummer Sep 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ windowsWorkflowFilters: &windows-workflow-filters
or:
- equal: [ develop, << pipeline.git.branch >> ]
- equal: [ linux-arm64, << pipeline.git.branch >> ]
- equal: [ 'lmiller/fixing-windows-ci', << pipeline.git.branch >> ]
- equal: [ 'mikep/21720-ct-stack-traces', << pipeline.git.branch >> ]
- matches:
pattern: "-release$"
value: << pipeline.git.branch >>
Expand Down
14 changes: 12 additions & 2 deletions npm/vite-dev-server/client/initCypressTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,22 @@ if (supportFile) {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related to this file but @brian-mann pointed out we will also want to run

As well, but with CT.

These are the ones that verify the typescript compiler is correctly monkey patched to generate the correct source maps in E2E when using webpack-preprocessor.

The monkey patch is here: https://github.com/cypress-io/cypress/blob/develop/npm/webpack-preprocessor/lib/typescript-overrides.ts#L39-L45

It's possible this is actually not required. if {webpack,vite}-dev-server already do this (or something like this). We can find out by running these tests in CT, and see if they pass. If they don't, we might need something similar.

Ref: https://cypressio.slack.com/archives/C011BAPC614/p1662579814502909

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am working this in another branch to avoid complicating this PR any further. Will open as a follow-on PR in case there are complications so we don't block the main stacktraces featureset from release - seems to be working as expected once I ported the patch logic over except for a special case for Angular

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, sounds good

// We need a slash before /cypress/supportFile.js, this happens by default
// with the current string replacement logic.
importsToLoad.push(() => import(`${devServerPublicPathRoute}${supportRelativeToProjectRoot}`))
importsToLoad.push({
load: () => import(`${devServerPublicPathRoute}${supportRelativeToProjectRoot}`),
absolute: supportFile,
relative: supportRelativeToProjectRoot,
relativeUrl: `${devServerPublicPathRoute}${supportRelativeToProjectRoot}`,
})
}

/* Spec file import logic */
// We need a slash before /src/my-spec.js, this does not happen by default.
importsToLoad.push(() => import(`${devServerPublicPathRoute}/${CypressInstance.spec.relative}`))
importsToLoad.push({
load: () => import(`${devServerPublicPathRoute}/${CypressInstance.spec.relative}`),
absolute: CypressInstance.spec.absolute,
relative: CypressInstance.spec.relative,
relativeUrl: `${devServerPublicPathRoute}/${CypressInstance.spec.relative}`,
})

if (!CypressInstance) {
throw new Error('Tests cannot run without a reference to Cypress!')
Expand Down
1 change: 1 addition & 0 deletions npm/vite-dev-server/cypress/e2e/react.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ for (const project of VITE_REACT) {
cy.contains('MissingReactInSpec.cy.jsx').click()
cy.waitForSpecToFinish()
cy.get('.failed > .num').should('contain', 1)
cy.get('.test-err-code-frame').should('be.visible')
cy.withCtx(async (ctx) => {
await ctx.actions.file.writeFileInProject(`src/MissingReactInSpec.cy.jsx`,
await ctx.file.readFileInProject('src/App.cy.jsx'))
Expand Down
21 changes: 21 additions & 0 deletions npm/vite-dev-server/src/plugins/cypress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,27 @@ export const Cypress = (
return res.end(transformedIndexHtml)
})
},
transform (code, id, options?) {
try {
if (/\.js$/i.test(id) && !/\/\/# sourceMappingURL=/i.test(code)) {
// The Vite dev server and plugins automatically transpile TS and JSX files, which results in sourcemaps being generated
// and included in output. However, Vite serves up `esnext`-compliant Javascript which means many JS files won't be
// transpiled and won't supply a sourcemap - this prevents Cypress from providing codeFrames in the event of an error.
//
// A sourcemap is generated by Vite for JS files (just not included) which is in effect an "identity" sourcemap mapping
// 1-to-1 to the output file. We can grab this and pass it along as a sourcemap we want Vite to embed into the output,
// giving Cypress a sourcemap to use for codeFrame lookups.
// @see https://rollupjs.org/guide/en/#thisgetcombinedsourcemap

return {
code,
map: this.getCombinedSourcemap(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, took me a bit to realize this is from the underyling Rollup API https://rollupjs.org/guide/en/#thisgetcombinedsourcemap

According to the Vite docs map: null should do the same thing? https://vitejs.dev/guide/api-plugin.html#transforming-custom-file-types

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edit, apparently not - as per your comment above, we do need to call this function, but I don't quite know why. I still think I'm missing some understanding here. If you write something like:

interface Blah {
  foo: string
}

const blah = (): Blah => { 
  throw Error('argh')
  return { foo: "bar" }
}

blah()

And serve via Vite - it strips out TS, but this would require a sourcemap to get correct error location - if Vite doesn't generate sourcemaps, how does this error manifest in a regular Vite dev env?

I'll try it out. Hm.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems Vite is generating a sourcemap normally. I wonder why we need to do this - why can't we do map: null and get it like the docs specify?

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lmiller1990 I think it comes down to the difference between serving a "pure" JS file vs a typescript or JSX sort of file. The getCombinedSourcemap() workaround was necessary for Vite to provide a sourceMappingURL entry within pure JS files it serves up (for example, a basic Cypress test without any crazy imports, typescript, JSX, etc).

Vite has to transpile TS and JSX files so a sourcemap is appended automatically, but for JS files that don't require transpilation (just served up as-is) the sourcemap was not getting appended unless I added that explicit call.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, so you are saying it will automatically append the sourceMap for anything other than plain JS... this is only required for the case of plain JS (eg, does it "just work" for TSX, for example, even if I remove this?) This is my understanding based on your comment. I will try this to find out if my assumption is correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lmiller1990 Correct - this is here to handle the case where source JS files would not get sourcemaps. Pretty much everything else did without this change

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, since normally you don't need source maps for JS - nothing to map 🎉 This worked out surprisingly well, glad Vite exposes the Rollup API.

}
}
} catch (_err) {
debug('Failed to propagate sourcemap for %s: %o', id, _err)
}
},
handleHotUpdate: ({ server, file }) => {
debug('handleHotUpdate - file', file)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@ exports['makeWebpackConfig ignores userland webpack `output.publicPath` and `dev
"overlay": false
}
},
"mode": "development",
"optimization": {
"emitOnErrors": true,
"splitChunks": {
"chunks": "all"
}
},
"mode": "development",
"plugins": [
"HtmlWebpackPlugin",
"CypressCTWebpackPlugin"
]
],
"devtool": "inline-source-map"
}

exports['makeWebpackConfig ignores userland webpack `output.publicPath` and `devServer.overlay` with webpack-dev-server v3 1'] = {
Expand All @@ -32,15 +33,16 @@ exports['makeWebpackConfig ignores userland webpack `output.publicPath` and `dev
"progress": true,
"overlay": false
},
"mode": "development",
"optimization": {
"noEmitOnErrors": false,
"splitChunks": {
"chunks": "all"
}
},
"mode": "development",
"plugins": [
"HtmlWebpackPlugin",
"CypressCTWebpackPlugin"
]
],
"devtool": "inline-source-map"
}
1 change: 1 addition & 0 deletions npm/webpack-dev-server/cypress/e2e/angular.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ for (const project of WEBPACK_REACT) {
// The test should fail and the stack trace should appear in the command log
cy.waitForSpecToFinish({ failCount: 1 })
cy.contains('The following error originated from your test code, not from Cypress.').should('exist')
cy.get('.test-err-code-frame').should('be.visible')
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23455
Expand Down
1 change: 1 addition & 0 deletions npm/webpack-dev-server/cypress/e2e/create-react-app.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ for (const project of WEBPACK_REACT) {
})

cy.waitForSpecToFinish({ failCount: 1 })
cy.get('.test-err-code-frame').should('be.visible')

cy.withCtx(async (ctx) => {
await ctx.actions.file.writeFileInProject(
Expand Down
1 change: 1 addition & 0 deletions npm/webpack-dev-server/cypress/e2e/next.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ for (const project of WEBPACK_REACT) {
})

cy.waitForSpecToFinish({ failCount: 1 })
cy.get('.test-err-code-frame').should('be.visible')

cy.withCtx(async (ctx) => {
const indexTestPath = ctx.path.join('pages', 'index.cy.js')
Expand Down
1 change: 1 addition & 0 deletions npm/webpack-dev-server/cypress/e2e/nuxt.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ for (const project of PROJECTS) {
})

cy.waitForSpecToFinish({ failCount: 1 })
cy.get('.test-err-code-frame').should('be.visible')

cy.withCtx(async (ctx) => {
const tutorialCyPath = ctx.path.join('components', 'Tutorial.cy.js')
Expand Down
28 changes: 12 additions & 16 deletions npm/webpack-dev-server/cypress/e2e/react.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ for (const project of WEBPACK_REACT) {
it('should mount a passing test', () => {
cy.visitApp()
cy.contains('App.cy.jsx').click()
cy.waitForSpecToFinish()
cy.get('.passed > .num').should('contain', 1)
cy.waitForSpecToFinish({ passCount: 1 })
})

it('MissingReact: should fail, rerun, succeed', () => {
Expand All @@ -36,15 +35,15 @@ for (const project of WEBPACK_REACT) {

cy.visitApp()
cy.contains('MissingReact.cy.jsx').click()
cy.waitForSpecToFinish()
cy.get('.failed > .num').should('contain', 1)
cy.waitForSpecToFinish({ failCount: 1 })
cy.get('.test-err-code-frame').should('be.visible')
cy.withCtx(async (ctx) => {
await ctx.actions.file.writeFileInProject(`src/MissingReact.jsx`,
`import React from 'react';
${await ctx.file.readFileInProject('src/MissingReact.jsx')}`)
})

cy.get('.passed > .num').should('contain', 1)
cy.waitForSpecToFinish({ passCount: 1 })
})

it('MissingReactInSpec: should fail, rerun, succeed', () => {
Expand All @@ -55,14 +54,14 @@ for (const project of WEBPACK_REACT) {

cy.visitApp()
cy.contains('MissingReactInSpec.cy.jsx').click()
cy.waitForSpecToFinish()
cy.get('.failed > .num').should('contain', 1)
cy.waitForSpecToFinish({ failCount: 1 })
cy.get('.test-err-code-frame').should('be.visible')
cy.withCtx(async (ctx) => {
await ctx.actions.file.writeFileInProject(`src/MissingReactInSpec.cy.jsx`,
await ctx.file.readFileInProject('src/App.cy.jsx'))
})

cy.get('.passed > .num').should('contain', 1)
cy.waitForSpecToFinish({ passCount: 1 })
})

it('AppCompilationError: should fail with uncaught exception error', () => {
Expand All @@ -73,8 +72,7 @@ for (const project of WEBPACK_REACT) {

cy.visitApp()
cy.contains('AppCompilationError.cy.jsx').click()
cy.waitForSpecToFinish()
cy.get('.failed > .num').should('contain', 1)
cy.waitForSpecToFinish({ failCount: 1 })
cy.contains('An uncaught error was detected outside of a test')
cy.contains('The following error originated from your test code, not from Cypress.')

Expand All @@ -86,8 +84,7 @@ for (const project of WEBPACK_REACT) {
)
})

cy.waitForSpecToFinish()
cy.get('.passed > .num').should('contain', 1)
cy.waitForSpecToFinish({ passCount: 1 })

const appCompilationErrorSpec = dedent`
import React from 'react'
Expand All @@ -109,8 +106,7 @@ for (const project of WEBPACK_REACT) {
)
}, { appCompilationErrorSpec })

cy.waitForSpecToFinish()
cy.get('.failed > .num').should('contain', 1)
cy.waitForSpecToFinish({ failCount: 1 })
cy.contains('An uncaught error was detected outside of a test')
cy.contains('The following error originated from your test code, not from Cypress.')
})
Expand All @@ -121,7 +117,7 @@ for (const project of WEBPACK_REACT) {

// 1. assert spec executes successfully
cy.contains('App.cy.jsx').click()
cy.get('.passed > .num').should('contain', 1)
cy.waitForSpecToFinish({ passCount: 1 })

// 2. remove file from file system
cy.withCtx(async (ctx) => {
Expand All @@ -143,7 +139,7 @@ for (const project of WEBPACK_REACT) {
})

// 5. assert recreated spec executes successfully
cy.get('.passed > .num').should('contain', 1)
cy.waitForSpecToFinish({ passCount: 1 })
})
})
}
30 changes: 30 additions & 0 deletions npm/webpack-dev-server/cypress/e2e/vue-cli.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,36 @@ for (const project of PROJECTS) {
})
})

it('should live-reload on src changes', () => {
cy.visitApp()

cy.contains('HelloWorld.cy.js').click()
cy.waitForSpecToFinish({ passCount: 1 })

cy.withCtx(async (ctx) => {
const helloWorldVuePath = ctx.path.join('src', 'components', 'HelloWorld.vue')

await ctx.actions.file.writeFileInProject(
helloWorldVuePath,
(await ctx.file.readFileInProject(helloWorldVuePath)).replace('{{ msg }}', ''),
)
})

cy.waitForSpecToFinish({ failCount: 1 })
cy.get('.test-err-code-frame').should('be.visible')

cy.withCtx(async (ctx) => {
const helloWorldVuePath = ctx.path.join('src', 'components', 'HelloWorld.vue')

await ctx.actions.file.writeFileInProject(
helloWorldVuePath,
(await ctx.file.readFileInProject(helloWorldVuePath)).replace('<h1></h1>', '<h1>{{ msg }}</h1>'),
)
})

cy.waitForSpecToFinish({ passCount: 1 })
})

it('should show compilation errors on src changes', () => {
cy.visitApp()

Expand Down
9 changes: 9 additions & 0 deletions npm/webpack-dev-server/src/helpers/angularHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as fs from 'fs-extra'
import { tmpdir } from 'os'
import * as path from 'path'
import { pathToFileURL } from 'url'
import type { Configuration } from 'webpack'
import type { PresetHandlerResult, WebpackDevServerConfig } from '../devServer'
import { sourceDefaultWebpackDependencies } from './sourceRelativeWebpackModules'

Expand Down Expand Up @@ -253,8 +254,16 @@ async function getAngularCliWebpackConfig (devServerConfig: AngularWebpackDevSer
return config
}

function removeSourceMapPlugin (config: Configuration) {
config.plugins = config.plugins?.filter((plugin) => {
return plugin?.constructor?.name !== 'SourceMapDevToolPlugin'
})
}

export async function angularHandler (devServerConfig: AngularWebpackDevServerConfig): Promise<PresetHandlerResult> {
const webpackConfig = await getAngularCliWebpackConfig(devServerConfig)

removeSourceMapPlugin(webpackConfig)

return { frameworkConfig: webpackConfig, sourceWebpackModulesResult: sourceDefaultWebpackDependencies(devServerConfig) }
}
25 changes: 19 additions & 6 deletions npm/webpack-dev-server/src/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ const makeImport = (file: Cypress.Cypress['spec'], filename: string, chunkName:
return `"${filename}": {
shouldLoad: () => document.location.pathname.includes("${encodeURI(file.absolute)}"),
load: () => import("${file.absolute}" ${magicComments}),
chunkName: "${chunkName}",
absolute: "${file.absolute.split(path.sep).join(path.posix.sep)}",
relative: "${file.relative.split(path.sep).join(path.posix.sep)}",
relativeUrl: "/__cypress/src/${chunkName}.js",
}`
}

Expand Down Expand Up @@ -60,21 +62,32 @@ export default function loader (this: unknown) {
const { files, projectRoot, supportFile } = ctx._cypress

const supportFileAbsolutePath = supportFile ? JSON.stringify(path.resolve(projectRoot, supportFile)) : undefined

return `
var loadSupportFile = ${supportFile ? `() => import(${supportFileAbsolutePath})` : `() => Promise.resolve()`}
const supportFileRelativePath = supportFile ? JSON.stringify(path.relative(projectRoot, supportFileAbsolutePath || '')) : undefined
const result = `
var allTheSpecs = ${buildSpecs(projectRoot, files)};

var { init } = require(${JSON.stringify(require.resolve('./aut-runner'))})

var scriptLoaders = Object.values(allTheSpecs).reduce(
(accSpecLoaders, specLoader) => {
if (specLoader.shouldLoad()) {
accSpecLoaders.push(specLoader.load)
accSpecLoaders.push(specLoader)
}
return accSpecLoaders
}, [loadSupportFile])
}, [])

if (${!!supportFile}) {
var supportFile = {
absolute: ${supportFileAbsolutePath},
relative: ${supportFileRelativePath},
relativeUrl: "/__cypress/src/cypress-support-file.js",
lmiller1990 marked this conversation as resolved.
Show resolved Hide resolved
load: () => import(${supportFileAbsolutePath} /* webpackChunkName: "cypress-support-file" */),
}
scriptLoaders.unshift(supportFile)
}

init(scriptLoaders)
`

return result
}
1 change: 1 addition & 0 deletions npm/webpack-dev-server/src/makeDefaultWebpackConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export function makeDefaultWebpackConfig (
...(config.devServerConfig.framework === 'angular' ? { scriptLoading: 'module' } : {}),
}),
],
devtool: 'inline-source-map',
astone123 marked this conversation as resolved.
Show resolved Hide resolved
} as any

if (config.sourceWebpackModulesResult.webpackDevServer.majorVersion === 4) {
Expand Down
5 changes: 5 additions & 0 deletions npm/webpack-dev-server/src/makeWebpackConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ export async function makeWebpackConfig (
dynamicWebpackConfig,
)

// Some frameworks (like Next.js) change this value which changes the path we would need to use to fetch our spec.
// (eg, http://localhost:xxxx/<dev-server-public-path>/static/chunks/spec-<x>.js). Deleting this key to normalize
// the spec URL to `*/spec-<x>.js` which we need to know up-front so we can fetch the sourcemaps.
delete mergedConfig.output?.chunkFilename
lmiller1990 marked this conversation as resolved.
Show resolved Hide resolved

// Angular loads global styles and polyfills via script injection in the index.html
if (framework === 'angular') {
mergedConfig.entry = {
Expand Down
2 changes: 2 additions & 0 deletions npm/webpack-dev-server/test/makeWebpackConfig.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ describe('makeWebpackConfig', () => {
optimization: {
noEmitOnErrors: true, // This will be overridden by makeWebpackConfig.ts
},
devtool: 'eval', // This will be overridden by makeWebpackConfig.ts
},
devServerEvents: new EventEmitter(),
}
Expand Down Expand Up @@ -77,6 +78,7 @@ describe('makeWebpackConfig', () => {
optimization: {
emitOnErrors: false, // This will be overridden by makeWebpackConfig.ts
},
devtool: 'eval', // This will be overridden by makeWebpackConfig.ts
},
devServerEvents: new EventEmitter(),
}
Expand Down
1 change: 1 addition & 0 deletions packages/app/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export default defineConfig({
// Delete this as we only want to honor it on parent Cypress when doing E2E Cypress in Cypress testing
delete process.env.HTTP_PROXY_TARGET_FOR_ORIGIN_REQUESTS
process.env.CYPRESS_INTERNAL_E2E_TESTING_SELF = 'true'
process.env.CYPRESS_INTERNAL_VITE_OPEN_MODE_TESTING = 'true'
lmiller1990 marked this conversation as resolved.
Show resolved Hide resolved
// process.env.DEBUG = '*'
const { e2ePluginSetup } = require('@packages/frontend-shared/cypress/e2e/e2ePluginSetup')

Expand Down