mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
19 lines
444 B
TypeScript
19 lines
444 B
TypeScript
import {browser, by, element, protractor} from 'protractor';
|
|
|
|
export class AppPage {
|
|
navigateTo() {
|
|
return browser.get('/');
|
|
}
|
|
|
|
getParagraphText() {
|
|
return element(by.css('app-root h1')).getText();
|
|
}
|
|
|
|
getLazyLoadedText() {
|
|
const el = element(by.css('app-root lazy-component'));
|
|
return browser.wait(protractor.ExpectedConditions.presenceOf(el)).then(
|
|
() => el.getText(),
|
|
(err) => el.getText(),
|
|
);
|
|
}
|
|
}
|