Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

protractor --specs mySpec.js myConf.js runs mySpec + specs[1..n] in myConf.js #304

Closed
imbroglioj opened this issue Nov 26, 2013 · 1 comment
Milestone

Comments

@imbroglioj
Copy link

I am assuming that
protractor --specs mySpec.js myConf.js
means to run only mySpec.js using the defaults from myConf.js for everything else.

In fact, if myConf.js config.specs is an array with more than one spec protractor will replace the first spec with mySpec.js and leave the rest of the array untouched.

The only workaround I can find is to specify everything from myConf.js as a command line argument, which is not ideal. (Or to always specify all the specs on the command line and leave conf config.specs empty)

to Test:
conf.js: specs: ['spec1.js', 'spec2.js']
command line: protractor --specs spec3.js conf.js
==> will run ['spec3.js', 'spec2.js']

This error will be hidden if you specify specs on the command line equal in number to or greater than are in conf.js

Cause: runner.js#merge (line 48 in release 0.13.0) handles Array as an Object, which is fine for extending the array, but does not work if the array should be shortened.

Let me know if more info is needed, or if I'm misunderstanding the intent of the --specs arg.

@juliemr
Copy link
Member

juliemr commented Nov 26, 2013

Good catch, this is indeed undesired behavior.

@juliemr juliemr closed this as completed in 1fa090c Dec 2, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants