Files
angular__angular/e2e/components/button-e2e.spec.ts
T
Paul Gschwendtner 326f8bb32f build: run e2e tests with bazel (#14656)
* Builds the e2e app with Bazel
* Serves the e2e app with Bazel
* Runs the e2e tests with Bazel protractor rules
2019-01-11 14:43:04 -08:00

25 lines
877 B
TypeScript

import {browser, by, element, ExpectedConditions} from 'protractor';
describe('button', () => {
describe('disabling behavior', () => {
beforeEach(async () => await browser.get('/button'));
it('should prevent click handlers from executing when disabled', async () => {
await element(by.id('test-button')).click();
expect(await element(by.id('click-counter')).getText()).toEqual('1');
await browser.wait(ExpectedConditions.not(
ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))));
await element(by.id('disable-toggle')).click();
await element(by.id('test-button')).click();
expect(await element(by.id('click-counter')).getText()).toEqual('1');
await browser.wait(ExpectedConditions.not(
ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))));
});
});
});