angular-cn/modules/playground/e2e_test/material/progress_linear_spec.ts
Alex Eagle 2f31c4c1c5 chore(typings): use mainline DefinitelyTyped repo rather than a fork.
The upstream Jasmine typings don't define a type for the global
object with Jasmine methods polluting it, so just use any.

Also zone.js has a different name upstream.
2016-02-04 22:42:40 +00:00

25 lines
922 B
TypeScript

import {verifyNoBrowserErrors} from 'angular2/src/testing/e2e_util';
describe('md-progress-linear', function() {
var url = 'playground/src/material/progress-linear/index.html';
beforeEach(() => { browser.get(url); });
afterEach(verifyNoBrowserErrors);
it('should increment and decrement progress', function() {
var progressBar = element.all(by.css('md-progress-linear')).first();
var incrementButton = element(by.id('increment'));
var decrementButton = element(by.id('decrement'));
// Really a Promise<string> but can be coerced to a number after resolving
var initialValue: any = progressBar.getAttribute('aria-valuenow');
incrementButton.click();
expect(progressBar.getAttribute('aria-valuenow')).toBeGreaterThan(initialValue);
decrementButton.click();
decrementButton.click();
expect(progressBar.getAttribute('aria-valuenow')).toBeLessThan(initialValue);
});
});