Browse Source

test: imported cells scroll into view

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/5392/head
Raju Udava 2 years ago
parent
commit
8863bd52e2
  1. 8
      tests/playwright/pages/Dashboard/common/Cell/index.ts

8
tests/playwright/pages/Dashboard/common/Cell/index.ts

@ -114,6 +114,10 @@ export class CellPageObject extends BasePage {
// if text is found, return // if text is found, return
// if text is not found, throw error // if text is not found, throw error
let count = 0; let count = 0;
await this.get({
index,
columnHeader,
}).scrollIntoViewIfNeeded();
while (count < 5) { while (count < 5) {
const innerTexts = await this.get({ const innerTexts = await this.get({
index, index,
@ -265,9 +269,11 @@ export class CellPageObject extends BasePage {
value: string[]; value: string[];
}) { }) {
// const count = value.length; // const count = value.length;
const cell = this.get({ index, columnHeader }); const cell = await this.get({ index, columnHeader });
const chips = cell.locator('.chips > .chip'); const chips = cell.locator('.chips > .chip');
await this.get({ index, columnHeader }).scrollIntoViewIfNeeded();
// verify chip count & contents // verify chip count & contents
if (count) await expect(chips).toHaveCount(count); if (count) await expect(chips).toHaveCount(count);

Loading…
Cancel
Save