0
각도기를 실행할 때 사양을 찾을 수 없다는 오류가 계속 발생합니다. 특정 단일 파일, 1 디렉토리 e2e/*.js
및 전체 트리 e2e/**/*.js
을 시도했습니다.gulp-protractor e2e 테스트에서 찾을 수있는 사양 없음
protractor.config.js
exports.config = {
specs: ['e2e/**/*.js'],
capabilities:{
browserName: 'chrome',
debug: true
},
localSeleniumStandaloneOpts:{
port:8082
}
}
gulpfile.js
'use strict';
var gulp = require('gulp');
var protractor = require("gulp-protractor").protractor;
// Setting up the test task
gulp.task('protractor', function(callback) {
gulp
.src(['e2e/**/*.js'])
.pipe(protractor({
configFile: 'protractor.conf.js',
args:['-port','8095']
}))
.on('error', function(e) {
console.log(e);
});
});
E2E/login.specs.js
'use strict';
describe('login to admin app', function(){
beforeEach(function(){
browser.get('http://localhost:3000/#!/login');
it('expect to be on the login page', function(){
expect(browser.findElement(by.className('login-page')).isPresent()).toBe(true);
});
it('login to application', function(){
var loginInput = browser.findElement(by.name('username'));
var passwordInput = browser.findElement(by.name('password'));
var submitButton = browser.findElement(by.tagNam('button'));
loginInput.sendKeys('****');
passwordInput.sendKeys('****');
submitButton.click();
expect(browser.getCurrentUrl()).toMatch('http://localhost:3000/#!/landing');
});
it('check header after login', function(){
var loginInput = browser.findElement(by.name('username'));
var passwordInput = browser.findElement(by.name('password'));
var submitButton = browser.findElement(by.tagNam('button'));
loginInput.sendKeys('*****');
passwordInput.sendKeys('*****');
submitButton.click();
expect(browser.findElement(by.id('role')));
expect(browser.findElement(by.id('username')));
var languages = brower.findElement(by.className("language"));
expect(language[0][0].getText().toEqual("NL"));
expect(language[1][0].getText().toEqual("FR"));
});
});
});
나는 구성을 놓친 건가?