-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f27fa4
commit b131f9c
Showing
4 changed files
with
43 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
export default abstract class BaseFormPage { | ||
constructor() { | ||
this.init(); | ||
} | ||
|
||
abstract init(): void; | ||
|
||
submit() { | ||
cy.getByTestId('safe').click(); | ||
} | ||
|
||
cancel() { | ||
cy.getByTestId('cancel').click(); | ||
} | ||
|
||
protected fillInput(testId: string, value: string) { | ||
cy.getByTestId(testId).clear(); | ||
cy.getByTestId(testId).type(value); | ||
} | ||
|
||
static createInstance<T extends BaseFormPage>(): T { | ||
throw new Error('Method not implemented.'); // Placeholder for enforcing implementation | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters