fix ui auth forms and stabilize baseline tests
This commit is contained in:
@@ -169,7 +169,7 @@ test("GET / renders landing page", async () => {
|
||||
const app = createApp();
|
||||
const response = await call(app, { method: "GET", path: "/" });
|
||||
assert.equal(response.status, 200);
|
||||
assert.match(response.body, /From X Article to audiobook/);
|
||||
assert.match(response.body, /Listen to X Articles/);
|
||||
});
|
||||
|
||||
test("GET /assets/styles.css serves compiled stylesheet", async () => {
|
||||
@@ -229,7 +229,7 @@ test("authenticated dashboard topup + simulate mention flow", async () => {
|
||||
headers: { cookie: cookieHeader },
|
||||
});
|
||||
assert.equal(dashboard.status, 200);
|
||||
assert.match(dashboard.body, /Recent audiobooks/);
|
||||
assert.match(dashboard.body, /Recent Audiobooks/);
|
||||
assert.match(dashboard.body, /Hello/);
|
||||
});
|
||||
|
||||
@@ -264,7 +264,7 @@ test("audio flow requires auth for unlock and supports permanent unlock", async
|
||||
path: audioPath,
|
||||
headers: { cookie: "xartaudio_user=viewer" },
|
||||
});
|
||||
assert.match(beforeUnlock.body, /Unlock required: 1 credits/);
|
||||
assert.match(beforeUnlock.body, /Unlock this audiobook permanently for/);
|
||||
|
||||
const unlock = await call(app, {
|
||||
method: "POST",
|
||||
@@ -278,7 +278,7 @@ test("audio flow requires auth for unlock and supports permanent unlock", async
|
||||
path: audioPath,
|
||||
headers: { cookie: "xartaudio_user=viewer" },
|
||||
});
|
||||
assert.match(afterUnlock.body, /Access granted/);
|
||||
assert.match(afterUnlock.body, /Unlocked!/);
|
||||
|
||||
const wallet = await call(app, {
|
||||
method: "GET",
|
||||
|
||||
Reference in New Issue
Block a user