From 842c292b2ff66a9b56e7b5da3fdc09279c2dc0f1 Mon Sep 17 00:00:00 2001 From: Steven Wu Date: Fri, 1 Mar 2024 11:16:26 -0500 Subject: [PATCH] test: update snapshot naming --- tests/express.spec.ts | 4 +--- ...linux.png => Express-loads-1-chromium-linux.png} | Bin ...-linux.png => Express-loads-1-firefox-linux.png} | Bin ...t-linux.png => Express-loads-1-webkit-linux.png} | Bin tests/matplotlib.spec.ts | 2 +- ...ux.png => Matplotlib-loads-1-chromium-linux.png} | Bin ...nux.png => Matplotlib-loads-1-firefox-linux.png} | Bin ...inux.png => Matplotlib-loads-1-webkit-linux.png} | Bin tests/ui.spec.ts | 4 +--- ...mium-linux.png => UI-loads-1-chromium-linux.png} | Bin ...refox-linux.png => UI-loads-1-firefox-linux.png} | Bin ...webkit-linux.png => UI-loads-1-webkit-linux.png} | Bin 12 files changed, 3 insertions(+), 7 deletions(-) rename tests/express.spec.ts-snapshots/{express-fig-chromium-linux.png => Express-loads-1-chromium-linux.png} (100%) rename tests/express.spec.ts-snapshots/{express-fig-firefox-linux.png => Express-loads-1-firefox-linux.png} (100%) rename tests/express.spec.ts-snapshots/{express-fig-webkit-linux.png => Express-loads-1-webkit-linux.png} (100%) rename tests/matplotlib.spec.ts-snapshots/{matplotlib-plot-chromium-linux.png => Matplotlib-loads-1-chromium-linux.png} (100%) rename tests/matplotlib.spec.ts-snapshots/{matplotlib-plot-firefox-linux.png => Matplotlib-loads-1-firefox-linux.png} (100%) rename tests/matplotlib.spec.ts-snapshots/{matplotlib-plot-webkit-linux.png => Matplotlib-loads-1-webkit-linux.png} (100%) rename tests/ui.spec.ts-snapshots/{ui-component-chromium-linux.png => UI-loads-1-chromium-linux.png} (100%) rename tests/ui.spec.ts-snapshots/{ui-component-firefox-linux.png => UI-loads-1-firefox-linux.png} (100%) rename tests/ui.spec.ts-snapshots/{ui-component-webkit-linux.png => UI-loads-1-webkit-linux.png} (100%) diff --git a/tests/express.spec.ts b/tests/express.spec.ts index 16b99ba8b..6859fdca8 100644 --- a/tests/express.spec.ts +++ b/tests/express.spec.ts @@ -4,7 +4,5 @@ import { openPanel, gotoPage } from './utils'; test('Express loads', async ({ page }) => { await gotoPage(page, ''); await openPanel(page, 'express_fig', '.js-plotly-plot'); - await expect(page.locator('.iris-chart-panel')).toHaveScreenshot( - 'express_fig.png' - ); + await expect(page.locator('.iris-chart-panel')).toHaveScreenshot(); }); diff --git a/tests/express.spec.ts-snapshots/express-fig-chromium-linux.png b/tests/express.spec.ts-snapshots/Express-loads-1-chromium-linux.png similarity index 100% rename from tests/express.spec.ts-snapshots/express-fig-chromium-linux.png rename to tests/express.spec.ts-snapshots/Express-loads-1-chromium-linux.png diff --git a/tests/express.spec.ts-snapshots/express-fig-firefox-linux.png b/tests/express.spec.ts-snapshots/Express-loads-1-firefox-linux.png similarity index 100% rename from tests/express.spec.ts-snapshots/express-fig-firefox-linux.png rename to tests/express.spec.ts-snapshots/Express-loads-1-firefox-linux.png diff --git a/tests/express.spec.ts-snapshots/express-fig-webkit-linux.png b/tests/express.spec.ts-snapshots/Express-loads-1-webkit-linux.png similarity index 100% rename from tests/express.spec.ts-snapshots/express-fig-webkit-linux.png rename to tests/express.spec.ts-snapshots/Express-loads-1-webkit-linux.png diff --git a/tests/matplotlib.spec.ts b/tests/matplotlib.spec.ts index 981fad15b..335a97ebd 100644 --- a/tests/matplotlib.spec.ts +++ b/tests/matplotlib.spec.ts @@ -6,5 +6,5 @@ test('Matplotlib loads', async ({ page }) => { await openPanel(page, 'matplotlib_fig', '.matplotlib-view'); await expect( page.getByRole('img', { name: 'Matplotlib render' }) - ).toHaveScreenshot('matplotlib_plot.png'); + ).toHaveScreenshot(); }); diff --git a/tests/matplotlib.spec.ts-snapshots/matplotlib-plot-chromium-linux.png b/tests/matplotlib.spec.ts-snapshots/Matplotlib-loads-1-chromium-linux.png similarity index 100% rename from tests/matplotlib.spec.ts-snapshots/matplotlib-plot-chromium-linux.png rename to tests/matplotlib.spec.ts-snapshots/Matplotlib-loads-1-chromium-linux.png diff --git a/tests/matplotlib.spec.ts-snapshots/matplotlib-plot-firefox-linux.png b/tests/matplotlib.spec.ts-snapshots/Matplotlib-loads-1-firefox-linux.png similarity index 100% rename from tests/matplotlib.spec.ts-snapshots/matplotlib-plot-firefox-linux.png rename to tests/matplotlib.spec.ts-snapshots/Matplotlib-loads-1-firefox-linux.png diff --git a/tests/matplotlib.spec.ts-snapshots/matplotlib-plot-webkit-linux.png b/tests/matplotlib.spec.ts-snapshots/Matplotlib-loads-1-webkit-linux.png similarity index 100% rename from tests/matplotlib.spec.ts-snapshots/matplotlib-plot-webkit-linux.png rename to tests/matplotlib.spec.ts-snapshots/Matplotlib-loads-1-webkit-linux.png diff --git a/tests/ui.spec.ts b/tests/ui.spec.ts index 23e7225e5..ddc2897ff 100644 --- a/tests/ui.spec.ts +++ b/tests/ui.spec.ts @@ -4,7 +4,5 @@ import { openPanel, gotoPage } from './utils'; test('UI loads', async ({ page }) => { await gotoPage(page, ''); await openPanel(page, 'ui_component', '.ui-portal-panel'); - await expect(page.locator('.ui-portal-panel')).toHaveScreenshot( - 'ui_component.png' - ); + await expect(page.locator('.ui-portal-panel')).toHaveScreenshot(); }); diff --git a/tests/ui.spec.ts-snapshots/ui-component-chromium-linux.png b/tests/ui.spec.ts-snapshots/UI-loads-1-chromium-linux.png similarity index 100% rename from tests/ui.spec.ts-snapshots/ui-component-chromium-linux.png rename to tests/ui.spec.ts-snapshots/UI-loads-1-chromium-linux.png diff --git a/tests/ui.spec.ts-snapshots/ui-component-firefox-linux.png b/tests/ui.spec.ts-snapshots/UI-loads-1-firefox-linux.png similarity index 100% rename from tests/ui.spec.ts-snapshots/ui-component-firefox-linux.png rename to tests/ui.spec.ts-snapshots/UI-loads-1-firefox-linux.png diff --git a/tests/ui.spec.ts-snapshots/ui-component-webkit-linux.png b/tests/ui.spec.ts-snapshots/UI-loads-1-webkit-linux.png similarity index 100% rename from tests/ui.spec.ts-snapshots/ui-component-webkit-linux.png rename to tests/ui.spec.ts-snapshots/UI-loads-1-webkit-linux.png