From 24186d1f4ca6b42c06ed71bccb62f1fa40d01779 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Mon, 3 Apr 2023 12:43:58 +0530 Subject: [PATCH] test: select options updated dom element handling Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- .../pages/Dashboard/common/Cell/SelectOptionCell.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts b/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts index 38531e4d1e..219d03ba2c 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts +++ b/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts @@ -85,9 +85,8 @@ export class SelectOptionCellPageObject extends BasePage { if (multiSelect) { return await expect(this.cell.get({ index, columnHeader })).toContainText(option, { useInnerText: true }); } - return await expect( - this.cell.get({ index, columnHeader }).locator('.ant-select-selection-item > .ant-tag') - ).toHaveText(option, { useInnerText: true }); + const text = await (await this.cell.get({ index, columnHeader }).locator('.ant-tag')).allInnerTexts(); + return expect(text).toContain(option); } async verifyNoOptionsSelected({ index, columnHeader }: { index: number; columnHeader: string }) {