Alex Eagle 265703b950 fix(typing): Remove re-export of the Promise built-in type.
Instead, ts2dart can add the 'dart:async' import whenever
Promise is used.

Fixes #6468
2016-02-12 20:45:41 -08:00

34 lines
1.0 KiB
TypeScript

import {verifyNoBrowserErrors} from 'angular2/src/testing/e2e_util';
function waitForElement(selector) {
var EC = (<any>protractor).ExpectedConditions;
// Waits for the element with id 'abc' to be present on the dom.
browser.wait(EC.presenceOf($(selector)), 20000);
}
describe('relative assets relative-app', () => {
afterEach(verifyNoBrowserErrors);
var URL = 'playground/src/relative_assets/';
it('should load in the templateUrl relative to the my-cmp component', () => {
browser.get(URL);
waitForElement('my-cmp .inner-container');
expect(element.all(by.css('my-cmp .inner-container')).count()).toEqual(1);
});
it('should load in the styleUrls relative to the my-cmp component', () => {
browser.get(URL);
waitForElement('my-cmp .inner-container');
var elem = element(by.css('my-cmp .inner-container'));
var width = browser.executeScript(function(e) {
return parseInt(window.getComputedStyle(e).width);
}, elem.getWebElement());
expect(width).toBe(432);
});
});