diff --git a/tests/pw/pages/productQAPage.ts b/tests/pw/pages/productQAPage.ts index d90f28a750..f877a18f53 100644 --- a/tests/pw/pages/productQAPage.ts +++ b/tests/pw/pages/productQAPage.ts @@ -51,7 +51,7 @@ export class ProductQAPage extends BasePage { await this.toBeVisible(selector.admin.dokan.productQA.questionDetails.goBack); // question details elements are visible - const { questionInput, saveQuestion, questionText,...questionDetails } = selector.admin.dokan.productQA.questionDetails.questionDetails; // todo: need to add questiontext + const { questionInput, saveQuestion, questionText, ...questionDetails } = selector.admin.dokan.productQA.questionDetails.questionDetails; // todo: need to add questiontext await this.multipleElementVisible(questionDetails); // status elements are visible @@ -136,7 +136,9 @@ export class ProductQAPage extends BasePage { await this.clickAndWaitForResponse(data.subUrls.api.dokan.productQuestions, selector.admin.dokan.productQA.questionDetails.confirmAction); await this.toBeVisible(selector.admin.dokan.productQA.questionDetails.visibilityStatusSaveSuccessMessage); action == 'hide' ? await this.toBeVisible(selector.admin.dokan.productQA.questionDetails.status.hiddenStatus) : await this.toBeVisible(selector.admin.dokan.productQA.questionDetails.status.visibleStatus); - action == 'hide' ? await this.toBeVisible(selector.admin.dokan.productQA.questionDetails.status.showInProductPage) : await this.toBeVisible(selector.admin.dokan.productQA.questionDetails.status.hideFromProductPage); + action == 'hide' + ? await this.toBeVisible(selector.admin.dokan.productQA.questionDetails.status.showInProductPage) + : await this.toBeVisible(selector.admin.dokan.productQA.questionDetails.status.hideFromProductPage); } // delete answer diff --git a/tests/pw/tests/e2e/productQA.spec.ts b/tests/pw/tests/e2e/productQA.spec.ts index a36d00121b..5b276229b8 100644 --- a/tests/pw/tests/e2e/productQA.spec.ts +++ b/tests/pw/tests/e2e/productQA.spec.ts @@ -72,7 +72,7 @@ test.describe('Product QA functionality test', () => { await admin.filterQuestions(data.questionAnswers.filter.byProduct, 'by-product'); }); - test.only('admin can edit question @pro', async () => { + test('admin can edit question @pro', async () => { await admin.editQuestion(questionId, data.questionAnswers); }); diff --git a/tests/pw/utils/schemas.ts b/tests/pw/utils/schemas.ts index f4eb77a48a..f8629d7662 100644 --- a/tests/pw/utils/schemas.ts +++ b/tests/pw/utils/schemas.ts @@ -619,7 +619,7 @@ export const schemas = { tax_total: z.string(), status: z.string(), date: z.string(), - }), + }).or(z.null()), }), },