diff --git a/e2e/cypress/e2e/dozzle_dark.cy.js b/e2e/cypress/e2e/dozzle_dark.cy.js
index 30f090e3..34340488 100644
--- a/e2e/cypress/e2e/dozzle_dark.cy.js
+++ b/e2e/cypress/e2e/dozzle_dark.cy.js
@@ -1,20 +1,12 @@
///
-context.skip("Dozzle dark mode", { baseUrl: Cypress.env("DOZZLE_DEFAULT") }, () => {
+context("Dozzle dark mode", { baseUrl: Cypress.env("DOZZLE_DEFAULT") }, () => {
beforeEach(() => {
- Cypress.on("window:before:load", (win) => {
- cy.stub(win, "matchMedia")
- .withArgs("(prefers-color-scheme: dark)")
- .returns({
- matches: true,
- })
- .as("dark-media-query");
- });
-
- cy.visit("/", {});
+ cy.visit("/");
+ cy.window().then((win) => win.document.documentElement.setAttribute("data-theme", "dark"));
});
it("home screen", () => {
- cy.get("li.running", { timeout: 10000 }).removeDates().matchImage();
+ cy.get("li.running", { timeout: 10000 }).removeDates().replaceSkippedElements().matchImage();
});
});
diff --git a/e2e/cypress/plugins/index.js b/e2e/cypress/plugins/index.js
deleted file mode 100644
index a5d22241..00000000
--- a/e2e/cypress/plugins/index.js
+++ /dev/null
@@ -1,26 +0,0 @@
-///
-// ***********************************************************
-// This example plugins/index.js can be used to load plugins
-//
-// You can change the location of this file or turn off loading
-// the plugins file with the 'pluginsFile' configuration option.
-//
-// You can read more here:
-// https://on.cypress.io/plugins-guide
-// ***********************************************************
-
-// This function is called when a project is opened or re-opened (e.g. due to
-// the project's config changing)
-
-const { addMatchImageSnapshotPlugin } = require("cypress-image-snapshot/plugin");
-
-/**
- * @type {Cypress.PluginConfig}
- */
-// eslint-disable-next-line no-unused-vars
-module.exports = (on, config) => {
- // `on` is used to hook into various events Cypress emits
- // `config` is the resolved Cypress config
-
- addMatchImageSnapshotPlugin(on, config);
-};