Skip to content

Commit 0791b1d

Browse files
committed
try readding scrollIntoViewIfNeeded for partially-obscured items
1 parent 27b7191 commit 0791b1d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/e2e/objects/views/View.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ export class SearchableView extends View {
128128
await expect(itemLocator, {
129129
message: `should check if '${label}' is visible before searching`,
130130
}).toBeVisible({ timeout: 1000 });
131+
// item is in the DOM but may be partially out of view, so we may need to scroll to
132+
// it before any other actions can happen
133+
await itemLocator.scrollIntoViewIfNeeded();
131134
return itemLocator;
132135
} catch {
133136
// item not found, try searching for it

0 commit comments

Comments
 (0)