From 0f507d363e3a553c62aee9c8e50bf13410babb71 Mon Sep 17 00:00:00 2001 From: shashwata Date: Thu, 26 Sep 2024 12:23:52 +0600 Subject: [PATCH] Fix: resolve pr reviews --- tests/pw/utils/apiUtils.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/pw/utils/apiUtils.ts b/tests/pw/utils/apiUtils.ts index 0b135ace72..6ef83be0e3 100644 --- a/tests/pw/utils/apiUtils.ts +++ b/tests/pw/utils/apiUtils.ts @@ -500,7 +500,8 @@ export class ApiUtils { const [, responseBody] = await this.post(endPoints.createAttributeTerm(attributeId), { data: attributeTerm, headers: auth }); const attributeTermId = String(responseBody?.id); - return [responseBody, attributeId, attributeTermId, attributeName, attributeName]; + const attributeTermName = responseBody?.name; + return [responseBody, attributeId, attributeTermId, attributeName, attributeTermName]; } /** @@ -1872,7 +1873,7 @@ export class ApiUtils { // get single tag async getSingleTag(tagId: string, auth?: auth): Promise { - const [, responseBody] = await this.get(endPoints.getSingleProduct(tagId), { headers: auth }); + const [, responseBody] = await this.get(endPoints.wc.getSingleTag(tagId), { headers: auth }); return responseBody; } @@ -2218,7 +2219,7 @@ export class ApiUtils { * miscellaneous methods */ - getMetaDataValue(metaDataArray: any[], key: string): Promise { + getMetaDataValue(metaDataArray: any[], key: string): any { const metaData = metaDataArray.find(item => item.key === key); // console.log(metaData.value); return metaData.value ?? null;