diff --git a/tests/js/tests.js b/tests/js/tests.js index 1728a4ed..20127728 100644 --- a/tests/js/tests.js +++ b/tests/js/tests.js @@ -46,6 +46,19 @@ test.describe("top nav bar", () => { const header = page.locator("header.mobile-header"); await expect(header).toHaveScreenshot(); }); + + test("uses custom icons on mobile dark mode cycle", async ({ page }) => { + await setMobile(page); + await page.goto("sphinx_guide/lists.html"); + const header = page.locator("header.mobile-header"); + await expect(header).toHaveScreenshot(); + await click(page, "div.theme-toggle-header button"); + await expect(header).toHaveScreenshot(); + await click(page, "div.theme-toggle-header button"); + await expect(header).toHaveScreenshot(); + await click(page, "div.theme-toggle-header button"); + await expect(header).toHaveScreenshot(); + }); }); test("right side bar is not broken by our page layout", async ({ page }) => { diff --git a/tests/js/tests.js-snapshots/top-nav-bar-uses-custom-icons-on-mobile-dark-mode-cycle-1-linux.png b/tests/js/tests.js-snapshots/top-nav-bar-uses-custom-icons-on-mobile-dark-mode-cycle-1-linux.png new file mode 100644 index 00000000..64762bb0 Binary files /dev/null and b/tests/js/tests.js-snapshots/top-nav-bar-uses-custom-icons-on-mobile-dark-mode-cycle-1-linux.png differ diff --git a/tests/js/tests.js-snapshots/top-nav-bar-uses-custom-icons-on-mobile-dark-mode-cycle-2-linux.png b/tests/js/tests.js-snapshots/top-nav-bar-uses-custom-icons-on-mobile-dark-mode-cycle-2-linux.png new file mode 100644 index 00000000..366ebb88 Binary files /dev/null and b/tests/js/tests.js-snapshots/top-nav-bar-uses-custom-icons-on-mobile-dark-mode-cycle-2-linux.png differ diff --git a/tests/js/tests.js-snapshots/top-nav-bar-uses-custom-icons-on-mobile-dark-mode-cycle-3-linux.png b/tests/js/tests.js-snapshots/top-nav-bar-uses-custom-icons-on-mobile-dark-mode-cycle-3-linux.png new file mode 100644 index 00000000..20d7bb03 Binary files /dev/null and b/tests/js/tests.js-snapshots/top-nav-bar-uses-custom-icons-on-mobile-dark-mode-cycle-3-linux.png differ diff --git a/tests/js/tests.js-snapshots/top-nav-bar-uses-custom-icons-on-mobile-dark-mode-cycle-4-linux.png b/tests/js/tests.js-snapshots/top-nav-bar-uses-custom-icons-on-mobile-dark-mode-cycle-4-linux.png new file mode 100644 index 00000000..64762bb0 Binary files /dev/null and b/tests/js/tests.js-snapshots/top-nav-bar-uses-custom-icons-on-mobile-dark-mode-cycle-4-linux.png differ