This commit disables the Selenium Promise Manager when running e2e tests for docs examples in order to more closely align them with new apps created with CLI v11. This change requires that any async operations in tests are handled explicitly (e.g. using `async/await` or `Promise#then()`). PR Close #39818
36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
import { browser, element, by } from 'protractor';
|
|
|
|
describe('Attribute binding example', () => {
|
|
|
|
beforeEach(() => browser.get(''));
|
|
|
|
it('should display Property Binding with Angular', async () => {
|
|
expect(await element(by.css('h1')).getText()).toEqual('Attribute, class, and style bindings');
|
|
});
|
|
|
|
it('should display a table', async () => {
|
|
expect(await element.all(by.css('table')).isPresent()).toBe(true);
|
|
});
|
|
|
|
it('should display an Aria button', async () => {
|
|
expect(await element.all(by.css('button')).get(0).getText()).toBe('Go for it with Aria');
|
|
});
|
|
|
|
it('should display a blue background on div', async () => {
|
|
const div = element.all(by.css('div')).get(1);
|
|
expect(await div.getCssValue('background-color')).toEqual('rgba(25, 118, 210, 1)');
|
|
});
|
|
|
|
it('should display a blue div with a red border', async () => {
|
|
const div = element.all(by.css('div')).get(1);
|
|
expect(await div.getCssValue('border')).toEqual('2px solid rgb(212, 30, 46)');
|
|
});
|
|
|
|
it('should display a div with many classes', async () => {
|
|
const div = element.all(by.css('div')).get(1);
|
|
expect(await div.getAttribute('class')).toContain('special');
|
|
expect(await div.getAttribute('class')).toContain('clearance');
|
|
});
|
|
|
|
});
|