mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-10-13 08:52:17 -05:00
fix: update e2e bad password
This commit is contained in:
4 files changed
+8
-8
No files matched your search
@@ -14,7 +14,7 @@ test("Basic Auth", async (t) => {
|
||||
body: {
|
||||
name: "admin",
|
||||
email: "admin@noreply.uptime-kuma.internal",
|
||||
password: "secret123",
|
||||
password: "Kuma-Test-8f4Q2xR9p",
|
||||
role: "admin",
|
||||
data: {
|
||||
username: "admin",
|
||||
@@ -29,7 +29,7 @@ test("Basic Auth", async (t) => {
|
||||
});
|
||||
|
||||
await t.test("[Basic Auth] returns true for valid credentials", async () => {
|
||||
const result = await checkPassword("admin", "secret123");
|
||||
const result = await checkPassword("admin", "Kuma-Test-8f4Q2xR9p");
|
||||
assert.strictEqual(result, true);
|
||||
});
|
||||
|
||||
@@ -39,7 +39,7 @@ test("Basic Auth", async (t) => {
|
||||
});
|
||||
|
||||
await t.test("returns false for non-existent user", async () => {
|
||||
const result = await checkPassword("nonexistent", "secret123");
|
||||
const result = await checkPassword("nonexistent", "Kuma-Test-8f4Q2xR9p");
|
||||
assert.strictEqual(result, false);
|
||||
});
|
||||
});
|
||||
@@ -25,7 +25,7 @@ test.describe("/metrics basic auth", () => {
|
||||
test("returns 200 with correct credentials", async ({ request }) => {
|
||||
const response = await request.get(`${serverUrl}/metrics`, {
|
||||
headers: {
|
||||
Authorization: "Basic " + btoa("admin:admin123"),
|
||||
Authorization: "Basic " + btoa("admin:Kuma-E2E-8f4Q2xR9p"),
|
||||
},
|
||||
});
|
||||
expect(response.status()).toBe(200);
|
||||
@@ -34,7 +34,7 @@ test.describe("/metrics basic auth", () => {
|
||||
test("response contains prometheus metrics", async ({ request }) => {
|
||||
const response = await request.get(`${serverUrl}/metrics`, {
|
||||
headers: {
|
||||
Authorization: "Basic " + btoa("admin:admin123"),
|
||||
Authorization: "Basic " + btoa("admin:Kuma-E2E-8f4Q2xR9p"),
|
||||
},
|
||||
});
|
||||
expect(response.status()).toBe(200);
|
||||
|
||||
@@ -24,8 +24,8 @@ test.describe("Uptime Kuma Setup", () => {
|
||||
await page.goto("./setup");
|
||||
await page.getByRole("textbox", { name: "Username" }).click();
|
||||
await page.getByRole("textbox", { name: "Username" }).fill("admin");
|
||||
await page.getByRole("textbox", { name: "Password", exact: true }).fill("admin123");
|
||||
await page.getByRole("textbox", { name: "Repeat Password" }).fill("admin123");
|
||||
await page.getByRole("textbox", { name: "Password", exact: true }).fill("Kuma-E2E-8f4Q2xR9p");
|
||||
await page.getByRole("textbox", { name: "Repeat Password" }).fill("Kuma-E2E-8f4Q2xR9p");
|
||||
await page.getByRole("button", { name: "Create" }).click();
|
||||
// User is auto-logged in and redirected to dashboard
|
||||
await page.waitForURL("/dashboard");
|
||||
|
||||
@@ -26,7 +26,7 @@ export async function login(page) {
|
||||
await page.getByPlaceholder("Username").click();
|
||||
await page.getByPlaceholder("Username").fill("admin");
|
||||
await page.getByPlaceholder("Username").press("Tab");
|
||||
await page.getByPlaceholder("Password").fill("admin123");
|
||||
await page.getByPlaceholder("Password").fill("Kuma-E2E-8f4Q2xR9p");
|
||||
await page.getByLabel("Remember me").check();
|
||||
await page.getByRole("button", { name: "Log in" }).click();
|
||||
await page.isVisible("text=Add New Monitor");
|
||||
|
||||
Reference in new issue
Block a user