mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Instead of the deprecated tslint use eslint in the aio's example-lint script PR Close #43218
21 lines
815 B
TypeScript
21 lines
815 B
TypeScript
import { browser, element, by } from 'protractor';
|
|
|
|
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);
|
|
});
|
|
|
|
});
|