slideshow

This commit is contained in:
th committed 2026-04-11 01:22:52 +02:00
1 parent 988a5410f7
commit 262b853c5b
18 files changed
+1305 -30

No files matched your search

+3 -2
View File
@@ -3,7 +3,8 @@ import { describe, it, expect, csrf } from './runner.js';
describe('Relay: Push API', () => {
it('push without config returns error', async () => {
const settings = await fetch('api/relay/settings').then(r => r.json());
if (settings.url && settings.has_key) return; // skip if configured
// The GET endpoint echoes the secret directly as `key` (single-user local app).
if (settings.url && settings.key) return; // skip if configured
const res = await fetch('api/relay/push', {
method: 'POST', headers: { 'Content-Type': 'application/json', 'X-CSRF-Token': csrf() },
@@ -25,7 +26,7 @@ describe('Relay: Push API', () => {
describe('Relay: Poll API', () => {
it('poll without config returns 0 pulled', async () => {
const settings = await fetch('api/relay/settings').then(r => r.json());
if (settings.url && settings.has_key) return;
if (settings.url && settings.key) return;
const res = await fetch('api/relay/poll', {
method: 'POST', headers: { 'X-CSRF-Token': csrf() },
+5 -1
View File
@@ -19,7 +19,11 @@ describe('Snippets: Date & Time', () => {
const body = $('#editor-body');
typeSnippet(body, '?dat');
await sleep(100);
const today = new Date().toISOString().substring(0, 10);
// Match editor's local-time formatting (not UTC) so the assertion doesn't
// drift at midnight depending on timezone offset.
const d = new Date();
const pad = n => String(n).padStart(2, '0');
const today = `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;
expect(body.value).toContain(today);
});