While I was doing the tutorial of AngularJS protractor testing from https://docs.angularjs.org/tutorial/step_02 , I get the error message as "no specs found", when I run the e2e test. This means the e2e test is not happening. I am new to protractor and I have come across similar questions in stack overflow but those did not really solve my problem.
I am not sure if I am missing any configuration or if I am issuing the command from the wrong directory. My question is how do I ensure that "no specs found" error does not happen?
I ran the command in /angular-phonecat/app directory as: npm run protractor
The folder structure of the project is as follows:
angular-phonecat
|_____app
|_____app.js
|_____app.spec.js
|_____index.html
|_____e2e-tests
|_____protractor.conf.js
This is the content of app.spec.js:
'use strict';
describe('PhoneListController', function() {
beforeEach(module('phonecatApp'));
it('should create a `phones` model with 3 phones', inject(function($controller) {
var scope = {};
var ctrl = $controller('PhoneListController', {$scope: scope});
expect(scope.phones.length).toBe(3);
}));
});
Protractor.conf.js is as follows:
//jshint strict: false
exports.config = {
allScriptsTimeout: 11000,
specs: [
'*.js'
],
capabilities: {
'browserName': 'chrome'
},
baseUrl: 'http://localhost:8000/',
framework: 'jasmine',
jasmineNodeOpts: {
defaultTimeoutInterval: 30000
}
};