Skip to content

Commit fe5c05d

Browse files
committed
fix failing tests due to merge
1 parent ae9b7a3 commit fe5c05d

File tree

7 files changed

+61
-109
lines changed

7 files changed

+61
-109
lines changed

packages/server/test/integration/http_requests_spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ let ctx
8383
describe('Routes', () => {
8484
require('mocha-banner').register()
8585

86-
beforeEach(function () {
86+
beforeEach(async function () {
87+
await Fixtures.scaffoldCommonNodeModules()
8788
ctx = makeLegacyDataContext()
8889
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'
8990

system-tests/lib/fixtures.js

Lines changed: 0 additions & 95 deletions
This file was deleted.

system-tests/lib/fixtures.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const root = _path.join(__dirname, '..')
99

1010
const serverRoot = _path.join(__dirname, '../../packages/server/')
1111
const projects = _path.join(root, 'projects')
12-
const tmpDir = _path.join(os.tmpdir(), 'cy-projects')
12+
let tmpDir = _path.join(os.tmpdir(), 'cy-projects')
1313

1414
// copy contents instead of deleting+creating new file, which can cause
1515
// filewatchers to lose track of toFile.
@@ -175,7 +175,7 @@ export async function scaffoldProjectNodeModules (project: string, updateYarnLoc
175175

176176
const runCmd = async (cmd) => {
177177
console.log(`📦 Running "${cmd}" in ${projectDir}`)
178-
await execa.shell(cmd, { cwd: projectDir, stdio: 'inherit' })
178+
await execa(cmd, { cwd: projectDir, stdio: 'inherit', shell: true })
179179
}
180180

181181
const cacheDir = _path.join(cachedir('cy-system-tests-node-modules'), project, 'node_modules')
@@ -343,4 +343,8 @@ export function path (fixture) {
343343
return _path.join(serverRoot, 'test', 'support', 'fixtures', fixture)
344344
}
345345

346+
export function setTmpDir (dir: string) {
347+
tmpDir = dir
348+
}
349+
346350
export default module.exports

system-tests/lib/system-tests.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -691,11 +691,11 @@ const systemTests = {
691691
this.servers = null
692692
}
693693

694-
const s = options.settings
694+
// const s = options.settings
695695

696-
if (s) {
697-
await settings.writeOnly(e2ePath, s)
698-
}
696+
// if (s) {
697+
// await settings.writeOnly(e2ePath, s)
698+
// }
699699
})
700700

701701
afterEach(async function () {
@@ -780,10 +780,6 @@ const systemTests = {
780780
`--testingType=${options.testingType || 'e2e'}`,
781781
]
782782

783-
if (options.testingType) {
784-
args.push(`--testingType=${options.testingType}`)
785-
}
786-
787783
if (options.spec) {
788784
args.push(`--spec=${options.spec}`)
789785
}
@@ -925,7 +921,7 @@ const systemTests = {
925921
}
926922

927923
if (ctx.settings) {
928-
await settings.write(e2ePath, ctx.settings)
924+
await settings.writeOnly(e2ePath, ctx.settings)
929925
}
930926

931927
args = options.args || ['index.js'].concat(args)

system-tests/projects/retries-2/cypress.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module.exports = {
22
'retries': 2,
33
'e2e': {
44
setupNodeEvents (on, config) {
5-
const { useFixedBrowserLaunchSize } = require('../utils')
5+
const { useFixedBrowserLaunchSize } = require('@tooling/system-tests/lib/pluginUtils')
66

77
on('before:browser:launch', (browser, options) => {
88
useFixedBrowserLaunchSize(browser, options, config)
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+
5+
"js-tokens@^3.0.0 || ^4.0.0":
6+
version "4.0.0"
7+
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
8+
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
9+
10+
loose-envify@^1.1.0:
11+
version "1.4.0"
12+
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
13+
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
14+
dependencies:
15+
js-tokens "^3.0.0 || ^4.0.0"
16+
17+
object-assign@^4.1.1:
18+
version "4.1.1"
19+
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
20+
integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
21+
22+
react-dom@*:
23+
version "17.0.2"
24+
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23"
25+
integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==
26+
dependencies:
27+
loose-envify "^1.1.0"
28+
object-assign "^4.1.1"
29+
scheduler "^0.20.2"
30+
31+
react@*:
32+
version "17.0.2"
33+
resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037"
34+
integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==
35+
dependencies:
36+
loose-envify "^1.1.0"
37+
object-assign "^4.1.1"
38+
39+
scheduler@^0.20.2:
40+
version "0.20.2"
41+
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91"
42+
integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==
43+
dependencies:
44+
loose-envify "^1.1.0"
45+
object-assign "^4.1.1"

system-tests/test/config_spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,12 @@ describe('e2e config', () => {
7777
})
7878

7979
it('throws error when multiple default config file are found in project', function () {
80+
Fixtures.scaffoldProject('pristine-with-config-file')
8081
const projectRoot = Fixtures.projectPath('pristine-with-config-file')
8182

8283
return fs.writeFile(path.join(projectRoot, 'cypress.config.ts'), 'export default {}').then(() => {
8384
return systemTests.exec(this, {
84-
project: projectRoot,
85+
project: 'pristine-with-config-file',
8586
expectedExitCode: 1,
8687
snapshot: true,
8788
})

0 commit comments

Comments
 (0)