Skip to content

Commit

Permalink
fix: e2e screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
gjulivan committed Sep 18, 2024
1 parent a10b6eb commit f9e9b94
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 3 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ test.describe("pie-doughnut-chart-web", () => {
test(
"renders pie chart with custom color and compares with a screenshot baseline",
async ({ page }) => {
const containerSliceColor = await page.locator(".mx-name-containerSliceColor");
const containerSliceColor = await page.locator(
".mx-name-containerSliceColor .plot-container.plotly .main-svg:first-child"
);
await containerSliceColor.scrollIntoViewIfNeeded();
await expect(containerSliceColor).toBeVisible({ timeout: 15000 });
await containerSliceColor.scrollIntoViewIfNeeded();
Expand All @@ -34,15 +36,19 @@ test.describe("pie-doughnut-chart-web", () => {
test(
"renders pie chart with pie format and compares with a screenshot baseline",
async ({ page }) => {
const containerPieFormat = await page.locator(".mx-name-containerPieFormat");
const containerPieFormat = await page.locator(
".mx-name-containerPieFormat .plot-container.plotly .main-svg:first-child"
);
await containerPieFormat.scrollIntoViewIfNeeded();
await expect(containerPieFormat).toHaveScreenshot("pieChartPieFormat.png", { threshold: 0.5 });
},
{ retry: 3 }
);

test("renders pie chart with doughnut format and compares with a screenshot baseline", async ({ page }) => {
const containerDoughnutFormat = await page.locator(".mx-name-containerDoughnutFormat");
const containerDoughnutFormat = await page.locator(
".mx-name-containerDoughnutFormat .plot-container.plotly .main-svg:first-child"
);
await containerDoughnutFormat.scrollIntoViewIfNeeded();
await expect(containerDoughnutFormat).toHaveScreenshot("pieChartDoughnutFormat.png", { threshold: 0.5 });
});
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 105;
}

&.view-code-dialog {
Expand Down

0 comments on commit f9e9b94

Please sign in to comment.