Skip to content

Commit bc3bc6e

Browse files
committed
Main cypress open script now always goes through launchpad even if --e2e or --ct are used (if LAUNCHPAD=1)
1 parent d6d03fb commit bc3bc6e

File tree

4 files changed

+11
-13
lines changed

4 files changed

+11
-13
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"precypress:open:debug": "yarn ensure-deps",
2828
"cypress:open:debug": "node ./scripts/debug.js cypress:open",
2929
"precypress:run": "yarn ensure-deps",
30-
"cypress:run": "cypress run-ct --dev",
30+
"cypress:run": "cypress run --dev",
3131
"precypress:run:debug": "yarn ensure-deps",
3232
"cypress:run:debug": "node ./scripts/debug.js cypress:run",
3333
"cypress:verify": "cypress verify --dev",

packages/server/lib/gui/windows.ts

-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { BrowserWindow } from 'electron'
55
import Debug from 'debug'
66
import cwd from '../cwd'
77
import savedState from '../saved_state'
8-
import { getPathToDesktopIndex } from '@packages/resolve-dist'
98

109
const debug = Debug('cypress:server:windows')
1110

@@ -32,7 +31,6 @@ const getUrl = function (type, port?: number) {
3231
throw new Error(`No acceptable window type found for: '${type}'`)
3332
}
3433
}
35-
3634
const getByType = (type) => {
3735
return windows[type]
3836
}

packages/server/lib/modes/index.ts

+10-9
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,20 @@ export = (mode, options) => {
77
return require('./smoke_test').run(options)
88
}
99

10-
if (mode === 'run' && options.testingType === 'e2e') {
10+
if (mode === 'run') {
11+
if (options.testingType === 'component') {
12+
return require('./run-ct').run(options)
13+
}
14+
1115
return require('./run-e2e').run(options)
1216
}
1317

14-
if (mode === 'run' && options.testingType === 'component') {
15-
return require('./run-ct').run(options)
16-
}
18+
if (mode === 'interactive') {
19+
if (options.testingType === 'component' && !process.env.LAUNCHPAD) {
20+
return require('./interactive-ct').run(options)
21+
}
1722

18-
if (mode === 'interactive' && options.testingType === 'e2e') {
23+
// Either launchpad or straight to e2e tests
1924
return require('./interactive-e2e').run(options)
2025
}
21-
22-
if (mode === 'interactive' && options.testingType === 'component') {
23-
return require('./interactive-ct').run(options)
24-
}
2526
}

packages/server/lib/util/args.js

-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ module.exports = {
211211
// set in case we
212212
// bypassed the cli
213213
cwd: process.cwd(),
214-
testingType: 'e2e',
215214
})
216215
.mapValues(coerceUtil.coerce)
217216
.value()

0 commit comments

Comments
 (0)