Add definitions for gulp-protractor (https://github.com/mllrsohn/gulp-protractor)

This commit is contained in:
Tanguy Krotoff
2015-07-06 15:34:37 +02:00
parent 82d33fabbc
commit 224116760a
2 changed files with 45 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
/// <reference path="gulp-protractor.d.ts" />
/// <reference path="../gulp/gulp.d.ts" />
import gulp = require('gulp');
import protractor = require('gulp-protractor');
gulp.src(["./src/tests/*.js"])
.pipe(protractor.protractor({
configFile: "test/protractor.config.js",
args: ['--baseUrl', 'http://127.0.0.1:8000']
}))
gulp.task('webdriver_standalone', protractor.webdriver_standalone);
gulp.task('webdriver-update', protractor.webdriver_update);
console.log(protractor.getProtractorDir());

25
gulp-protractor/gulp-protractor.d.ts vendored Normal file
View File

@@ -0,0 +1,25 @@
// Type definitions for gulp-protractor v1.0.0
// Project: https://github.com/mllrsohn/gulp-protractor
// Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
/// <reference path="../gulp/gulp.d.ts" />
declare module 'gulp-protractor' {
interface IOptions {
configFile?: string;
args?: Array<string>;
debug?: boolean;
}
interface IGulpProtractor {
getProtractorDir(): string;
protractor(options?: IOptions): NodeJS.ReadWriteStream;
webdriver_standalone: gulp.ITaskCallback;
webdriver_update: gulp.ITaskCallback;
}
var protractor: IGulpProtractor;
export = protractor;
}