Files
angular__angular/e2e/components/button-e2e.spec.ts
T
Paul Gschwendtner afb0ee37eb chore: remove screenshot testing (#12155)
Removes the screenshot test tool since Angular Material is visually being tested inside of Google.
2018-07-11 08:24:21 -07:00

23 lines
845 B
TypeScript

import {browser, by, element, ExpectedConditions} from 'protractor';
describe('button', () => {
describe('disabling behavior', () => {
beforeEach(() => browser.get('/button'));
it('should prevent click handlers from executing when disabled', async () => {
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')))));
element(by.id('disable-toggle')).click();
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')))));
});
});
});