angular-cn/aio/content/examples/animations/e2e/src/open-close.po.ts

26 lines
666 B
TypeScript

import { by } from 'protractor';
import { locate } from './util';
export function getPage() {
return by.css('app-open-close-page');
}
export function getComponent() {
return by.css('app-open-close');
}
export function getToggleButton() {
const toggleButton = () => by.buttonText('Toggle Open/Close');
return locate(getComponent(), toggleButton());
}
export function getLoggingCheckbox() {
const loggingCheckbox = () => by.css('section > input[type="checkbox"]');
return locate(getPage(), loggingCheckbox());
}
export function getComponentContainer() {
const findContainer = () => by.css('div');
return locate(getComponent(), findContainer());
}