mirror of
https://github.com/nasa/openmct.git
synced 2024-12-20 05:37:53 +00:00
test(e2e): fix overlay plot element preview test flake (#6609)
test: wait for plot to be drawn before assertions
This commit is contained in:
parent
ddeeff4822
commit
c200999659
@ -214,12 +214,17 @@ test.describe('Overlay Plot', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await page.goto(overlayPlot.url);
|
await page.goto(overlayPlot.url);
|
||||||
|
// Wait for plot series data to load and be drawn
|
||||||
|
await expect(page.locator('.js-series-data-loaded')).toBeVisible();
|
||||||
await page.click('button[title="Edit"]');
|
await page.click('button[title="Edit"]');
|
||||||
|
|
||||||
await selectInspectorTab(page, 'Elements');
|
await selectInspectorTab(page, 'Elements');
|
||||||
|
|
||||||
await page.locator(`#inspector-elements-tree >> text=${swgA.name}`).click();
|
await page.locator(`#inspector-elements-tree >> text=${swgA.name}`).click();
|
||||||
|
|
||||||
|
// Wait for "View Large" plot series data to load and be drawn
|
||||||
|
await expect(page.locator('.c-overlay .js-series-data-loaded')).toBeVisible();
|
||||||
|
|
||||||
const plotPixelSize = await getCanvasPixelsWithData(page);
|
const plotPixelSize = await getCanvasPixelsWithData(page);
|
||||||
expect(plotPixelSize).toBeGreaterThan(0);
|
expect(plotPixelSize).toBeGreaterThan(0);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user