mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-26 15:16:27 +01:00
Updates to v10 and disables snapshotting for now
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
context("Dozzle default mode", { baseUrl: Cypress.env("DOZZLE_DEFAULT") }, () => {
|
||||
beforeEach(() => {
|
||||
cy.visit("/");
|
||||
});
|
||||
|
||||
it("home screen", () => {
|
||||
cy.get("li.running", { timeout: 10000 }).removeDates().replaceSkippedElements().matchImageSnapshot();
|
||||
});
|
||||
|
||||
it("correct title", () => {
|
||||
cy.title().should("eq", "1 containers - Dozzle");
|
||||
|
||||
cy.get("li.running:first a").click();
|
||||
|
||||
cy.title().should("include", "- Dozzle");
|
||||
});
|
||||
|
||||
it("settings page", () => {
|
||||
cy.get("a[href='/settings']").click();
|
||||
|
||||
cy.contains("About");
|
||||
});
|
||||
});
|
||||
@@ -1,20 +0,0 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
context("Dozzle settings mode", { baseUrl: Cypress.env("DOZZLE_DEFAULT") }, () => {
|
||||
beforeEach(() => {
|
||||
cy.visit("/version").clearLocalStorage().visit("/settings");
|
||||
});
|
||||
|
||||
it("scrollbars", () => {
|
||||
cy.contains("Use smaller scrollbars").click();
|
||||
cy.get("html").should("have.class", "has-custom-scrollbars");
|
||||
});
|
||||
|
||||
it("stopped containers", () => {
|
||||
cy.contains("Show stopped containers")
|
||||
.click()
|
||||
.then(() => {
|
||||
expect(JSON.parse(localStorage.getItem("DOZZLE_SETTINGS")).showAllContainers).to.be.true;
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,15 +0,0 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
context.skip("Dozzle light mode", { baseUrl: Cypress.env("DOZZLE_DEFAULT") }, () => {
|
||||
before(() => {
|
||||
cy.visit("/settings");
|
||||
cy.contains("Use light theme").click();
|
||||
});
|
||||
beforeEach(() => {
|
||||
cy.visit("/");
|
||||
});
|
||||
|
||||
it("home screen", () => {
|
||||
cy.get("li.running", { timeout: 10000 }).removeDates().matchImageSnapshot();
|
||||
});
|
||||
});
|
||||
@@ -1,7 +0,0 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
context("Dozzle routes", { baseUrl: Cypress.env("DOZZLE_DEFAULT") }, () => {
|
||||
it("show", () => {
|
||||
cy.visit("/show?name=dozzle").url().should("include", "/container/");
|
||||
});
|
||||
});
|
||||
@@ -24,9 +24,9 @@
|
||||
// -- This will overwrite an existing command --
|
||||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
||||
|
||||
import { addMatchImageSnapshotCommand } from "cypress-image-snapshot/command";
|
||||
// import { addMatchImageSnapshotCommand } from "cypress-image-snapshot/command";
|
||||
|
||||
addMatchImageSnapshotCommand();
|
||||
// addMatchImageSnapshotCommand();
|
||||
|
||||
Cypress.Commands.add("removeDates", () => {
|
||||
cy.window().then((win) => win.document.querySelectorAll("time").forEach((el) => el.remove()));
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
// ***********************************************************
|
||||
// This example support/index.js is processed and
|
||||
// loaded automatically before your test files.
|
||||
//
|
||||
// This is a great place to put global configuration and
|
||||
// behavior that modifies Cypress.
|
||||
//
|
||||
// You can change the location of this file or turn off
|
||||
// automatically serving support files with the
|
||||
// 'supportFile' configuration option.
|
||||
//
|
||||
// You can read more here:
|
||||
// https://on.cypress.io/configuration
|
||||
// ***********************************************************
|
||||
|
||||
// Import commands.js using ES2015 syntax:
|
||||
import "./commands";
|
||||
|
||||
// Alternatively you can use CommonJS syntax:
|
||||
// require('./commands')
|
||||
Reference in New Issue
Block a user