From 09ae63cc228fe7ba2ba2680bb7ea7219882367de Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Sat, 11 Feb 2023 11:40:04 +0530 Subject: [PATCH] test: null check correction Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- tests/playwright/pages/Dashboard/common/Cell/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/playwright/pages/Dashboard/common/Cell/index.ts b/tests/playwright/pages/Dashboard/common/Cell/index.ts index afcd25b4a7..855fb13048 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/index.ts +++ b/tests/playwright/pages/Dashboard/common/Cell/index.ts @@ -118,8 +118,10 @@ export class CellPageObject extends BasePage { }).allInnerTexts(); const cellText = typeof innerTexts === 'string' ? [innerTexts] : innerTexts; - if (cellText.includes(text) || cellText[0].includes(text)) { - return; + if (cellText) { + if (cellText.includes(text) || cellText[0].includes(text)) { + return; + } } await this.rootPage.waitForTimeout(1000); count++;