diff --git a/src/views/pages.js b/src/views/pages.js index 7beedb1..2fac579 100644 --- a/src/views/pages.js +++ b/src/views/pages.js @@ -220,27 +220,50 @@ function renderLoginPage({ returnTo = "/app", error = null }) {
${errorBlock} -
+ - -
- - -
- + +
+ +
Email
+ +
+ + +
- -
OR
- -
-

Don't have an account? Contact us

+ +
Create account
+ +
+ + + + + +
+ +
+ X sign-in requires X_OAUTH_CLIENT_ID and X_OAUTH_CLIENT_SECRET.
-

Dev mode: Enter any username to create a session.

`, diff --git a/test/app.test.js b/test/app.test.js index cba023b..72b04e8 100644 --- a/test/app.test.js +++ b/test/app.test.js @@ -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", diff --git a/test/views.test.js b/test/views.test.js index 68b63d1..fc57385 100644 --- a/test/views.test.js +++ b/test/views.test.js @@ -19,7 +19,7 @@ test("shell includes daisyui and pwa tags", () => { test("landing page renders hero and flow sections", () => { const html = renderLandingPage({ authenticated: false, userId: null }); - assert.match(html, /From X Article to audiobook/); + assert.match(html, /Listen to X Articles/); assert.match(html, /id="how"/); assert.match(html, /id="pricing"/); }); @@ -40,8 +40,8 @@ test("app page renders stats and forms", () => { jobs: [{ assetId: "1", status: "completed", article: { title: "Hello" }, creditsCharged: 1 }], }); - assert.match(html, /Top up credits/); - assert.match(html, /Simulate mention/); + assert.match(html, /Top Up Credits/); + assert.match(html, /Simulate Mention/); assert.match(html, /Hello/); }); @@ -52,5 +52,6 @@ test("audio page shows unlock action when payment is required", () => { userId: "u2", }); - assert.match(html, /Pay 3 credits and unlock forever/); + assert.match(html, /3 credits/); + assert.match(html, /Pay & Listen/); });