本文整理匯總了TypeScript中gulp-protractor.protractor函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript protractor函數的具體用法?TypeScript protractor怎麽用?TypeScript protractor使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了protractor函數的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1:
.then((server: any) => {
gulp
.src(join(Config.DEV_DEST, '**/*.e2e-spec.js'))
.pipe(protractor({ configFile: 'protractor.conf.js' }))
.on('error', (error: string) => { throw error; })
.on('end', () => { server.close(done); });
});
示例2:
.then((server: any) => {
gulp
.src('./dist/dev/**/*.e2e-spec.js')
.pipe(protractor({ configFile: 'protractor.conf.js' }))
.on('error', (error: string) => { throw error; })
.on('end', () => { server.close(done); });
});
示例3:
gulp.task('protractor', ['webdriverUpdate'], () => {
return gulp.src(env.path.spec.e2e)
.pipe(protractor({
configFile: env.path.protractor.config.default,
}))
.on('error', (e: Error) => { throw e });
});
示例4:
gulp.task('e2edebug', () => {
return gulp.src(paths.scripts_integration_tests_js)
.pipe(prot({
configFile: "protractor_conf.js",
args: ['debug', '--baseUrl', 'http://localhost:61916']
}))
.on('error', e=> { throw e; });
});
示例5:
.then((server: any) => {
testFiles.pipe(protractor({
configFile: $.config.test.protractor
})).on('error', (err: any) => {
// Make sure failed tests cause gulp to exit non-zero
throw err;
}).on('end', () => server.close(cb));
});
示例6: runProtractor
export function runProtractor(done) {
return gulp.src(`${e2ePath}/**.js`)
.pipe(protractor({
configFile: __dirname + '/../../protractor.conf.js',
args: [
'--baseUrl',
CLIOptions.hasFlag('baseUrl') ? CLIOptions.getFlagValue('baseUrl') : 'http://127.0.0.1:9000'
]
}))
.on('end', function() { done(); })
.on('error', function(e) { throw e; });
};
示例7: function
() => {
let specs = argv.specs || TEST_DIR + '/' + DEBUGGER_NAMESPACE + '/tests/e2e/tag_detail_view.feature';
var args = [
'--baseUrl',
baseUrl + DEBUGGER_NAMESPACE + '/'
];
return gulp.src(specs)
.pipe(protractor.protractor({
configFile: 'e2e.conf.js',
args: args
}))
.on('error', function(err) {
throw err;
});
}
示例8: del
gulp.task('test:e2e', ['test:server', 'test:buildjs'], () => {
return gulp.src(PATH.src.e2e)
.pipe(gulpProtractor({
configFile: __dirname + '/protractor.config.js'
}))
.on('error', (e: any) => {
console.log(`
------------------------------------------------------------------------------------
For first-time user, we need to update webdrivers
$ node_modules/protractor/selenium/webdriver-manager update
------------------------------------------------------------------------------------
`);
throw e;
})
.on('end', () => { // when process exits:
del([
PATH.src.base + '/apps/**/*.css',
PATH.src.base + '/assets/styles/*.css'
])
});
});
示例9:
gulp.task('protractor', (cb) => {
gulp.src(['test/e2e/**/*.e2e.ts'], { read: false }).pipe(protractor({
configFile: 'test/protractor.conf.js'
})).on('end', cb);
});