Vote count:
0
When running an e2e test using Protractor in Webstorm . I get an error on the first line :
"C:\Program Files (x86)\JetBrains\WebStorm 8.0.3\bin\runnerw.exe" "C:\Program Files\nodejs\node.exe" test\e2e\scenarios.js test\protractor-conf.js
c:\Users\Owner\angular-phonecat\test\e2e\scenarios.js:5
describe('PhoneCat App', function() {
^
ReferenceError: describe is not defined
at Object.<anonymous> (c:\Users\Owner\angular-phonecat\test\e2e\scenarios.js:5:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
Process finished with exit code 8
My Config file :
exports.config =
{
allScriptsTimeout: 11000,
specs: ['e2e/*.js'],
capabilities: {'browserName': 'chrome'},
chromeOnly: true,
baseUrl: 'http://localhost:8000',
framework: 'karma-jasmine',
jasmineNodeOpts: { defaultTimeoutInterval: 30000}
};
My Debug Settings :
Installed Javascript libraries in Webstorm :
The weird thing is that Karma unit tests using Describe() do not encounter this error .
What could be the cause of this ..?
Just to be on the safe side i'll state that running the test from the command line using
npm run protractor
works with no problem.
Additionally here is the Test itself :
'use strict';
/* http://ift.tt/UmvjlY */
describe('PhoneCat App', function() {
describe('Phone list view', function() {
beforeEach(function() {
browser.get('index.html'); // removed app/ because i already set it as the project's root .
});
it('should filter the phone list as a user types into the search box', function() {
var phoneList = element.all(by.repeater('phone in phones'));
var query = element(by.model('query'));
expect(phoneList.count()).toBe(3);
query.sendKeys('nexus');
expect(phoneList.count()).toBe(1);
query.clear();
query.sendKeys('motorola');
expect(phoneList.count()).toBe(2);
});
});
});
It fails on the first line as seen in the Error at the beginning of the question .
asked 35 secs ago
Webstorm Protractor describe is not defined
Aucun commentaire:
Enregistrer un commentaire