-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add e2e test for creating complex field
- Loading branch information
Showing
6 changed files
with
114 additions
and
7 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
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
33 changes: 33 additions & 0 deletions
33
desktop/test/e2e/docedit/docedit-complex-entry-modal.page.ts
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,33 @@ | ||
import { click, getLocator, getText } from '../app'; | ||
|
||
|
||
/** | ||
* @author Thomas Kleinke | ||
*/ | ||
export class DoceditComplexEntryModalPage { | ||
|
||
// click | ||
|
||
public static async clickCancel() { | ||
|
||
return click('#cancel-button'); | ||
} | ||
|
||
|
||
// get text | ||
|
||
public static async getSubfieldLabel(fieldIndex: number) { | ||
|
||
const element = await getLocator('.subfield-section').nth(fieldIndex); | ||
return getText(await element.locator('.complex-entry-modal-subfield-label')); | ||
} | ||
|
||
|
||
// elements | ||
|
||
public static async getSubfieldInputElement(fieldIndex: number, inputType: string) { | ||
|
||
const element = await getLocator('.subfield-section').nth(fieldIndex); | ||
return element.locator('form-field-' + inputType); | ||
} | ||
} |
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