Skip to content

Commit d80efa8

Browse files
test(heatmap-chat-web): add wait for SVG chart elements
1 parent 219ca0f commit d80efa8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/pluggableWidgets/heatmap-chart-web/e2e/HeatMapChart.spec.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ test.describe("heatmap-chart-web", () => {
1616
const customColorContainer = await page.locator(".mx-name-containerCustomColor");
1717
await expect(customColorContainer).toBeVisible({ timeout: 10000 });
1818
await customColorContainer.scrollIntoViewIfNeeded();
19+
await expect(customColorContainer.locator("svg")).toBeVisible({ timeout: 5000 });
20+
await page.waitForTimeout(500);
1921
await expect(customColorContainer).toHaveScreenshot(`heatmapChartCustomColor.png`, {
2022
threshold: 0.5
2123
});
@@ -27,6 +29,8 @@ test.describe("heatmap-chart-web", () => {
2729
const ascendingContainer = await page.locator(".mx-name-containerAscending");
2830
await expect(ascendingContainer).toBeVisible({ timeout: 10000 });
2931
await ascendingContainer.scrollIntoViewIfNeeded();
32+
await expect(ascendingContainer.locator("svg")).toBeVisible({ timeout: 5000 });
33+
await page.waitForTimeout(500);
3034
await expect(ascendingContainer).toHaveScreenshot(`heatmapChartAscending.png`, {
3135
threshold: 0.5
3236
});
@@ -36,7 +40,10 @@ test.describe("heatmap-chart-web", () => {
3640
page
3741
}) => {
3842
const descendingContainer = await page.locator(".mx-name-containerDescending");
43+
await expect(descendingContainer).toBeVisible({ timeout: 10000 });
3944
await descendingContainer.scrollIntoViewIfNeeded();
45+
await expect(descendingContainer.locator("svg")).toBeVisible({ timeout: 5000 });
46+
await page.waitForTimeout(500);
4047
await expect(descendingContainer).toHaveScreenshot(`heatmapChartDescending.png`, {
4148
threshold: 0.5
4249
});

0 commit comments

Comments
 (0)