From 224116760a83fa74c26d684fbf6014833b360f7f Mon Sep 17 00:00:00 2001 From: Tanguy Krotoff Date: Mon, 6 Jul 2015 15:34:37 +0200 Subject: [PATCH] Add definitions for gulp-protractor (https://github.com/mllrsohn/gulp-protractor) --- gulp-protractor/gulp-protractor-tests.ts | 20 +++++++++++++++++++ gulp-protractor/gulp-protractor.d.ts | 25 ++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 gulp-protractor/gulp-protractor-tests.ts create mode 100644 gulp-protractor/gulp-protractor.d.ts diff --git a/gulp-protractor/gulp-protractor-tests.ts b/gulp-protractor/gulp-protractor-tests.ts new file mode 100644 index 000000000..4224084d8 --- /dev/null +++ b/gulp-protractor/gulp-protractor-tests.ts @@ -0,0 +1,20 @@ +/// +/// + +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()); diff --git a/gulp-protractor/gulp-protractor.d.ts b/gulp-protractor/gulp-protractor.d.ts new file mode 100644 index 000000000..d0317e2e2 --- /dev/null +++ b/gulp-protractor/gulp-protractor.d.ts @@ -0,0 +1,25 @@ +// Type definitions for gulp-protractor v1.0.0 +// Project: https://github.com/mllrsohn/gulp-protractor +// Definitions by: Tanguy Krotoff +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// +/// + +declare module 'gulp-protractor' { + interface IOptions { + configFile?: string; + args?: Array; + debug?: boolean; + } + + interface IGulpProtractor { + getProtractorDir(): string; + protractor(options?: IOptions): NodeJS.ReadWriteStream; + webdriver_standalone: gulp.ITaskCallback; + webdriver_update: gulp.ITaskCallback; + } + + var protractor: IGulpProtractor; + export = protractor; +}