|
|
@ -153,6 +153,9 @@ export class FormPage extends BasePage { |
|
|
|
|
|
|
|
|
|
|
|
async fillForm(param: { field: string; value: string }[]) { |
|
|
|
async fillForm(param: { field: string; value: string }[]) { |
|
|
|
for (let i = 0; i < param.length; i++) { |
|
|
|
for (let i = 0; i < param.length; i++) { |
|
|
|
|
|
|
|
await this.get() |
|
|
|
|
|
|
|
.locator(`[data-testid="nc-form-input-${param[i].field.replace(' ', '')}"]`) |
|
|
|
|
|
|
|
.click(); |
|
|
|
await this.get() |
|
|
|
await this.get() |
|
|
|
.locator(`[data-testid="nc-form-input-${param[i].field.replace(' ', '')}"] >> input`) |
|
|
|
.locator(`[data-testid="nc-form-input-${param[i].field.replace(' ', '')}"] >> input`) |
|
|
|
.fill(param[i].value); |
|
|
|
.fill(param[i].value); |
|
|
@ -177,9 +180,7 @@ export class FormPage extends BasePage { |
|
|
|
await this.getFormFieldsInputLabel().fill(label); |
|
|
|
await this.getFormFieldsInputLabel().fill(label); |
|
|
|
await this.getFormFieldsInputHelpText().fill(helpText); |
|
|
|
await this.getFormFieldsInputHelpText().fill(helpText); |
|
|
|
if (required) { |
|
|
|
if (required) { |
|
|
|
await this.get() |
|
|
|
await this.getFormFieldsRequired().click(); |
|
|
|
.locator(`.nc-form-drag-${field.replace(' ', '')}`) |
|
|
|
|
|
|
|
.click(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
await this.formHeading.click(); |
|
|
|
await this.formHeading.click(); |
|
|
|
} |
|
|
|
} |
|
|
|