1
votes

I have config and specs files at shared folder of remote server. I run tests from local machine via console:

C:\Users\User>protractor \remoteServer\AutoSPA\config\protractor.conf.js With jasmine framework all works good, but if I set framework: 'jasmine2' in protractor.conf.js tests don`t run:

Starting selenium standalone server... [launcher] Running 1 instances of WebDriver Selenium standalone server started at http://10.17.175.168:50910/wd/hub Started

No specs found Finished in 0.001 seconds Uncaught exception: Error while waiting for Protractor to sync with the page: "angular could not be found on the window" [launcher] Process exited with error code 1

EXAMPLE: conf.js:

exports.config  =  {
    specs: ['./test.js'],    
    capabilities : {'browserName' : 'chrome'},
    framework: 'jasmine2',
    jasmineNodeOpts: {showColors: true}
};

test.js in the same folder:

describe("test", function(){
    it("navigate", function(){        
        browser.get("https://angularjs.org/")
    })
});

if it's local folder it works correctly, but if it's remote folder it doesn't find spec test.js.

1
Do you have a ddescribe() or an iit() in your tests? Jasmine 2 uses fdescribe() and fit() when you only want to run those suites/tests. It will not recognize ddescribe as a suite.Andres D
No, we don't use ddescribe and fdescribe, iit and fit at all. I think, the problem is that the project source is on the remote box and the node_modules are on my local machine. With Jasmine 1.3 it works, but with Jasmine 2 not.Vladyslav
What version of protractor, selenium-webdriver are you using? And as a debugging step, can you make sure that you set browser. ignoreSynchronization=true before starting execution if its a non-angular page. ThanksGirish Sortur
I tried different Protractor versions >=2.0 and relevant web drivers. The issue doesn't not depends on browser. ignoreSynchronization and page I use. For example my conf = { specs: ['./test.js'], capabilities : {'browserName' : 'chrome'}, framework: 'jasmine2', jasmineNodeOpts: {showColors: true} };Vladyslav
I added an example to question.Vladyslav

1 Answers

0
votes

I investigated and debug a little bit more and found out that Jasmine 1.3 used FS and Path for specs search, but Jasmine 2 used GLOB. Glob doesn't work with remote paths.