From facb1184a55fb1173cc6d2e3ceb316a6c62398dc Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Thu, 22 Feb 2024 16:16:39 +0000 Subject: [PATCH] test: form elements validation --- tests/playwright/pages/Dashboard/Form/index.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/playwright/pages/Dashboard/Form/index.ts b/tests/playwright/pages/Dashboard/Form/index.ts index cef6fcc50b..783d3c1799 100644 --- a/tests/playwright/pages/Dashboard/Form/index.ts +++ b/tests/playwright/pages/Dashboard/Form/index.ts @@ -87,9 +87,7 @@ export class FormPage extends BasePage { } async verifyFormFieldHelpText({ index, helpText }: { index: number; helpText: string }) { - await expect( - this.getFormFields().nth(index).locator('[data-testid="nc-form-input-help-text-label"]') - ).toContainText(helpText); + await expect(this.getFormFields().nth(index).locator('[data-testid="nc-form-help-text"]')).toContainText(helpText); } async verifyFieldsIsEditable({ index }: { index: number }) { @@ -219,8 +217,9 @@ export class FormPage extends BasePage { await this.get() .locator(`.nc-form-drag-${field.replace(' ', '')}`) - .locator('div[data-testid="nc-form-input-label"]') + .locator('[data-testid="nc-form-input-label"]') .click(); + await waitForResponse(() => this.getFormFieldsInputLabel().fill(label)); await waitForResponse(() => this.getFormFieldsInputHelpText().fill(helpText)); if (required) {