Skip to content

Commit ce398fc

Browse files
committed
Fix unit tests, typescript error
1 parent 72196f1 commit ce398fc

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

packages/data-context/src/DataContext.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,17 @@ export class DataContext extends DataContextShell {
6464
}
6565

6666
if (this.config.launchArgs.testingType) {
67-
toAwait.push(this.actions.wizard.setTestingType(this.config.launchArgs.testingType))
67+
// It should be possible to skip the first step in the wizard, if the
68+
// user already told us the testing type via command line argument
69+
this.actions.wizard.setTestingType(this.config.launchArgs.testingType)
70+
this.actions.wizard.navigate('forward')
6871
}
6972

7073
if (IS_DEV_ENV) {
7174
this.actions.dev.watchForRelaunch()
7275
}
7376

74-
return Promise.all(toAwait).then(this.actions.wizard.navigate('forward'))
77+
return Promise.all(toAwait)
7578
}
7679

7780
get os () {

packages/server/test/unit/args_spec.js

-6
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,6 @@ describe('lib/util/args', () => {
438438
config: this.config,
439439
invokedFromCli: false,
440440
spec: this.specs,
441-
testingType: 'e2e',
442441
})
443442
})
444443

@@ -459,7 +458,6 @@ describe('lib/util/args', () => {
459458
`--config=${mergedConfig}`,
460459
`--cwd=${cwd}`,
461460
`--spec=${JSON.stringify(this.specs)}`,
462-
'--testingType=e2e',
463461
])
464462

465463
expect(argsUtil.toObject(args)).to.deep.eq({
@@ -468,7 +466,6 @@ describe('lib/util/args', () => {
468466
invokedFromCli: true,
469467
config: this.config,
470468
spec: this.specs,
471-
testingType: 'e2e',
472469
})
473470
})
474471

@@ -480,7 +477,6 @@ describe('lib/util/args', () => {
480477
cwd,
481478
_: [],
482479
invokedFromCli: false,
483-
testingType: 'e2e',
484480
config: {},
485481
})
486482
})
@@ -508,7 +504,6 @@ describe('lib/util/args', () => {
508504
appPath: '/Applications/Cypress.app',
509505
execPath: '/Applications/Cypress.app',
510506
invokedFromCli: false,
511-
testingType: 'e2e',
512507
updating: true,
513508
})
514509
})
@@ -534,7 +529,6 @@ describe('lib/util/args', () => {
534529
appPath: 'a',
535530
execPath: 'e',
536531
invokedFromCli: false,
537-
testingType: 'e2e',
538532
updating: true,
539533
})
540534
})

0 commit comments

Comments
 (0)