mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
326f8bb32f
* Builds the e2e app with Bazel * Serves the e2e app with Bazel * Runs the e2e tests with Bazel protractor rules
25 lines
877 B
TypeScript
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')))));
|
|
});
|
|
});
|
|
});
|