mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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
22 lines
846 B
TypeScript
22 lines
846 B
TypeScript
import { browser, element, by } from 'protractor';
|
|
|
|
/* tslint:disable:quotemark */
|
|
describe('Dynamic Form', () => {
|
|
|
|
beforeAll(() => browser.get(''));
|
|
|
|
it('should submit form', async () => {
|
|
const firstNameElement = element.all(by.css('input[id=firstName]')).get(0);
|
|
expect(await firstNameElement.getAttribute('value')).toEqual('Bombasto');
|
|
|
|
const emailElement = element.all(by.css('input[id=emailAddress]')).get(0);
|
|
const email = 'test@test.com';
|
|
await emailElement.sendKeys(email);
|
|
expect(await emailElement.getAttribute('value')).toEqual(email);
|
|
|
|
await element(by.css('select option[value="solid"]')).click();
|
|
await element.all(by.css('button')).get(0).click();
|
|
expect(await element(by.cssContainingText('strong', 'Saved the following values')).isPresent()).toBe(true);
|
|
});
|
|
|
|
});
|