Skip to content

Commit 8fcc7ed

Browse files
Add wait for colorbar element in the heatmap e2e (#2000)
2 parents d59637c + fd87c17 commit 8fcc7ed

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ 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(".mx-react-plotly-chart")).toBeVisible({ timeout: 5000 });
20+
await expect(customColorContainer.locator("g.colorbar")).toBeVisible({ timeout: 5000 });
21+
await page.waitForTimeout(500);
1922
await expect(customColorContainer).toHaveScreenshot(`heatmapChartCustomColor.png`, {
2023
threshold: 0.5
2124
});
@@ -27,6 +30,9 @@ test.describe("heatmap-chart-web", () => {
2730
const ascendingContainer = await page.locator(".mx-name-containerAscending");
2831
await expect(ascendingContainer).toBeVisible({ timeout: 10000 });
2932
await ascendingContainer.scrollIntoViewIfNeeded();
33+
await expect(ascendingContainer.locator(".mx-react-plotly-chart")).toBeVisible({ timeout: 5000 });
34+
await expect(ascendingContainer.locator("g.colorbar")).toBeVisible({ timeout: 5000 });
35+
await page.waitForTimeout(500);
3036
await expect(ascendingContainer).toHaveScreenshot(`heatmapChartAscending.png`, {
3137
threshold: 0.5
3238
});
@@ -36,7 +42,11 @@ test.describe("heatmap-chart-web", () => {
3642
page
3743
}) => {
3844
const descendingContainer = await page.locator(".mx-name-containerDescending");
45+
await expect(descendingContainer).toBeVisible({ timeout: 10000 });
3946
await descendingContainer.scrollIntoViewIfNeeded();
47+
await expect(descendingContainer.locator(".mx-react-plotly-chart")).toBeVisible({ timeout: 5000 });
48+
await expect(descendingContainer.locator("g.colorbar")).toBeVisible({ timeout: 5000 });
49+
await page.waitForTimeout(500);
4050
await expect(descendingContainer).toHaveScreenshot(`heatmapChartDescending.png`, {
4151
threshold: 0.5
4252
});
3.03 KB
Loading

0 commit comments

Comments
 (0)