Skip to content

Commit b447f90

Browse files
test(heatmap-chat-web): change to wait for colorbar element
1 parent d80efa8 commit b447f90

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +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 });
19+
await expect(customColorContainer.locator(".mx-react-plotly-chart")).toBeVisible({ timeout: 5000 });
20+
await expect(customColorContainer.locator("g.colorbar")).toBeVisible({ timeout: 5000 });
2021
await page.waitForTimeout(500);
2122
await expect(customColorContainer).toHaveScreenshot(`heatmapChartCustomColor.png`, {
2223
threshold: 0.5
@@ -29,7 +30,8 @@ test.describe("heatmap-chart-web", () => {
2930
const ascendingContainer = await page.locator(".mx-name-containerAscending");
3031
await expect(ascendingContainer).toBeVisible({ timeout: 10000 });
3132
await ascendingContainer.scrollIntoViewIfNeeded();
32-
await expect(ascendingContainer.locator("svg")).toBeVisible({ timeout: 5000 });
33+
await expect(ascendingContainer.locator(".mx-react-plotly-chart")).toBeVisible({ timeout: 5000 });
34+
await expect(ascendingContainer.locator("g.colorbar")).toBeVisible({ timeout: 5000 });
3335
await page.waitForTimeout(500);
3436
await expect(ascendingContainer).toHaveScreenshot(`heatmapChartAscending.png`, {
3537
threshold: 0.5
@@ -42,7 +44,8 @@ test.describe("heatmap-chart-web", () => {
4244
const descendingContainer = await page.locator(".mx-name-containerDescending");
4345
await expect(descendingContainer).toBeVisible({ timeout: 10000 });
4446
await descendingContainer.scrollIntoViewIfNeeded();
45-
await expect(descendingContainer.locator("svg")).toBeVisible({ timeout: 5000 });
47+
await expect(descendingContainer.locator(".mx-react-plotly-chart")).toBeVisible({ timeout: 5000 });
48+
await expect(descendingContainer.locator("g.colorbar")).toBeVisible({ timeout: 5000 });
4649
await page.waitForTimeout(500);
4750
await expect(descendingContainer).toHaveScreenshot(`heatmapChartDescending.png`, {
4851
threshold: 0.5

0 commit comments

Comments
 (0)