-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.po.ts
More file actions
28 lines (22 loc) · 715 Bytes
/
app.po.ts
File metadata and controls
28 lines (22 loc) · 715 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { PageObject, PO_PROXY } from './po-utils';
/* <= add a second / to the start of this line to toggle code blocks below
// The repetitious way:
export const GreetingPage = {
get greetingFormNameInput() {
return cy.getByTestId('greeting-form-name-input');
},
get greetingFormSubmitButton() {
return cy.getByTestId('greeting-form-submit-button');
},
get personalGreetingOutput() {
return cy.getByTestId('personal-greeting-output');
},
} as const;
/*/
// The succinct way:
export type GreetingPageTestIds =
| 'greeting-form-name-input'
| 'greeting-form-submit-button'
| 'personal-greeting-output';
export const GreetingPage = PO_PROXY as PageObject<GreetingPageTestIds>;
//*/