multiCapabilities and jasmine focused tests multiCapabilities and jasmine focused tests selenium selenium

multiCapabilities and jasmine focused tests


I wonder if you can do something to wrap the it statements like:

onPrepare: function() {    browser.getCapabilities().then(function(caps) {        global.browserName = caps.caps_.browserName;    });    global.firefoxOnly = function(name, testFunction) {        if (browserName === 'firefox') {            return it(name, testFunction);        } else {            return xit(name, testFunction).pend('firefox only');        }    };}

Then when you write a test, instead of it use something like:

describe('when I do something', function() {    firefoxOnly('it should do the right thing', function() {        doSomething();        expect(thing).toBe(right);    )};});

I have no idea if this actually works, just throwing it out there. In fact, when I get back to my testing computer and try it out, I would be interested in adding a function like wip to use instead of xit to automatically pend my ATDD tests!


Is there a way to tell protractor to use the only one capability that has a focused spec configured?

According to the relevant github issue, it is not possible.