Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions types/gulp-angular-protractor/gulp-angular-protractor-tests.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Based on https://github.com/rochejul/gulp-angular-protractor/tree/master/examples

import gulp = require('gulp');

import gulpProtractorAngular = require('gulp-angular-protractor');

// Required options
gulp.src(['example_spec.js']).pipe(
gulpProtractorAngular({
configFile: 'protractor.conf.js',
}),
);

// All options
gulp.src(['example_spec.js']).pipe(
gulpProtractorAngular({
configFile: 'protractor.conf.js',
args: ['--help'],
autoStartStopServer: true,
debug: false,
protractorModulePath: '../protractor/bin/',
verbose: true,
webDriverUpdate: {
skip: false,
browsers: ['ie'],
args: ['--ie32'],
},
webDriverStart: {
args: ['--ie32'],
},
}),
);
84 changes: 84 additions & 0 deletions types/gulp-angular-protractor/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
// Type definitions for gulp-angular-protractor 2.0
// Project: https://github.com/rochejul/gulp-angular-protractor
// Definitions by: Adam Kwiatek <https://github.com/akwiatek>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

import through = require('through');

declare function gulpProtractorAngular(options: gulpProtractorAngular.Options): through.ThroughStream;

declare namespace gulpProtractorAngular {
// See https://github.com/rochejul/gulp-angular-protractor/blob/master/readme.md#api
interface Options {
/**
* If true, the plugin will update the WebDriver, launch the WebDriver server before launching tests and stop it at the end automatically
*
* @default true
*/
autoStartStopServer?: boolean;

/**
* The path to your protractor config
*/
configFile: string;

/**
* Arguments get passed directly to the protractor call [Read the docs for more information](https://github.com/angular/protractor/blob/master/docs/getting-started.md#setup-and-config)
*
* @default []
*/
args?: string[];

/**
* Enables Protractor's [debug mode](https://github.com/angular/protractor/blob/master/docs/debugging.md), which can be used to pause tests during execution and to view stack traces.
*
* @default false
*/
debug?: boolean;

/**
* @default true
*/
verbose?: boolean;

/**
* If you want to use another protractor version instead the default one
*/
protractorModulePath?: string;

webDriverUpdate?: WebDriverUpdate;

// See https://github.com/rochejul/gulp-angular-protractor/blob/master/examples/example-05/Gulpfile.js
webDriverStart?: WebDriverStart;
}

interface WebDriverUpdate {
/**
* @default false
*/
skip?: boolean;

/**
* List of browsers to update the webdriver
*
* @default ['chrome']
*/
browsers?: string[];

/**
* Additional arguments to pass for the update of the webdriver
*
* @default []
*/
args?: string[];
}

interface WebDriverStart {
/**
* @default []
*/
args?: string[];
}
}

export = gulpProtractorAngular;
23 changes: 23 additions & 0 deletions types/gulp-angular-protractor/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"gulp-angular-protractor-tests.ts"
]
}
3 changes: 3 additions & 0 deletions types/gulp-angular-protractor/tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@definitelytyped/dtslint/dt.json"
}