[test] add test for i18n currentLocale

This commit is contained in:
LouisLam
2021-10-08 13:35:04 +08:00
parent 288e87bb3d
commit 11abc1f1e0
7 changed files with 33 additions and 14 deletions

View File

@@ -2,6 +2,7 @@
const { Page, Browser } = require("puppeteer");
const { sleep } = require("../src/util");
const axios = require("axios");
const { currentLocale } = require("../src/i18n");
/**
* Set back the correct data type for page object
@@ -223,6 +224,14 @@ describe("Init", () => {
});
});
describe("Test i18n.js", () => {
it("currentLocale()", () => {
expect(currentLocale()).toMatch("");
});
});
async function login(username, password) {
await input(page, "#floatingInput", username);
await input(page, "#floatingPassword", password);

View File

@@ -6,5 +6,4 @@ FROM ubuntu
# RUN ln -s /usr/bin/nodejs /usr/bin/node
# RUN node -v
COPY ./install.sh .
RUN bash install.sh local /opt/uptime-kuma 3000 0.0.0.0
RUN curl -o kuma_install.sh http://git.kuma.pet/install.sh && bash kuma_install.sh local /opt/uptime-kuma 3000 0.0.0.0