angular-cn/modules/examples/e2e_test/material/progress_linear_spec.ts

24 lines
836 B
TypeScript

import {verifyNoBrowserErrors} from 'angular2/src/testing/e2e_util';
describe('md-progress-linear', function() {
var url = 'examples/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'));
var initialValue = progressBar.getAttribute('aria-valuenow');
incrementButton.click();
expect(progressBar.getAttribute('aria-valuenow')).toBeGreaterThan(initialValue);
decrementButton.click();
decrementButton.click();
expect(progressBar.getAttribute('aria-valuenow')).toBeLessThan(initialValue);
});
});