Skip to content

Commit

Permalink
Fix: resolve pr reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
shashwatahalder01 committed Sep 26, 2024
1 parent 8a2bad7 commit 0f507d3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/pw/utils/apiUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}

/**
Expand Down Expand Up @@ -1872,7 +1873,7 @@ export class ApiUtils {

// get single tag
async getSingleTag(tagId: string, auth?: auth): Promise<responseBody> {
const [, responseBody] = await this.get(endPoints.getSingleProduct(tagId), { headers: auth });
const [, responseBody] = await this.get(endPoints.wc.getSingleTag(tagId), { headers: auth });
return responseBody;
}

Expand Down Expand Up @@ -2218,7 +2219,7 @@ export class ApiUtils {
* miscellaneous methods
*/

getMetaDataValue(metaDataArray: any[], key: string): Promise<any> {
getMetaDataValue(metaDataArray: any[], key: string): any {
const metaData = metaDataArray.find(item => item.key === key);
// console.log(metaData.value);
return metaData.value ?? null;
Expand Down

0 comments on commit 0f507d3

Please sign in to comment.