mirror of
https://github.com/cypress-io/cypress.git
synced 2026-04-23 23:49:43 -05:00
Allow passing a list of space-separated specs to --spec (#3375)
* cli: add otherSpecs for varargs [wip] * scripts: pass command-line args through to debugged command * cli: parse space-delimited specs * cli: undo unneeded * cli: cleaned up parseVariableOpts, added warning * cli: cleanup * cli: add tests * cli: glorious whitespace * cli: a more robust test * cli: better snapshot * server: strip single-quotes around --spec arg #2298
This commit is contained in:
committed by
Brian Mann
parent
6a53b4bed1
commit
5a0d8b5cfe
@@ -228,15 +228,29 @@ describe('cli', () => {
|
||||
expect(run.start).to.be.calledWith({ parallel: true })
|
||||
})
|
||||
|
||||
it('calls runs with --ci-build-id', () => {
|
||||
it('calls run with --ci-build-id', () => {
|
||||
this.exec('run --ci-build-id 123')
|
||||
expect(run.start).to.be.calledWith({ ciBuildId: '123' })
|
||||
})
|
||||
|
||||
it('calls runs with --group', () => {
|
||||
it('calls run with --group', () => {
|
||||
this.exec('run --group staging')
|
||||
expect(run.start).to.be.calledWith({ group: 'staging' })
|
||||
})
|
||||
|
||||
it('calls run with space-separated --specs', () => {
|
||||
this.exec('run --spec a b c d e f g')
|
||||
expect(run.start).to.be.calledWith({ spec: 'a,b,c,d,e,f,g' })
|
||||
this.exec('run --dev bang --spec foo bar baz -P ./')
|
||||
expect(run.start).to.be.calledWithMatch({ spec: 'foo,bar,baz' })
|
||||
})
|
||||
|
||||
it('warns with space-separated --specs', (done) => {
|
||||
sinon.spy(logger, 'warn')
|
||||
this.exec('run --spec a b c d e f g --dev')
|
||||
snapshot(logger.warn.getCall(0).args[0])
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
context('cypress open', () => {
|
||||
|
||||
@@ -18,6 +18,7 @@ describe('exec run', function () {
|
||||
const args = run.processRunOptions({
|
||||
browser: 'test browser',
|
||||
})
|
||||
|
||||
snapshot(args)
|
||||
})
|
||||
|
||||
@@ -25,6 +26,7 @@ describe('exec run', function () {
|
||||
const args = run.processRunOptions({
|
||||
record: 'my record id',
|
||||
})
|
||||
|
||||
snapshot(args)
|
||||
})
|
||||
|
||||
@@ -33,6 +35,7 @@ describe('exec run', function () {
|
||||
record: 'foo',
|
||||
browser: 'test browser',
|
||||
})
|
||||
|
||||
snapshot(args)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user