Plain HTML, CSS and JavaScript modules, with no build step. Hash routes and relative URLs make it work under any path. The job list is polled: every 2 seconds while a job runs, and less often otherwise.
16 lines
634 B
JavaScript
16 lines
634 B
JavaScript
import assert from 'node:assert/strict';
|
|
import { test } from 'node:test';
|
|
import { install, server, find, settle } from './flow-helpers.mjs';
|
|
|
|
const ui = install();
|
|
|
|
test('proxy authentication without a user does not offer a password login', async (t) => {
|
|
const backend = server(t);
|
|
backend.on('GET', 'auth/check', { authenticated: false, mode: 'proxy' });
|
|
await import('../../bindery/static/js/main.js');
|
|
await settle();
|
|
assert.match(ui.app.textContent, /Log in through the proxy/);
|
|
assert.equal(find(ui.app, 'button', 'Log in'), undefined);
|
|
assert.deepEqual(backend.requests.map((r) => r.path), ['auth/check']);
|
|
});
|