2018-07-15 19:02:16 -04:00
|
|
|
import { browser, element, by } from 'protractor';
|
|
|
|
|
|
|
|
browser.waitForAngularEnabled(false);
|
|
|
|
describe('Element E2E Tests', function () {
|
|
|
|
describe('Hello World Elements', () => {
|
|
|
|
it('should display: Hello world!', function () {
|
|
|
|
browser.get('hello-world.html');
|
|
|
|
const helloWorldEl = element(by.css('hello-world-el'));
|
|
|
|
expect(helloWorldEl.getText()).toEqual('Hello World!');
|
|
|
|
});
|
|
|
|
|
2018-07-15 21:53:18 -04:00
|
|
|
it('should display: Hello Foo! via name attribute', function () {
|
2018-07-15 19:02:16 -04:00
|
|
|
browser.get('hello-world.html');
|
|
|
|
const helloWorldEl = element(by.css('hello-world-el'));
|
|
|
|
const input = element(by.css('input[type=text]'));
|
2018-09-24 04:30:29 -04:00
|
|
|
['f', 'o', 'o'].forEach((key) => input.sendKeys(key));
|
|
|
|
expect(helloWorldEl.getText()).toEqual('Hello foo!');
|
2018-07-15 19:02:16 -04:00
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|