diff --git a/tests/ms2/processes/process-list.spec.ts b/tests/ms2/processes/process-list.spec.ts index 03b4ee851..1c7ff076d 100644 --- a/tests/ms2/processes/process-list.spec.ts +++ b/tests/ms2/processes/process-list.spec.ts @@ -379,8 +379,12 @@ test('create a new folder and remove it with context menu', async ({ processList const folderLocator = page.getByText(folderId); await expect(folderLocator).toBeVisible(); - // await folderLocator.scrollIntoViewIfNeeded(); + /* The playwright browser crops it's view which can cause unwanted scroling */ + /* Clicking calls scrollIntoView before clicking, which can cause the context menu to close */ + /* Workauround: */ await page.evaluate(() => window!.scrollTo(0, 0)); + await folderLocator.scrollIntoViewIfNeeded(); + folderLocator.click({ button: 'right' }); const menuLocator = page.getByRole('menuitem', { name: 'delete Delete' }); await menuLocator.click();