fix(platform-browser/testing-e2e): clean up unused exports from e2e testing helpers (#9387)

This commit is contained in:
Julie Ralph 2016-06-23 16:14:31 -07:00 committed by GitHub
parent 8d5a312585
commit 894747c34c
6 changed files with 8 additions and 19 deletions

View File

@ -7,7 +7,7 @@
*/ */
import {expect} from '@angular/core/testing'; import {expect} from '@angular/core/testing';
import {browser, verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e'; import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e';
function waitForElement(selector: string) { function waitForElement(selector: string) {
var EC = (<any>protractor).ExpectedConditions; var EC = (<any>protractor).ExpectedConditions;

View File

@ -7,7 +7,7 @@
*/ */
import {expect} from '@angular/core/testing'; import {expect} from '@angular/core/testing';
import {browser, verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e'; import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e';
function waitForElement(selector: string) { function waitForElement(selector: string) {
var EC = (<any>protractor).ExpectedConditions; var EC = (<any>protractor).ExpectedConditions;

View File

@ -7,7 +7,7 @@
*/ */
import {expect} from '@angular/core/testing'; import {expect} from '@angular/core/testing';
import {browser, verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e'; import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e';
function waitForElement(selector: string) { function waitForElement(selector: string) {
var EC = (<any>protractor).ExpectedConditions; var EC = (<any>protractor).ExpectedConditions;

View File

@ -7,7 +7,7 @@
*/ */
import {expect} from '@angular/core/testing'; import {expect} from '@angular/core/testing';
import {browser, verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e'; import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e';
function waitForElement(selector: string) { function waitForElement(selector: string) {
var EC = (<any>protractor).ExpectedConditions; var EC = (<any>protractor).ExpectedConditions;

View File

@ -8,21 +8,16 @@
import * as webdriver from 'selenium-webdriver'; import * as webdriver from 'selenium-webdriver';
declare var global: any /** TODO #9100 */;
declare var expect: Function;
export var browser: protractor.IBrowser = global['browser'];
export var $: cssSelectorHelper = global['$'];
export function clickAll(buttonSelectors: any /** TODO #9100 */) { declare var browser: any;
buttonSelectors.forEach(function(selector: any /** TODO #9100 */) { $(selector).click(); }); declare var expect: any;
}
export function verifyNoBrowserErrors() { export function verifyNoBrowserErrors() {
// TODO(tbosch): Bug in ChromeDriver: Need to execute at least one command // TODO(tbosch): Bug in ChromeDriver: Need to execute at least one command
// so that the browser logs can be read out! // so that the browser logs can be read out!
browser.executeScript('1+1'); browser.executeScript('1+1');
browser.manage().logs().get('browser').then(function(browserLog) { browser.manage().logs().get('browser').then(function(browserLog: any) {
var filteredLog = browserLog.filter(function(logEntry) { var filteredLog = browserLog.filter(function(logEntry: any) {
if (logEntry.level.value >= webdriver.logging.Level.INFO.value) { if (logEntry.level.value >= webdriver.logging.Level.INFO.value) {
console.log('>> ' + logEntry.message); console.log('>> ' + logEntry.message);
} }

View File

@ -1,7 +1 @@
export declare var $: cssSelectorHelper;
export declare var browser: protractor.IBrowser;
export declare function clickAll(buttonSelectors: any): void;
export declare function verifyNoBrowserErrors(): void; export declare function verifyNoBrowserErrors(): void;