mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-27 15:41:45 +01:00
Adds more tests
This commit is contained in:
@@ -12,7 +12,7 @@ export const install = (app: App) => {
|
||||
);
|
||||
const i18n = createI18n({
|
||||
legacy: false,
|
||||
locale: navigator.language,
|
||||
locale: navigator.language.slice(0, 2),
|
||||
fallbackLocale: "en",
|
||||
messages,
|
||||
});
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"DOZZLE_DEFAULT": "http://localhost:8080/"
|
||||
"DOZZLE_DEFAULT": "http://localhost:8080/",
|
||||
"DOZZLE_AUTH": "http://localhost:8080/"
|
||||
}
|
||||
|
||||
14
e2e/cypress/e2e/dozze_auth.cy.js
Normal file
14
e2e/cypress/e2e/dozze_auth.cy.js
Normal file
@@ -0,0 +1,14 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
context("Dozzle default mode", { baseUrl: Cypress.env("DOZZLE_AUTH") }, () => {
|
||||
beforeEach(() => {
|
||||
cy.visit("/");
|
||||
});
|
||||
|
||||
it("login screen", () => {
|
||||
cy.get("input[name=username]").type("foo");
|
||||
cy.get("input[name=password]").type("bar");
|
||||
cy.get("button[type=submit]").click();
|
||||
cy.get("p.menu-label").should("contain", "Containers");
|
||||
});
|
||||
});
|
||||
17
e2e/cypress/e2e/dozze_i18n.cy.js
Normal file
17
e2e/cypress/e2e/dozze_i18n.cy.js
Normal file
@@ -0,0 +1,17 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
context("Dozzle es lang", { baseUrl: Cypress.env("DOZZLE_DEFAULT") }, () => {
|
||||
beforeEach(() => {
|
||||
cy.visit("/", {
|
||||
onBeforeLoad(win) {
|
||||
Object.defineProperty(win.navigator, "language", {
|
||||
value: "es_MX",
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it("should find contenedores", () => {
|
||||
cy.get("p.menu-label").should("contain", "Contenedores");
|
||||
});
|
||||
});
|
||||
15
e2e/cypress/e2e/dozzle_custom_base.cy.js
Normal file
15
e2e/cypress/e2e/dozzle_custom_base.cy.js
Normal file
@@ -0,0 +1,15 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
context("Dozzle custom base", { baseUrl: Cypress.env("DOZZLE_CUSTOM") }, () => {
|
||||
beforeEach(() => {
|
||||
cy.visit("/");
|
||||
});
|
||||
|
||||
it("custom base should work", () => {
|
||||
cy.get("p.menu-label").should("contain", "Containers");
|
||||
});
|
||||
|
||||
it("url should be custom", () => {
|
||||
cy.url().should("include", "foobarbase");
|
||||
});
|
||||
});
|
||||
@@ -8,8 +8,20 @@ services:
|
||||
- DOZZLE_FILTER=name=custom_base
|
||||
- DOZZLE_BASE=/foobarbase
|
||||
- DOZZLE_NO_ANALYTICS=1
|
||||
ports:
|
||||
- "8080:8080"
|
||||
image: amir20/dozzle_custom_cache
|
||||
build:
|
||||
context: ..
|
||||
cache_from:
|
||||
- amir20/dozzle_custom_cache:latest
|
||||
auth:
|
||||
container_name: auth
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
- DOZZLE_FILTER=name=auth
|
||||
- DOZZLE_USERNAME=foo
|
||||
- DOZZLE_PASSWORD=bar
|
||||
- DOZZLE_NO_ANALYTICS=1
|
||||
image: amir20/dozzle_custom_cache
|
||||
build:
|
||||
context: ..
|
||||
@@ -22,8 +34,6 @@ services:
|
||||
environment:
|
||||
- DOZZLE_FILTER=name=dozzle
|
||||
- DOZZLE_NO_ANALYTICS=1
|
||||
ports:
|
||||
- "9090:8080"
|
||||
image: amir20/dozzle_cache:latest
|
||||
build:
|
||||
context: ..
|
||||
@@ -41,7 +51,8 @@ services:
|
||||
- ./cypress.config.ts:/e2e/cypress.config.ts
|
||||
environment:
|
||||
- CYPRESS_DOZZLE_DEFAULT=http://dozzle:8080/
|
||||
- CYPRESS_CUSTOM_DEFAULT=http://custom_base:8080/foobarbase
|
||||
- CYPRESS_DOZZLE_AUTH=http://auth:8080/
|
||||
- CYPRESS_DOZZLE_CUSTOM=http://custom_base:8080/foobarbase
|
||||
- CYPRESS_RECORD_KEY=155c3cf8-b2dd-4f5e-9fb3-7635f5b79d4d
|
||||
- COMMIT_INFO_BRANCH=${GITHUB_REF_NAME}
|
||||
- COMMIT_INFO_AUTHOR=${GITHUB_ACTOR}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"name": "e2e",
|
||||
"version": "1.0.0",
|
||||
"scripts": {},
|
||||
"scripts": {
|
||||
"test": "cypress run"
|
||||
},
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@frsource/cypress-plugin-visual-regression-diff": "^1.9.13",
|
||||
|
||||
49
locales/es.yml
Normal file
49
locales/es.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
toolbar:
|
||||
clear: Clear
|
||||
download: Download
|
||||
search: Search
|
||||
label:
|
||||
containers: Contenedores
|
||||
total-containers: Total Containers
|
||||
running: Running
|
||||
total-cpu-usage: Total CPU Usage
|
||||
total-mem-usage: Total Mem Usage
|
||||
dozzle-version: Dozzle Version
|
||||
all: All
|
||||
password: Password
|
||||
username: Username
|
||||
tooltip:
|
||||
search: Search containers (⌘ + k, ⌃k)
|
||||
pin-column: Pin as column
|
||||
error:
|
||||
page-not-found: This page does not exist.
|
||||
invalid-auth: Username and password are not valid.
|
||||
title:
|
||||
page-not-found: Page not found
|
||||
login: Authentication Required
|
||||
settings: Settings
|
||||
button:
|
||||
logout: Logout
|
||||
login: Login
|
||||
placeholder:
|
||||
search-containers: Search Containers
|
||||
settings:
|
||||
display: Display
|
||||
small-scrollbars: Use smaller scrollbars
|
||||
show-timesamps: Show timestamps
|
||||
soft-wrap: Soft wrap lines
|
||||
12-24-format: >-
|
||||
By default, Dozzle will use your browser's locale to format time. You can
|
||||
force to 12 or 24 hour style.
|
||||
font-size: Font size to use for logs
|
||||
color-scheme: Color scheme
|
||||
options: Options
|
||||
show-stopped-containers: Show stopped containers
|
||||
about: About
|
||||
search: >-
|
||||
Enable searching with Dozzle using <code>command+f</code> or
|
||||
<code>ctrl+f</code>
|
||||
using-version: You are using Dozzle {version}.
|
||||
update-available: >-
|
||||
New version is available! Update to
|
||||
<a :href="{href}" class="next-release" target="_blank" rel="noreferrer noopener">{nextVersion}</a>.
|
||||
Reference in New Issue
Block a user