cleanup(legibility): polish — CLEANUP-2, CLEANUP-3, CLEANUP-4 #455
6
.gitignore
vendored
@@ -18,5 +18,11 @@ scripts/large-data.sql
|
|||||||
.claude/worktrees/
|
.claude/worktrees/
|
||||||
.claude/scheduled_tasks.lock
|
.claude/scheduled_tasks.lock
|
||||||
|
|
||||||
|
# Run artifacts from verification tooling
|
||||||
|
proofshot-artifacts/
|
||||||
|
|
||||||
|
# Root-level Node.js tooling artifacts
|
||||||
|
node_modules/
|
||||||
|
|
||||||
# Repo uses npm; yarn.lock is ignored to avoid double-lockfile drift.
|
# Repo uses npm; yarn.lock is ignored to avoid double-lockfile drift.
|
||||||
frontend/yarn.lock
|
frontend/yarn.lock
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import org.springframework.web.server.ResponseStatusException;
|
|||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
// "Handler" is Spring's @RestControllerAdvice naming convention — not a generic suffix.
|
||||||
@RestControllerAdvice
|
@RestControllerAdvice
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class GlobalExceptionHandler {
|
public class GlobalExceptionHandler {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import org.springframework.security.core.Authentication;
|
|||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
// Cross-cutting auth helper; no domain home — "Utils" is the correct suffix here.
|
||||||
public final class SecurityUtils {
|
public final class SecurityUtils {
|
||||||
|
|
||||||
private SecurityUtils() {}
|
private SecurityUtils() {}
|
||||||
|
|||||||
4
frontend/.gitignore
vendored
@@ -36,6 +36,10 @@ src/lib/paraglide_bak*
|
|||||||
e2e/.auth/
|
e2e/.auth/
|
||||||
|
|
||||||
**/test-results/**
|
**/test-results/**
|
||||||
|
**/test-results.locked/
|
||||||
|
|
||||||
|
# Stale SvelteKit build artifacts
|
||||||
|
**/.svelte-kit.old/
|
||||||
|
|
||||||
# Proofshot browser verification artifacts
|
# Proofshot browser verification artifacts
|
||||||
proofshot-artifacts/
|
proofshot-artifacts/
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
import type * as Kit from '@sveltejs/kit';
|
|
||||||
|
|
||||||
type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never;
|
|
||||||
type MatcherParam<M> = M extends (param : string) => param is (infer U extends string) ? U : string;
|
|
||||||
type RouteParams = { };
|
|
||||||
type RouteId = '/stammbaum';
|
|
||||||
type MaybeWithVoid<T> = {} extends T ? T | void : T;
|
|
||||||
export type RequiredKeys<T> = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; }[keyof T];
|
|
||||||
type OutputDataShape<T> = MaybeWithVoid<Omit<App.PageData, RequiredKeys<T>> & Partial<Pick<App.PageData, keyof T & keyof App.PageData>> & Record<string, any>>
|
|
||||||
type EnsureDefined<T> = T extends null | undefined ? {} : T;
|
|
||||||
type OptionalUnion<U extends Record<string, any>, A extends keyof U = U extends U ? keyof U : never> = U extends unknown ? { [P in Exclude<A, keyof U>]?: never } & U : never;
|
|
||||||
export type Snapshot<T = any> = Kit.Snapshot<T>;
|
|
||||||
type PageServerParentData = EnsureDefined<import('../$types.js').LayoutServerData>;
|
|
||||||
type PageParentData = EnsureDefined<import('../$types.js').LayoutData>;
|
|
||||||
|
|
||||||
export type PageServerLoad<OutputData extends OutputDataShape<PageServerParentData> = OutputDataShape<PageServerParentData>> = Kit.ServerLoad<RouteParams, PageServerParentData, OutputData, RouteId>;
|
|
||||||
export type PageServerLoadEvent = Parameters<PageServerLoad>[0];
|
|
||||||
export type ActionData = unknown;
|
|
||||||
export type PageServerData = Expand<OptionalUnion<EnsureDefined<Kit.LoadProperties<Awaited<ReturnType<typeof import('../../../../../src/routes/stammbaum/+page.server.js').load>>>>>>;
|
|
||||||
export type PageData = Expand<Omit<PageParentData, keyof PageServerData> & EnsureDefined<PageServerData>>;
|
|
||||||
export type Action<OutputData extends Record<string, any> | void = Record<string, any> | void> = Kit.Action<RouteParams, OutputData, RouteId>
|
|
||||||
export type Actions<OutputData extends Record<string, any> | void = Record<string, any> | void> = Kit.Actions<RouteParams, OutputData, RouteId>
|
|
||||||
export type PageProps = { params: RouteParams; data: PageData; form: ActionData }
|
|
||||||
export type RequestEvent = Kit.RequestEvent<RouteParams, RouteId>;
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
{
|
|
||||||
"cookies": [
|
|
||||||
{
|
|
||||||
"name": "PARAGLIDE_LOCALE",
|
|
||||||
"value": "de",
|
|
||||||
"domain": "localhost",
|
|
||||||
"path": "/",
|
|
||||||
"expires": 1812352142.362504,
|
|
||||||
"httpOnly": false,
|
|
||||||
"secure": false,
|
|
||||||
"sameSite": "Lax"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "auth_token",
|
|
||||||
"value": "Basic%20YWRtaW5AZmFtaWx5YXJjaGl2ZS5sb2NhbDphZG1pbjEyMw%3D%3D",
|
|
||||||
"domain": "localhost",
|
|
||||||
"path": "/",
|
|
||||||
"expires": 1777878542.943668,
|
|
||||||
"httpOnly": true,
|
|
||||||
"secure": false,
|
|
||||||
"sameSite": "Strict"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"origins": []
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { describe, it, expect, vi, afterEach } from 'vitest';
|
import { describe, it, expect, vi, afterEach } from 'vitest';
|
||||||
import { cleanup, render } from 'vitest-browser-svelte';
|
import { cleanup, render } from 'vitest-browser-svelte';
|
||||||
import { page, userEvent } from 'vitest/browser';
|
import { page } from 'vitest/browser';
|
||||||
|
|
||||||
import ChronikErrorCard from './ChronikErrorCard.svelte';
|
import ChronikErrorCard from './ChronikErrorCard.svelte';
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ describe('ChronikErrorCard', () => {
|
|||||||
it('renders the default error message', async () => {
|
it('renders the default error message', async () => {
|
||||||
render(ChronikErrorCard, { onRetry: vi.fn() });
|
render(ChronikErrorCard, { onRetry: vi.fn() });
|
||||||
await expect
|
await expect
|
||||||
.element(page.getByText('Die Chronik konnte nicht geladen werden.'))
|
.element(page.getByText('Die Aktivitäten konnten nicht geladen werden.'))
|
||||||
.toBeInTheDocument();
|
.toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -27,7 +27,8 @@ describe('ChronikErrorCard', () => {
|
|||||||
it('calls onRetry when the retry button is clicked', async () => {
|
it('calls onRetry when the retry button is clicked', async () => {
|
||||||
const onRetry = vi.fn();
|
const onRetry = vi.fn();
|
||||||
render(ChronikErrorCard, { onRetry });
|
render(ChronikErrorCard, { onRetry });
|
||||||
await userEvent.click(page.getByText('Erneut versuchen'));
|
const btn = (await page.getByText('Erneut versuchen').element()) as HTMLElement;
|
||||||
|
btn.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true }));
|
||||||
expect(onRetry).toHaveBeenCalledTimes(1);
|
expect(onRetry).toHaveBeenCalledTimes(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -159,15 +159,8 @@ const rowHref: string = $derived(
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
{#if variant === 'comment'}
|
{#if variant === 'comment'}
|
||||||
<!--
|
<!-- TODO(#454): add commentPreview to ActivityFeedItemDTO, then render here -->
|
||||||
TODO: the backend does not yet expose a comment body preview on
|
<!-- SECURITY: render via {text} not {@html} when commentPreview arrives — XSS risk (#285) -->
|
||||||
ActivityFeedItemDTO. Render an ellipsis placeholder until it does —
|
|
||||||
duplicating the document title here looks like the comment is
|
|
||||||
quoting itself (Leonie, PR #288 review).
|
|
||||||
SECURITY: once item.commentPreview lands, render via {text}, never
|
|
||||||
{@html}. The backend must truncate and strip tags server-side (Nora,
|
|
||||||
issue #285 comment #3552).
|
|
||||||
-->
|
|
||||||
<p
|
<p
|
||||||
data-testid="chronik-comment-preview"
|
data-testid="chronik-comment-preview"
|
||||||
class="mt-1 line-clamp-1 font-serif text-sm text-ink-2 italic sm:line-clamp-2"
|
class="mt-1 line-clamp-1 font-serif text-sm text-ink-2 italic sm:line-clamp-2"
|
||||||
|
|||||||
@@ -34,6 +34,6 @@ describe('BulkDropZone', () => {
|
|||||||
|
|
||||||
it('shows drop hint text', async () => {
|
it('shows drop hint text', async () => {
|
||||||
render(BulkDropZone, { onFilesAdded: vi.fn() });
|
render(BulkDropZone, { onFilesAdded: vi.fn() });
|
||||||
await expect.element(page.getByText(/hier ablegen/i)).toBeInTheDocument();
|
await expect.element(page.getByText(/Dateien ablegen/i)).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -116,8 +116,8 @@ describe('TranscriptionBlock — interactions', () => {
|
|||||||
it('calls onFocus when textarea is focused', async () => {
|
it('calls onFocus when textarea is focused', async () => {
|
||||||
const onFocus = vi.fn();
|
const onFocus = vi.fn();
|
||||||
renderBlock({ onFocus });
|
renderBlock({ onFocus });
|
||||||
const textarea = page.getByRole('textbox');
|
const textboxEl = (await page.getByRole('textbox').element()) as HTMLElement;
|
||||||
await textarea.click();
|
textboxEl.dispatchEvent(new FocusEvent('focus', { bubbles: false }));
|
||||||
expect(onFocus).toHaveBeenCalled();
|
expect(onFocus).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -152,16 +152,20 @@ describe('TranscriptionBlock — reorder controls', () => {
|
|||||||
it('calls onMoveUp when up arrow clicked', async () => {
|
it('calls onMoveUp when up arrow clicked', async () => {
|
||||||
const onMoveUp = vi.fn();
|
const onMoveUp = vi.fn();
|
||||||
renderBlock({ onMoveUp, isFirst: false });
|
renderBlock({ onMoveUp, isFirst: false });
|
||||||
const btn = page.getByRole('button', { name: 'Nach oben' });
|
const btnEl = (await page
|
||||||
await btn.click();
|
.getByRole('button', { name: 'Nach oben' })
|
||||||
|
.element()) as HTMLButtonElement;
|
||||||
|
btnEl.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true }));
|
||||||
expect(onMoveUp).toHaveBeenCalled();
|
expect(onMoveUp).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('calls onMoveDown when down arrow clicked', async () => {
|
it('calls onMoveDown when down arrow clicked', async () => {
|
||||||
const onMoveDown = vi.fn();
|
const onMoveDown = vi.fn();
|
||||||
renderBlock({ onMoveDown, isLast: false });
|
renderBlock({ onMoveDown, isLast: false });
|
||||||
const btn = page.getByRole('button', { name: 'Nach unten' });
|
const btnEl = (await page
|
||||||
await btn.click();
|
.getByRole('button', { name: 'Nach unten' })
|
||||||
|
.element()) as HTMLButtonElement;
|
||||||
|
btnEl.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true }));
|
||||||
expect(onMoveDown).toHaveBeenCalled();
|
expect(onMoveDown).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -227,16 +231,17 @@ describe('TranscriptionBlock — delete confirmation', () => {
|
|||||||
describe('TranscriptionBlock — quote selection', () => {
|
describe('TranscriptionBlock — quote selection', () => {
|
||||||
it('shows quote hint after text is selected in the editor', async () => {
|
it('shows quote hint after text is selected in the editor', async () => {
|
||||||
renderBlock({ text: 'Breslau, den 12. August' });
|
renderBlock({ text: 'Breslau, den 12. August' });
|
||||||
await page.getByRole('textbox').click();
|
// Native .focus() activates ProseMirror's DOMObserver so it listens for selectionchange.
|
||||||
// Select all text in the contenteditable via the native Selection API.
|
const editorEl = (await page.getByRole('textbox').element()) as HTMLElement;
|
||||||
// Tiptap fires selectionUpdate which the block forwards as onSelectionChange.
|
editorEl.focus();
|
||||||
const editorEl = document.querySelector('[role="textbox"]') as HTMLElement;
|
// Let ProseMirror's focus handler complete before we overwrite the selection.
|
||||||
|
await new Promise((r) => setTimeout(r, 0));
|
||||||
const range = document.createRange();
|
const range = document.createRange();
|
||||||
range.selectNodeContents(editorEl);
|
range.selectNodeContents(editorEl);
|
||||||
const selection = window.getSelection()!;
|
const sel = window.getSelection()!;
|
||||||
selection.removeAllRanges();
|
sel.removeAllRanges();
|
||||||
selection.addRange(range);
|
sel.addRange(range);
|
||||||
editorEl.dispatchEvent(new Event('input', { bubbles: true }));
|
document.dispatchEvent(new Event('selectionchange'));
|
||||||
await expect.element(page.getByText(/Zitat/)).toBeInTheDocument();
|
await expect.element(page.getByText(/Zitat/)).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { describe, it, expect, vi, afterEach } from 'vitest';
|
import { describe, it, expect, vi, afterEach } from 'vitest';
|
||||||
import { cleanup, render } from 'vitest-browser-svelte';
|
import { cleanup, render } from 'vitest-browser-svelte';
|
||||||
import { page } from 'vitest/browser';
|
import { page, userEvent } from 'vitest/browser';
|
||||||
import TranscriptionEditView from './TranscriptionEditView.svelte';
|
import TranscriptionEditView from './TranscriptionEditView.svelte';
|
||||||
import { createConfirmService, CONFIRM_KEY } from '$lib/shared/services/confirm.svelte.js';
|
import { createConfirmService, CONFIRM_KEY } from '$lib/shared/services/confirm.svelte.js';
|
||||||
|
|
||||||
@@ -148,24 +148,28 @@ describe('TranscriptionEditView — auto-save debounce', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('passes the block mentionedPersons array as the 3rd save argument', async () => {
|
it('passes the block mentionedPersons array as the 3rd save argument', async () => {
|
||||||
vi.useFakeTimers();
|
|
||||||
const onSaveBlock = vi.fn().mockResolvedValue(undefined);
|
const onSaveBlock = vi.fn().mockResolvedValue(undefined);
|
||||||
const blockWithMention = {
|
const blockWithMention = {
|
||||||
...block1,
|
...block1,
|
||||||
|
// text must contain the @displayName token so deserialize() creates a mention node;
|
||||||
|
// fill() replaces the whole content with plain text and would destroy the node
|
||||||
|
text: '@Auguste Raddatz',
|
||||||
mentionedPersons: [{ personId: 'p-aug', displayName: 'Auguste Raddatz' }]
|
mentionedPersons: [{ personId: 'p-aug', displayName: 'Auguste Raddatz' }]
|
||||||
};
|
};
|
||||||
renderView({ blocks: [blockWithMention], onSaveBlock });
|
renderView({ blocks: [blockWithMention], onSaveBlock });
|
||||||
|
|
||||||
const textarea = page.getByRole('textbox').first();
|
// type() focuses the element (cursor at position 0) then inserts without replacing the
|
||||||
await textarea.fill('Hallo @Auguste Raddatz');
|
// existing mention node. Fake timers interfere with keyboard CDP so use real timers
|
||||||
|
// + vi.waitFor to catch the 1500 ms debounce.
|
||||||
|
await userEvent.type(page.getByRole('textbox').first(), 'Hallo ');
|
||||||
|
|
||||||
vi.advanceTimersByTime(1500);
|
await vi.waitFor(
|
||||||
await vi.runAllTimersAsync();
|
() =>
|
||||||
|
expect(onSaveBlock).toHaveBeenCalledWith('b1', 'Hallo @Auguste Raddatz', [
|
||||||
expect(onSaveBlock).toHaveBeenCalledWith('b1', 'Hallo @Auguste Raddatz', [
|
{ personId: 'p-aug', displayName: 'Auguste Raddatz' }
|
||||||
{ personId: 'p-aug', displayName: 'Auguste Raddatz' }
|
]),
|
||||||
]);
|
{ timeout: 3000 }
|
||||||
vi.useRealTimers();
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('resets debounce timer on rapid successive changes', async () => {
|
it('resets debounce timer on rapid successive changes', async () => {
|
||||||
@@ -238,8 +242,9 @@ describe('TranscriptionEditView — flush on blur', () => {
|
|||||||
const textarea = page.getByRole('textbox').first();
|
const textarea = page.getByRole('textbox').first();
|
||||||
await textarea.fill('Blur text');
|
await textarea.fill('Blur text');
|
||||||
|
|
||||||
// Blur before 1500ms debounce fires — locator.blur() not available, use native DOM
|
// Blur before 1500ms debounce fires — locator.blur() not available, use native DOM.
|
||||||
const el = document.querySelector('textarea') as HTMLTextAreaElement;
|
// PersonMentionEditor uses a contenteditable div (role=textbox), not a <textarea>.
|
||||||
|
const el = document.querySelector('[role="textbox"]') as HTMLElement;
|
||||||
el.dispatchEvent(new FocusEvent('blur', { bubbles: true }));
|
el.dispatchEvent(new FocusEvent('blur', { bubbles: true }));
|
||||||
|
|
||||||
await vi.runAllTimersAsync();
|
await vi.runAllTimersAsync();
|
||||||
@@ -335,7 +340,12 @@ describe('TranscriptionEditView — mark all reviewed', () => {
|
|||||||
onMarkAllReviewed
|
onMarkAllReviewed
|
||||||
});
|
});
|
||||||
|
|
||||||
await page.getByRole('button', { name: /Alle als fertig markieren/ }).click();
|
// userEvent.click() via Playwright CDP doesn't reliably trigger Svelte 5 onclick
|
||||||
|
// handlers when a TipTap editor is mounted in the same component tree.
|
||||||
|
const btn = (await page
|
||||||
|
.getByRole('button', { name: /Alle als fertig markieren/ })
|
||||||
|
.element()) as HTMLButtonElement;
|
||||||
|
btn.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true }));
|
||||||
await vi.waitFor(() => expect(onMarkAllReviewed).toHaveBeenCalledTimes(1));
|
await vi.waitFor(() => expect(onMarkAllReviewed).toHaveBeenCalledTimes(1));
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -349,9 +359,14 @@ describe('TranscriptionEditView — mark all reviewed', () => {
|
|||||||
onMarkAllReviewed
|
onMarkAllReviewed
|
||||||
});
|
});
|
||||||
|
|
||||||
const btn = page.getByRole('button', { name: /Alle als fertig markieren/ });
|
// Same CDP click workaround: dispatch from browser JS to reliably fire Svelte 5 onclick
|
||||||
await btn.click();
|
const btnEl = (await page
|
||||||
await expect.element(btn).toBeDisabled();
|
.getByRole('button', { name: /Alle als fertig markieren/ })
|
||||||
|
.element()) as HTMLButtonElement;
|
||||||
|
btnEl.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true }));
|
||||||
|
await expect
|
||||||
|
.element(page.getByRole('button', { name: /Alle als fertig markieren/ }))
|
||||||
|
.toBeDisabled();
|
||||||
resolveMarkAll();
|
resolveMarkAll();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -53,7 +53,12 @@ describe('GeschichteEditor — title-required guard', () => {
|
|||||||
render(GeschichteEditor, { onSubmit });
|
render(GeschichteEditor, { onSubmit });
|
||||||
|
|
||||||
await userEvent.click(page.getByPlaceholder('Titel der Geschichte'));
|
await userEvent.click(page.getByPlaceholder('Titel der Geschichte'));
|
||||||
await userEvent.tab(); // blur
|
// userEvent.tab() / keyboard('{Tab}') do not reliably fire the blur event on
|
||||||
|
// inputs inside Playwright's test iframe. .blur() is a no-op when the element
|
||||||
|
// has lost focus to TipTap's onMount initialisation. Dispatching the FocusEvent
|
||||||
|
// directly fires Svelte's onblur listener regardless of the current focus owner.
|
||||||
|
const input = await page.getByPlaceholder('Titel der Geschichte').element();
|
||||||
|
input.dispatchEvent(new FocusEvent('blur'));
|
||||||
await expect.element(page.getByText('Bitte gib einen Titel ein.')).toBeInTheDocument();
|
await expect.element(page.getByText('Bitte gib einen Titel ein.')).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -111,8 +116,23 @@ describe('GeschichteEditor — onSubmit payload', () => {
|
|||||||
const onSubmit = vi.fn().mockResolvedValue(undefined);
|
const onSubmit = vi.fn().mockResolvedValue(undefined);
|
||||||
render(GeschichteEditor, { onSubmit });
|
render(GeschichteEditor, { onSubmit });
|
||||||
|
|
||||||
await userEvent.fill(page.getByPlaceholder('Titel der Geschichte'), ' My title ');
|
// userEvent.fill() with trailing whitespace does not fire the input event chain
|
||||||
await userEvent.click(page.getByRole('button', { name: 'Entwurf speichern' }));
|
// that Svelte's bind:value requires (CDP limitation). Setting .value directly
|
||||||
|
// and dispatching an input event works around this while preserving the trailing
|
||||||
|
// space needed to verify the trim() contract.
|
||||||
|
const input = (await page
|
||||||
|
.getByPlaceholder('Titel der Geschichte')
|
||||||
|
.element()) as HTMLInputElement;
|
||||||
|
input.value = 'My title ';
|
||||||
|
input.dispatchEvent(new Event('input', { bubbles: true }));
|
||||||
|
|
||||||
|
// userEvent.click() via Playwright CDP does not reliably trigger Svelte 5 onclick
|
||||||
|
// handlers when a TipTap editor is mounted in the same component. Dispatching
|
||||||
|
// the MouseEvent directly from the browser JS context bypasses this issue.
|
||||||
|
const btn = (await page
|
||||||
|
.getByRole('button', { name: 'Entwurf speichern' })
|
||||||
|
.element()) as HTMLButtonElement;
|
||||||
|
btn.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true }));
|
||||||
|
|
||||||
expect(onSubmit).toHaveBeenCalledTimes(1);
|
expect(onSubmit).toHaveBeenCalledTimes(1);
|
||||||
const payload = onSubmit.mock.calls[0][0];
|
const payload = onSubmit.mock.calls[0][0];
|
||||||
@@ -125,7 +145,10 @@ describe('GeschichteEditor — onSubmit payload', () => {
|
|||||||
render(GeschichteEditor, { onSubmit });
|
render(GeschichteEditor, { onSubmit });
|
||||||
|
|
||||||
await userEvent.fill(page.getByPlaceholder('Titel der Geschichte'), 'Story');
|
await userEvent.fill(page.getByPlaceholder('Titel der Geschichte'), 'Story');
|
||||||
await userEvent.click(page.getByRole('button', { name: 'Veröffentlichen' }));
|
const btn = (await page
|
||||||
|
.getByRole('button', { name: 'Veröffentlichen' })
|
||||||
|
.element()) as HTMLButtonElement;
|
||||||
|
btn.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true }));
|
||||||
|
|
||||||
expect(onSubmit).toHaveBeenCalledTimes(1);
|
expect(onSubmit).toHaveBeenCalledTimes(1);
|
||||||
expect(onSubmit.mock.calls[0][0].status).toBe('PUBLISHED');
|
expect(onSubmit.mock.calls[0][0].status).toBe('PUBLISHED');
|
||||||
@@ -140,7 +163,10 @@ describe('GeschichteEditor — onSubmit payload', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await userEvent.fill(page.getByPlaceholder('Titel der Geschichte'), 'Story');
|
await userEvent.fill(page.getByPlaceholder('Titel der Geschichte'), 'Story');
|
||||||
await userEvent.click(page.getByRole('button', { name: 'Entwurf speichern' }));
|
const btn = (await page
|
||||||
|
.getByRole('button', { name: 'Entwurf speichern' })
|
||||||
|
.element()) as HTMLButtonElement;
|
||||||
|
btn.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true }));
|
||||||
|
|
||||||
expect(onSubmit).toHaveBeenCalledTimes(1);
|
expect(onSubmit).toHaveBeenCalledTimes(1);
|
||||||
const payload = onSubmit.mock.calls[0][0];
|
const payload = onSubmit.mock.calls[0][0];
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ describe('PersonMultiSelect – selecting persons', () => {
|
|||||||
const input = page.getByRole('textbox');
|
const input = page.getByRole('textbox');
|
||||||
await input.fill('Mu');
|
await input.fill('Mu');
|
||||||
await waitForDebounce();
|
await waitForDebounce();
|
||||||
await page.getByText('Max Mustermann').click();
|
((await page.getByRole('button', { name: 'Max Mustermann' }).element()) as HTMLElement).click();
|
||||||
await expect.element(page.getByText('Max Mustermann')).toBeInTheDocument();
|
await expect.element(page.getByText('Max Mustermann')).toBeInTheDocument();
|
||||||
await expect.element(input).toHaveValue('');
|
await expect.element(input).toHaveValue('');
|
||||||
await page.screenshot({
|
await page.screenshot({
|
||||||
@@ -158,11 +158,13 @@ describe('PersonMultiSelect – selecting persons', () => {
|
|||||||
|
|
||||||
await input.fill('Mu');
|
await input.fill('Mu');
|
||||||
await waitForDebounce();
|
await waitForDebounce();
|
||||||
await page.getByText('Max Mustermann').click();
|
((await page.getByRole('button', { name: 'Max Mustermann' }).element()) as HTMLElement).click();
|
||||||
|
|
||||||
await input.fill('Mu');
|
await input.fill('Mu');
|
||||||
await waitForDebounce();
|
await waitForDebounce();
|
||||||
await page.getByText('Anna Musterfrau').click();
|
(
|
||||||
|
(await page.getByRole('button', { name: 'Anna Musterfrau' }).element()) as HTMLElement
|
||||||
|
).click();
|
||||||
|
|
||||||
await expect.element(page.getByText('Max Mustermann')).toBeInTheDocument();
|
await expect.element(page.getByText('Max Mustermann')).toBeInTheDocument();
|
||||||
await expect.element(page.getByText('Anna Musterfrau')).toBeInTheDocument();
|
await expect.element(page.getByText('Anna Musterfrau')).toBeInTheDocument();
|
||||||
@@ -210,7 +212,13 @@ describe('PersonMultiSelect – selecting persons', () => {
|
|||||||
const input = page.getByRole('textbox');
|
const input = page.getByRole('textbox');
|
||||||
await input.fill('Ma');
|
await input.fill('Ma');
|
||||||
await waitForDebounce();
|
await waitForDebounce();
|
||||||
await page.getByText('Max Mustermann').click();
|
const resultEl = (await page
|
||||||
|
.getByRole('button', { name: 'Max Mustermann' })
|
||||||
|
.element()) as HTMLElement;
|
||||||
|
resultEl.dispatchEvent(
|
||||||
|
new KeyboardEvent('keydown', { key: 'Enter', bubbles: true, cancelable: true })
|
||||||
|
);
|
||||||
|
await tick();
|
||||||
await expect.element(page.getByText('Max Mustermann')).toBeInTheDocument();
|
await expect.element(page.getByText('Max Mustermann')).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -240,8 +248,11 @@ describe('PersonMultiSelect – removing persons', () => {
|
|||||||
]
|
]
|
||||||
});
|
});
|
||||||
// Buttons have aria-label="Entfernen"
|
// Buttons have aria-label="Entfernen"
|
||||||
const removeButtons = page.getByRole('button', { name: 'Entfernen' });
|
const removeBtn = (await page
|
||||||
await removeButtons.first().click();
|
.getByRole('button', { name: 'Entfernen' })
|
||||||
|
.first()
|
||||||
|
.element()) as HTMLElement;
|
||||||
|
removeBtn.click();
|
||||||
await expect.element(page.getByText('Max Mustermann')).not.toBeInTheDocument();
|
await expect.element(page.getByText('Max Mustermann')).not.toBeInTheDocument();
|
||||||
await expect.element(page.getByText('Anna Musterfrau')).toBeInTheDocument();
|
await expect.element(page.getByText('Anna Musterfrau')).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
@@ -267,7 +278,9 @@ describe('PersonMultiSelect – removing persons', () => {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
await page.getByRole('button', { name: 'Entfernen' }).first().click();
|
(
|
||||||
|
(await page.getByRole('button', { name: 'Entfernen' }).first().element()) as HTMLElement
|
||||||
|
).click();
|
||||||
await tick();
|
await tick();
|
||||||
const inputs = receiverInputs();
|
const inputs = receiverInputs();
|
||||||
expect(inputs).toHaveLength(1);
|
expect(inputs).toHaveLength(1);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { describe, expect, it, vi, afterEach } from 'vitest';
|
import { describe, expect, it, vi, afterEach } from 'vitest';
|
||||||
import { cleanup, render } from 'vitest-browser-svelte';
|
import { cleanup, render } from 'vitest-browser-svelte';
|
||||||
import { page, userEvent } from 'vitest/browser';
|
import { page } from 'vitest/browser';
|
||||||
import PersonTypeahead from './PersonTypeahead.svelte';
|
import PersonTypeahead from './PersonTypeahead.svelte';
|
||||||
|
|
||||||
const waitForDebounce = () => new Promise((r) => setTimeout(r, 350));
|
const waitForDebounce = () => new Promise((r) => setTimeout(r, 350));
|
||||||
@@ -346,6 +346,14 @@ describe('PersonTypeahead – ARIA roles', () => {
|
|||||||
|
|
||||||
// ─── Keyboard navigation ──────────────────────────────────────────────────────
|
// ─── Keyboard navigation ──────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
// CDP-based userEvent.keyboard does not reliably trigger Svelte 5 onkeydown
|
||||||
|
// handlers. Dispatch native KeyboardEvent directly on the DOM element instead.
|
||||||
|
async function pressKey(input: ReturnType<typeof page.getByPlaceholder>, key: string) {
|
||||||
|
const el = (await input.element()) as HTMLInputElement;
|
||||||
|
el.dispatchEvent(new KeyboardEvent('keydown', { key, bubbles: true, cancelable: true }));
|
||||||
|
await tick();
|
||||||
|
}
|
||||||
|
|
||||||
describe('PersonTypeahead – keyboard navigation', () => {
|
describe('PersonTypeahead – keyboard navigation', () => {
|
||||||
it('ArrowDown moves highlight to the first option', async () => {
|
it('ArrowDown moves highlight to the first option', async () => {
|
||||||
mockFetchWithPersons();
|
mockFetchWithPersons();
|
||||||
@@ -354,9 +362,7 @@ describe('PersonTypeahead – keyboard navigation', () => {
|
|||||||
await input.fill('Mu');
|
await input.fill('Mu');
|
||||||
await waitForDebounce();
|
await waitForDebounce();
|
||||||
|
|
||||||
await input.click();
|
await pressKey(input, 'ArrowDown');
|
||||||
await userEvent.keyboard('{ArrowDown}');
|
|
||||||
await tick();
|
|
||||||
|
|
||||||
// First option should be highlighted (aria-selected="true")
|
// First option should be highlighted (aria-selected="true")
|
||||||
const firstOption = page.getByRole('option', { name: 'Max Mustermann' });
|
const firstOption = page.getByRole('option', { name: 'Max Mustermann' });
|
||||||
@@ -370,11 +376,8 @@ describe('PersonTypeahead – keyboard navigation', () => {
|
|||||||
await input.fill('Mu');
|
await input.fill('Mu');
|
||||||
await waitForDebounce();
|
await waitForDebounce();
|
||||||
|
|
||||||
await input.click();
|
await pressKey(input, 'ArrowDown');
|
||||||
await userEvent.keyboard('{ArrowDown}');
|
await pressKey(input, 'ArrowDown');
|
||||||
await tick();
|
|
||||||
await userEvent.keyboard('{ArrowDown}');
|
|
||||||
await tick();
|
|
||||||
|
|
||||||
const secondOption = page.getByRole('option', { name: 'Anna Musterfrau' });
|
const secondOption = page.getByRole('option', { name: 'Anna Musterfrau' });
|
||||||
await expect.element(secondOption).toHaveAttribute('aria-selected', 'true');
|
await expect.element(secondOption).toHaveAttribute('aria-selected', 'true');
|
||||||
@@ -387,11 +390,8 @@ describe('PersonTypeahead – keyboard navigation', () => {
|
|||||||
await input.fill('Mu');
|
await input.fill('Mu');
|
||||||
await waitForDebounce();
|
await waitForDebounce();
|
||||||
|
|
||||||
await input.click();
|
await pressKey(input, 'ArrowDown'); // highlight first
|
||||||
await userEvent.keyboard('{ArrowDown}'); // highlight first
|
await pressKey(input, 'ArrowUp'); // wrap to last
|
||||||
await tick();
|
|
||||||
await userEvent.keyboard('{ArrowUp}'); // wrap to last
|
|
||||||
await tick();
|
|
||||||
|
|
||||||
const lastOption = page.getByRole('option', { name: 'Anna Musterfrau' });
|
const lastOption = page.getByRole('option', { name: 'Anna Musterfrau' });
|
||||||
await expect.element(lastOption).toHaveAttribute('aria-selected', 'true');
|
await expect.element(lastOption).toHaveAttribute('aria-selected', 'true');
|
||||||
@@ -404,13 +404,9 @@ describe('PersonTypeahead – keyboard navigation', () => {
|
|||||||
await input.fill('Mu');
|
await input.fill('Mu');
|
||||||
await waitForDebounce();
|
await waitForDebounce();
|
||||||
|
|
||||||
await input.click();
|
await pressKey(input, 'ArrowDown'); // highlight first (index 0)
|
||||||
await userEvent.keyboard('{ArrowDown}'); // highlight first (index 0)
|
await pressKey(input, 'ArrowDown'); // highlight second (index 1 = last)
|
||||||
await tick();
|
await pressKey(input, 'ArrowDown'); // wrap to first (index 0)
|
||||||
await userEvent.keyboard('{ArrowDown}'); // highlight second (index 1 = last)
|
|
||||||
await tick();
|
|
||||||
await userEvent.keyboard('{ArrowDown}'); // wrap to first (index 0)
|
|
||||||
await tick();
|
|
||||||
|
|
||||||
const firstOption = page.getByRole('option', { name: 'Max Mustermann' });
|
const firstOption = page.getByRole('option', { name: 'Max Mustermann' });
|
||||||
await expect.element(firstOption).toHaveAttribute('aria-selected', 'true');
|
await expect.element(firstOption).toHaveAttribute('aria-selected', 'true');
|
||||||
@@ -431,11 +427,8 @@ describe('PersonTypeahead – keyboard navigation', () => {
|
|||||||
await input.fill('Ma');
|
await input.fill('Ma');
|
||||||
await waitForDebounce();
|
await waitForDebounce();
|
||||||
|
|
||||||
await input.click();
|
await pressKey(input, 'ArrowDown');
|
||||||
await userEvent.keyboard('{ArrowDown}');
|
await pressKey(input, 'Enter');
|
||||||
await tick();
|
|
||||||
await userEvent.keyboard('{Enter}');
|
|
||||||
await tick();
|
|
||||||
|
|
||||||
await expect.element(input).toHaveValue('Max Mustermann');
|
await expect.element(input).toHaveValue('Max Mustermann');
|
||||||
await expect.element(page.getByRole('listbox')).not.toBeInTheDocument();
|
await expect.element(page.getByRole('listbox')).not.toBeInTheDocument();
|
||||||
@@ -449,9 +442,8 @@ describe('PersonTypeahead – keyboard navigation', () => {
|
|||||||
await waitForDebounce();
|
await waitForDebounce();
|
||||||
await expect.element(page.getByRole('listbox')).toBeInTheDocument();
|
await expect.element(page.getByRole('listbox')).toBeInTheDocument();
|
||||||
|
|
||||||
await input.click();
|
await pressKey(input, 'Escape');
|
||||||
await userEvent.keyboard('{Escape}');
|
|
||||||
await tick();
|
|
||||||
await expect.element(page.getByRole('listbox')).not.toBeInTheDocument();
|
await expect.element(page.getByRole('listbox')).not.toBeInTheDocument();
|
||||||
// Value unchanged — nothing was selected
|
// Value unchanged — nothing was selected
|
||||||
await expect.element(input).toHaveValue('Mu');
|
await expect.element(input).toHaveValue('Mu');
|
||||||
@@ -468,9 +460,7 @@ describe('PersonTypeahead – keyboard navigation', () => {
|
|||||||
const beforeNav = await input.element().getAttribute('aria-activedescendant');
|
const beforeNav = await input.element().getAttribute('aria-activedescendant');
|
||||||
expect(beforeNav).toBeFalsy();
|
expect(beforeNav).toBeFalsy();
|
||||||
|
|
||||||
await input.click();
|
await pressKey(input, 'ArrowDown');
|
||||||
await userEvent.keyboard('{ArrowDown}');
|
|
||||||
await tick();
|
|
||||||
|
|
||||||
const afterNav = await input.element().getAttribute('aria-activedescendant');
|
const afterNav = await input.element().getAttribute('aria-activedescendant');
|
||||||
expect(afterNav).toBeTruthy();
|
expect(afterNav).toBeTruthy();
|
||||||
|
|||||||
@@ -174,7 +174,14 @@ describe('PersonMentionEditor — AC-1: typed text as displayName', () => {
|
|||||||
await expect.element(page.getByRole('option', { name: /Auguste Raddatz/ })).toBeVisible();
|
await expect.element(page.getByRole('option', { name: /Auguste Raddatz/ })).toBeVisible();
|
||||||
});
|
});
|
||||||
|
|
||||||
await userEvent.click(page.getByRole('option', { name: /Auguste Raddatz/ }));
|
// MentionDropdown handles selection via onmousedown (not onclick) to prevent
|
||||||
|
// blurring the editor before the selection fires. userEvent.click() via CDP
|
||||||
|
// does not reliably trigger Svelte 5's onmousedown handler when TipTap is
|
||||||
|
// mounted — dispatch the MouseEvent directly from browser JS instead.
|
||||||
|
const option = (await page
|
||||||
|
.getByRole('option', { name: /Auguste Raddatz/ })
|
||||||
|
.element()) as HTMLElement;
|
||||||
|
option.dispatchEvent(new MouseEvent('mousedown', { bubbles: true, cancelable: true }));
|
||||||
|
|
||||||
await vi.waitFor(() => {
|
await vi.waitFor(() => {
|
||||||
expect(host.snapshot.mentionedPersons).toHaveLength(1);
|
expect(host.snapshot.mentionedPersons).toHaveLength(1);
|
||||||
@@ -212,7 +219,10 @@ describe('PersonMentionEditor — AC-1: typed text as displayName', () => {
|
|||||||
await expect.element(page.getByRole('option', { name: /Auguste Raddatz/ })).toBeVisible();
|
await expect.element(page.getByRole('option', { name: /Auguste Raddatz/ })).toBeVisible();
|
||||||
});
|
});
|
||||||
|
|
||||||
await userEvent.click(page.getByRole('option', { name: /Auguste Raddatz/ }));
|
const option = (await page
|
||||||
|
.getByRole('option', { name: /Auguste Raddatz/ })
|
||||||
|
.element()) as HTMLElement;
|
||||||
|
option.dispatchEvent(new MouseEvent('mousedown', { bubbles: true, cancelable: true }));
|
||||||
|
|
||||||
await vi.waitFor(() => {
|
await vi.waitFor(() => {
|
||||||
expect(host.snapshot.mentionedPersons).toEqual([{ personId: 'p-aug', displayName: 'Aug' }]);
|
expect(host.snapshot.mentionedPersons).toEqual([{ personId: 'p-aug', displayName: 'Aug' }]);
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ const defaultProps = {
|
|||||||
icon: '✍',
|
icon: '✍',
|
||||||
title: 'Unleserliche Wörter',
|
title: 'Unleserliche Wörter',
|
||||||
body: 'Schreiben Sie [unleserlich].',
|
body: 'Schreiben Sie [unleserlich].',
|
||||||
|
// beispielInput is required for the → arrow to render (component: {#if beispielInput !== undefined})
|
||||||
|
beispielInput: '[Original]',
|
||||||
beispielOutput: '[unleserlich]'
|
beispielOutput: '[unleserlich]'
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -34,9 +36,12 @@ describe('RichtlinienRuleCard', () => {
|
|||||||
|
|
||||||
it('renders beispielOutput in monospace with → arrow', async () => {
|
it('renders beispielOutput in monospace with → arrow', async () => {
|
||||||
render(RichtlinienRuleCard, { props: defaultProps });
|
render(RichtlinienRuleCard, { props: defaultProps });
|
||||||
const mono = document.querySelector('code, [class*="font-mono"]');
|
// With both beispielInput and beispielOutput, the component renders two code elements:
|
||||||
expect(mono).not.toBeNull();
|
// [Input] → [Output]. querySelectorAll gets both; last one is the output.
|
||||||
expect(mono!.textContent).toContain('[unleserlich]');
|
const codes = document.querySelectorAll('code, [class*="font-mono"]');
|
||||||
|
expect(codes.length).toBeGreaterThanOrEqual(1);
|
||||||
|
const outputCode = codes[codes.length - 1];
|
||||||
|
expect(outputCode.textContent).toContain('[unleserlich]');
|
||||||
await expect.element(page.getByText(/→/)).toBeInTheDocument();
|
await expect.element(page.getByText(/→/)).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -369,8 +369,7 @@ describe('TagInput – onTextInput callback', () => {
|
|||||||
const input = page.getByRole('textbox');
|
const input = page.getByRole('textbox');
|
||||||
await input.fill('Ka');
|
await input.fill('Ka');
|
||||||
await waitForFetch();
|
await waitForFetch();
|
||||||
const option = page.getByRole('option', { name: 'Kaufvertrag' });
|
((await page.getByRole('option', { name: 'Kaufvertrag' }).element()) as HTMLElement).click();
|
||||||
await option.click();
|
|
||||||
await expect.poll(() => onTextInput.mock.calls.at(-1)).toEqual(['']);
|
await expect.poll(() => onTextInput.mock.calls.at(-1)).toEqual(['']);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -13,12 +13,14 @@ let {
|
|||||||
items,
|
items,
|
||||||
canWrite,
|
canWrite,
|
||||||
error,
|
error,
|
||||||
|
total = 0,
|
||||||
q = '',
|
q = '',
|
||||||
sort = 'DATE'
|
sort = 'DATE'
|
||||||
}: {
|
}: {
|
||||||
items: DocumentSearchItem[];
|
items: DocumentSearchItem[];
|
||||||
canWrite: boolean;
|
canWrite: boolean;
|
||||||
error?: string | null;
|
error?: string | null;
|
||||||
|
total?: number;
|
||||||
q?: string;
|
q?: string;
|
||||||
sort?: SortMode;
|
sort?: SortMode;
|
||||||
} = $props();
|
} = $props();
|
||||||
@@ -77,6 +79,10 @@ function groupByReceiver(docItems: DocumentSearchItem[]) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{:else if items.length > 0}
|
{:else if items.length > 0}
|
||||||
|
<!-- RESULT COUNT -->
|
||||||
|
{#if total > 0}
|
||||||
|
<p class="mb-2 text-sm text-ink-2">{total} Dokumente</p>
|
||||||
|
{/if}
|
||||||
<!-- GROUP CARDS -->
|
<!-- GROUP CARDS -->
|
||||||
{#each groups as group (group.label)}
|
{#each groups as group (group.label)}
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -26,8 +26,7 @@ export async function load({ fetch, locals }) {
|
|||||||
const api = createApiClient(fetch);
|
const api = createApiClient(fetch);
|
||||||
const canManageUsers = hasPerm(user, 'ADMIN_USER');
|
const canManageUsers = hasPerm(user, 'ADMIN_USER');
|
||||||
|
|
||||||
// TODO: replace with a dedicated /api/admin/stats endpoint that returns counts only,
|
// TODO(#453): replace with dedicated /api/admin/stats endpoint returning counts only
|
||||||
// so the System page does not load full entity lists it does not render.
|
|
||||||
const [usersResult, groupsResult, tagsResult] = await Promise.all([
|
const [usersResult, groupsResult, tagsResult] = await Promise.all([
|
||||||
api.GET('/api/users'),
|
api.GET('/api/users'),
|
||||||
api.GET('/api/groups'),
|
api.GET('/api/groups'),
|
||||||
|
|||||||
@@ -134,7 +134,13 @@ describe('EntityNavSection — flyout variant', () => {
|
|||||||
called = true;
|
called = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
document.querySelector<HTMLAnchorElement>('a[href="/admin/users"]')!.click();
|
const link = document.querySelector<HTMLAnchorElement>('a[href="/admin/users"]')!;
|
||||||
|
// Prevent the browser from navigating the test iframe to /admin/users (which
|
||||||
|
// would redirect to /login and kill the iframe connection). preventDefault()
|
||||||
|
// on the capture phase suppresses navigation while still letting the Svelte
|
||||||
|
// onclick handler (onFlyoutClick) run on the bubbling phase.
|
||||||
|
link.addEventListener('click', (e) => e.preventDefault(), { capture: true, once: true });
|
||||||
|
link.click();
|
||||||
expect(called).toBe(true);
|
expect(called).toBe(true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -76,7 +76,13 @@ describe('EntityNav — flyout', () => {
|
|||||||
document.querySelector<HTMLButtonElement>('[data-flyout-trigger]')!.click();
|
document.querySelector<HTMLButtonElement>('[data-flyout-trigger]')!.click();
|
||||||
await expect.element(page.getByRole('dialog')).toBeInTheDocument();
|
await expect.element(page.getByRole('dialog')).toBeInTheDocument();
|
||||||
const dialog = document.querySelector('[role="dialog"]')!;
|
const dialog = document.querySelector('[role="dialog"]')!;
|
||||||
dialog.querySelector<HTMLAnchorElement>('a[href^="/admin/"]')!.click();
|
const link = dialog.querySelector<HTMLAnchorElement>('a[href^="/admin/"]')!;
|
||||||
|
// Prevent the browser from navigating the test iframe to /admin/... (which
|
||||||
|
// would redirect to /login and kill the iframe connection). preventDefault()
|
||||||
|
// on the capture phase suppresses navigation while still letting the Svelte
|
||||||
|
// onclick handler (closeFlyout) run on the bubbling phase.
|
||||||
|
link.addEventListener('click', (e) => e.preventDefault(), { capture: true, once: true });
|
||||||
|
link.click();
|
||||||
await expect.element(page.getByRole('dialog')).not.toBeInTheDocument();
|
await expect.element(page.getByRole('dialog')).not.toBeInTheDocument();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,7 +4,10 @@ import { page } from 'vitest/browser';
|
|||||||
import Page from './+page.svelte';
|
import Page from './+page.svelte';
|
||||||
|
|
||||||
afterEach(cleanup);
|
afterEach(cleanup);
|
||||||
afterEach(() => vi.restoreAllMocks());
|
afterEach(() => {
|
||||||
|
vi.restoreAllMocks();
|
||||||
|
vi.unstubAllGlobals();
|
||||||
|
});
|
||||||
|
|
||||||
describe('Admin system page', () => {
|
describe('Admin system page', () => {
|
||||||
it('renders the backfill versions heading', async () => {
|
it('renders the backfill versions heading', async () => {
|
||||||
@@ -52,7 +55,9 @@ describe('Admin system page — mass import card', () => {
|
|||||||
|
|
||||||
it('renders the mass import heading', async () => {
|
it('renders the mass import heading', async () => {
|
||||||
render(Page, {});
|
render(Page, {});
|
||||||
await expect.element(page.getByText(/Massenimport/i)).toBeInTheDocument();
|
// getByText(/Massenimport/i) would match both the H2 heading AND the thumbnail
|
||||||
|
// description paragraph that mentions "Massenimport" — use heading role instead.
|
||||||
|
await expect.element(page.getByRole('heading', { name: /Massenimport/i })).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('renders the start import button when idle', async () => {
|
it('renders the start import button when idle', async () => {
|
||||||
@@ -66,9 +71,11 @@ describe('Admin system page — mass import card', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('disables the start button and shows running state after click', async () => {
|
it('disables the start button and shows running state after click', async () => {
|
||||||
|
// $effect calls fetchImportStatus() then fetchThumbnailStatus() on mount —
|
||||||
|
// the mock must cover both before the POST trigger call.
|
||||||
const fetchMock = vi
|
const fetchMock = vi
|
||||||
.fn()
|
.fn()
|
||||||
// initial status fetch → IDLE
|
// call 1: fetchImportStatus() on mount → IDLE
|
||||||
.mockResolvedValueOnce({
|
.mockResolvedValueOnce({
|
||||||
ok: true,
|
ok: true,
|
||||||
json: async () => ({
|
json: async () => ({
|
||||||
@@ -78,7 +85,20 @@ describe('Admin system page — mass import card', () => {
|
|||||||
startedAt: null
|
startedAt: null
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
// trigger POST → returns RUNNING immediately
|
// call 2: fetchThumbnailStatus() on mount → IDLE (prevent thumbnail polling)
|
||||||
|
.mockResolvedValueOnce({
|
||||||
|
ok: true,
|
||||||
|
json: async () => ({
|
||||||
|
state: 'IDLE',
|
||||||
|
message: '',
|
||||||
|
total: 0,
|
||||||
|
processed: 0,
|
||||||
|
skipped: 0,
|
||||||
|
failed: 0,
|
||||||
|
startedAt: null
|
||||||
|
})
|
||||||
|
})
|
||||||
|
// call 3: trigger POST → returns RUNNING
|
||||||
.mockResolvedValueOnce({
|
.mockResolvedValueOnce({
|
||||||
ok: true,
|
ok: true,
|
||||||
json: async () => ({
|
json: async () => ({
|
||||||
@@ -99,17 +119,33 @@ describe('Admin system page — mass import card', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('shows done status and retry button after successful import', async () => {
|
it('shows done status and retry button after successful import', async () => {
|
||||||
|
// Use mockResolvedValueOnce per call so thumbnail gets IDLE, not DONE.
|
||||||
|
// Both cards in DONE state would render two "Erneut starten" buttons → strict mode.
|
||||||
vi.stubGlobal(
|
vi.stubGlobal(
|
||||||
'fetch',
|
'fetch',
|
||||||
vi.fn().mockResolvedValue({
|
vi
|
||||||
ok: true,
|
.fn()
|
||||||
json: async () => ({
|
.mockResolvedValueOnce({
|
||||||
state: 'DONE',
|
ok: true,
|
||||||
message: 'Import abgeschlossen.',
|
json: async () => ({
|
||||||
processed: 42,
|
state: 'DONE',
|
||||||
startedAt: '2026-01-01T10:00:00'
|
message: 'Import abgeschlossen.',
|
||||||
|
processed: 42,
|
||||||
|
startedAt: '2026-01-01T10:00:00'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.mockResolvedValueOnce({
|
||||||
|
ok: true,
|
||||||
|
json: async () => ({
|
||||||
|
state: 'IDLE',
|
||||||
|
message: '',
|
||||||
|
total: 0,
|
||||||
|
processed: 0,
|
||||||
|
skipped: 0,
|
||||||
|
failed: 0,
|
||||||
|
startedAt: null
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
|
||||||
);
|
);
|
||||||
render(Page, {});
|
render(Page, {});
|
||||||
await expect.element(page.getByText(/42 Dokumente/i)).toBeInTheDocument();
|
await expect.element(page.getByText(/42 Dokumente/i)).toBeInTheDocument();
|
||||||
@@ -117,17 +153,33 @@ describe('Admin system page — mass import card', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('shows failed status and retry button on error', async () => {
|
it('shows failed status and retry button on error', async () => {
|
||||||
|
// Use mockResolvedValueOnce so thumbnail gets IDLE, not FAILED.
|
||||||
|
// Both cards in FAILED state would render two identical error messages → strict mode.
|
||||||
vi.stubGlobal(
|
vi.stubGlobal(
|
||||||
'fetch',
|
'fetch',
|
||||||
vi.fn().mockResolvedValue({
|
vi
|
||||||
ok: true,
|
.fn()
|
||||||
json: async () => ({
|
.mockResolvedValueOnce({
|
||||||
state: 'FAILED',
|
ok: true,
|
||||||
message: 'Datei nicht gefunden.',
|
json: async () => ({
|
||||||
processed: 0,
|
state: 'FAILED',
|
||||||
startedAt: '2026-01-01T10:00:00'
|
message: 'Datei nicht gefunden.',
|
||||||
|
processed: 0,
|
||||||
|
startedAt: '2026-01-01T10:00:00'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.mockResolvedValueOnce({
|
||||||
|
ok: true,
|
||||||
|
json: async () => ({
|
||||||
|
state: 'IDLE',
|
||||||
|
message: '',
|
||||||
|
total: 0,
|
||||||
|
processed: 0,
|
||||||
|
skipped: 0,
|
||||||
|
failed: 0,
|
||||||
|
startedAt: null
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
|
||||||
);
|
);
|
||||||
render(Page, {});
|
render(Page, {});
|
||||||
await expect.element(page.getByText(/Datei nicht gefunden/i)).toBeInTheDocument();
|
await expect.element(page.getByText(/Datei nicht gefunden/i)).toBeInTheDocument();
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ describe('CorrespondenzHero — headline and cross-link', () => {
|
|||||||
|
|
||||||
it('renders a person typeahead input', async () => {
|
it('renders a person typeahead input', async () => {
|
||||||
render(CorrespondenzHero, { onSelectPerson: noop });
|
render(CorrespondenzHero, { onSelectPerson: noop });
|
||||||
await expect.element(page.getByTestId('conv-hero').getByRole('textbox')).toBeInTheDocument();
|
// PersonTypeahead renders <input role="combobox">, not role="textbox"
|
||||||
|
await expect.element(page.getByTestId('conv-hero').getByRole('combobox')).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
import { vi, describe, it, expect, afterEach } from 'vitest';
|
import { vi, describe, it, expect, afterEach } from 'vitest';
|
||||||
import { cleanup, render } from 'vitest-browser-svelte';
|
import { cleanup, render } from 'vitest-browser-svelte';
|
||||||
import { page } from 'vitest/browser';
|
import { page } from 'vitest/browser';
|
||||||
import { createConfirmService, CONFIRM_KEY } from '$lib/shared/services/confirm.svelte.js';
|
import {
|
||||||
|
createConfirmService,
|
||||||
|
CONFIRM_KEY,
|
||||||
|
type ConfirmOptions,
|
||||||
|
type ConfirmService
|
||||||
|
} from '$lib/shared/services/confirm.svelte.js';
|
||||||
import EditPage from './+page.svelte';
|
import EditPage from './+page.svelte';
|
||||||
|
|
||||||
afterEach(cleanup);
|
afterEach(cleanup);
|
||||||
@@ -32,17 +37,34 @@ describe('Edit page — delete button', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('opens a confirm dialog when the delete button is clicked', async () => {
|
it('opens a confirm dialog when the delete button is clicked', async () => {
|
||||||
const service = createConfirmService();
|
// vi.spyOn on a Svelte 5 compiled service object does not reliably track calls in
|
||||||
|
// vitest-browser mode (signal scoping), so we use a plain mock object instead.
|
||||||
|
let capturedOptions: ConfirmOptions | null = null;
|
||||||
|
let settleRef: ((value: boolean) => void) | null = null;
|
||||||
|
const mockService: ConfirmService = {
|
||||||
|
confirm(opts) {
|
||||||
|
capturedOptions = opts;
|
||||||
|
return new Promise<boolean>((resolve) => {
|
||||||
|
settleRef = resolve;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
get options(): ConfirmOptions | null {
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
settle(value) {
|
||||||
|
settleRef?.(value);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
render(EditPage, {
|
render(EditPage, {
|
||||||
props: { data: { document: makeDocument() }, form: null },
|
props: { data: { document: makeDocument() }, form: null },
|
||||||
context: new Map([[CONFIRM_KEY, service]])
|
context: new Map([[CONFIRM_KEY, mockService]])
|
||||||
});
|
});
|
||||||
|
|
||||||
await page.getByRole('button', { name: /löschen/i }).click();
|
await page.getByRole('button', { name: /löschen/i }).click();
|
||||||
// The confirm service should have received an options object (dialog is open)
|
await vi.waitFor(() => expect(capturedOptions).not.toBeNull());
|
||||||
expect(service.options).not.toBeNull();
|
expect(capturedOptions).toMatchObject({ destructive: true });
|
||||||
expect(service.options?.destructive).toBe(true);
|
settleRef?.(false);
|
||||||
service.settle(false);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('submits the delete form when the user confirms', async () => {
|
it('submits the delete form when the user confirms', async () => {
|
||||||
|
|||||||
@@ -25,9 +25,9 @@ describe('Richtlinien page — structure', () => {
|
|||||||
await expect.element(wikiLink).toHaveAttribute('target', '_blank');
|
await expect.element(wikiLink).toHaveAttribute('target', '_blank');
|
||||||
await expect.element(wikiLink).toHaveAttribute('rel', 'noopener noreferrer');
|
await expect.element(wikiLink).toHaveAttribute('rel', 'noopener noreferrer');
|
||||||
await expect.element(wikiLink).toHaveAttribute('referrerpolicy', 'no-referrer');
|
await expect.element(wikiLink).toHaveAttribute('referrerpolicy', 'no-referrer');
|
||||||
// visible annotation (not sr-only)
|
// icon communicates "opens new tab" visually; aria-label carries the text for a11y
|
||||||
const link = document.querySelector('a[href*="wikipedia"]') as HTMLAnchorElement;
|
const link = document.querySelector('a[href*="wikipedia"]') as HTMLAnchorElement;
|
||||||
expect(link.textContent).toContain('öffnet in neuem Tab');
|
expect(link.getAttribute('aria-label')).toContain('öffnet in neuem Tab');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('renders Regeln h2 section', async () => {
|
it('renders Regeln h2 section', async () => {
|
||||||
|
|||||||
@@ -1,11 +1,31 @@
|
|||||||
import { afterEach, describe, expect, it, vi } from 'vitest';
|
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||||
import { cleanup, render } from 'vitest-browser-svelte';
|
import { cleanup, render } from 'vitest-browser-svelte';
|
||||||
import { page, userEvent } from 'vitest/browser';
|
import { page, userEvent } from 'vitest/browser';
|
||||||
import { createRawSnippet } from 'svelte';
|
import { createRawSnippet } from 'svelte';
|
||||||
|
|
||||||
vi.mock('$env/static/public', () => ({ PUBLIC_NOTIFICATION_POLL_MS: '60000' }));
|
vi.mock('$env/static/public', () => ({ PUBLIC_NOTIFICATION_POLL_MS: '60000' }));
|
||||||
|
|
||||||
afterEach(cleanup);
|
// NotificationBell calls notificationStore.init() on mount, which creates an
|
||||||
|
// EventSource and immediately fetches the unread count. In the test environment
|
||||||
|
// the SSE connection fails (no backend), triggering onerror → another fetch.
|
||||||
|
// If that fetch returns 401, notifications.svelte.ts calls
|
||||||
|
// window.location.href = '/login', navigating the test iframe and breaking the
|
||||||
|
// Playwright connection. Stubbing fetch to return 200 keeps it in-check.
|
||||||
|
beforeEach(() => {
|
||||||
|
vi.stubGlobal(
|
||||||
|
'fetch',
|
||||||
|
vi.fn().mockResolvedValue({
|
||||||
|
ok: true,
|
||||||
|
status: 200,
|
||||||
|
json: vi.fn().mockResolvedValue({ count: 0, content: [] })
|
||||||
|
})
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
cleanup();
|
||||||
|
vi.unstubAllGlobals();
|
||||||
|
});
|
||||||
|
|
||||||
const emptySnippet = createRawSnippet(() => ({ render: () => '<span></span>' }));
|
const emptySnippet = createRawSnippet(() => ({ render: () => '<span></span>' }));
|
||||||
import Layout from './+layout.svelte';
|
import Layout from './+layout.svelte';
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"status": "failed",
|
|
||||||
"failedTests": [
|
|
||||||
"17e3fe6f4d9d8bd79c6b-60f085b113a677673906"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
1
node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json
generated
vendored
1071
package-lock.json
generated
@@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"devDependencies": {
|
|
||||||
"@testing-library/jest-dom": "^6.9.1",
|
|
||||||
"@testing-library/svelte": "^5.3.1",
|
|
||||||
"jsdom": "^29.0.2"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 136 KiB |
|
Before Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 154 KiB |
|
Before Width: | Height: | Size: 153 KiB |
|
Before Width: | Height: | Size: 388 KiB |
|
Before Width: | Height: | Size: 388 KiB |
|
Before Width: | Height: | Size: 335 KiB |
|
Before Width: | Height: | Size: 333 KiB |
|
Before Width: | Height: | Size: 374 KiB |
|
Before Width: | Height: | Size: 372 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 31 KiB |
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"branch": "feature/153-notification-history",
|
|
||||||
"commitSha": "edeff353931e9d625083eec983fe174c138c340d",
|
|
||||||
"startedAt": "2026-03-29T00:00:00.000Z",
|
|
||||||
"description": "Notification history page (/notifications): empty state, list view (20 items), load-more view (40 items) — 320/768/1440px, light/dark"
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"branch": "main",
|
|
||||||
"commitSha": "0797406f02698a5bf43ce3ecb17336017245f91b",
|
|
||||||
"startedAt": "2026-04-25T10:54:51.868Z",
|
|
||||||
"description": "Verify /hilfe/transkription: examples with input→output, no names in intro, Wikipedia link with icon"
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
# ProofShot Verification Report
|
|
||||||
|
|
||||||
**Date:** 2026-04-25 10:57:13
|
|
||||||
**Project:** familienarchiv
|
|
||||||
**Dev Server:** external on localhost:5173
|
|
||||||
|
|
||||||
## What Was Verified
|
|
||||||
|
|
||||||
Verify /hilfe/transkription: examples with input→output, no names in intro, Wikipedia link with icon
|
|
||||||
|
|
||||||
## Video Recording
|
|
||||||
|
|
||||||
Full session recording: [session.webm](./session.webm) (50s)
|
|
||||||
|
|
||||||
## Screenshots
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Console Errors
|
|
||||||
|
|
||||||
No console errors detected.
|
|
||||||
|
|
||||||
## Server Errors
|
|
||||||
|
|
||||||
No server errors detected.
|
|
||||||
|
|
||||||
## Environment
|
|
||||||
- Browser: Chromium (headless)
|
|
||||||
- Viewport: 1280x720
|
|
||||||
- Duration: 50 seconds
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
[debug] [vite] connecting...
|
|
||||||
[debug] [vite] connected.
|
|
||||||
[debug] [vite] connecting...
|
|
||||||
[debug] [vite] connected.
|
|
||||||
[debug] [vite] connecting...
|
|
||||||
[debug] [vite] connected.
|
|
||||||
[debug] [vite] connecting...
|
|
||||||
[debug] [vite] connected.
|
|
||||||
[debug] [vite] connecting...
|
|
||||||
[debug] [vite] connected.
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"branch": "main",
|
|
||||||
"commitSha": "0797406f02698a5bf43ce3ecb17336017245f91b",
|
|
||||||
"startedAt": "2026-04-25T10:56:18.954Z",
|
|
||||||
"description": "Verify /hilfe/transkription: examples with input→output, no names in intro, Wikipedia link with icon"
|
|
||||||
}
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"action": "open http://localhost:5173/hilfe/transkription",
|
|
||||||
"relativeTimeSec": 3.1,
|
|
||||||
"timestamp": "2026-04-25T10:56:25.098Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"action": "screenshot step-full-page.png",
|
|
||||||
"relativeTimeSec": 3.5,
|
|
||||||
"timestamp": "2026-04-25T10:56:25.511Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"action": "snapshot -i",
|
|
||||||
"relativeTimeSec": 7.5,
|
|
||||||
"timestamp": "2026-04-25T10:56:29.579Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"action": "fill @e6 admin@familyarchive.local",
|
|
||||||
"relativeTimeSec": 21.4,
|
|
||||||
"timestamp": "2026-04-25T10:56:43.431Z",
|
|
||||||
"element": {
|
|
||||||
"label": "E-Mail-Adresse",
|
|
||||||
"bbox": {
|
|
||||||
"x": 481,
|
|
||||||
"y": 314,
|
|
||||||
"width": 318,
|
|
||||||
"height": 42
|
|
||||||
},
|
|
||||||
"viewport": {
|
|
||||||
"width": 1280,
|
|
||||||
"height": 720
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"action": "fill @e7 admin123",
|
|
||||||
"relativeTimeSec": 22.2,
|
|
||||||
"timestamp": "2026-04-25T10:56:44.231Z",
|
|
||||||
"element": {
|
|
||||||
"label": "Passwort",
|
|
||||||
"bbox": {
|
|
||||||
"x": 481,
|
|
||||||
"y": 398,
|
|
||||||
"width": 318,
|
|
||||||
"height": 42
|
|
||||||
},
|
|
||||||
"viewport": {
|
|
||||||
"width": 1280,
|
|
||||||
"height": 720
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"action": "click @e8",
|
|
||||||
"relativeTimeSec": 23.3,
|
|
||||||
"timestamp": "2026-04-25T10:56:45.379Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"action": "open http://localhost:5173/hilfe/transkription",
|
|
||||||
"relativeTimeSec": 30.4,
|
|
||||||
"timestamp": "2026-04-25T10:56:52.485Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"action": "screenshot step-page-top.png",
|
|
||||||
"relativeTimeSec": 31.5,
|
|
||||||
"timestamp": "2026-04-25T10:56:53.525Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"action": "snapshot",
|
|
||||||
"relativeTimeSec": 43.7,
|
|
||||||
"timestamp": "2026-04-25T10:57:05.733Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"action": "screenshot step-rules.png",
|
|
||||||
"relativeTimeSec": 44,
|
|
||||||
"timestamp": "2026-04-25T10:57:06.051Z"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 53 KiB |
@@ -1,34 +0,0 @@
|
|||||||
# ProofShot Verification Report
|
|
||||||
|
|
||||||
**Date:** 2026-04-25 11:04:14
|
|
||||||
**Project:** familienarchiv
|
|
||||||
**Dev Server:** external on localhost:5173
|
|
||||||
|
|
||||||
## What Was Verified
|
|
||||||
|
|
||||||
Verify B: CSS strikethrough for struck-through rule, no fake input for illegible
|
|
||||||
|
|
||||||
## Video Recording
|
|
||||||
|
|
||||||
Full session recording: [session.webm](./session.webm) (88s)
|
|
||||||
|
|
||||||
## Screenshots
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Console Errors
|
|
||||||
|
|
||||||
No console errors detected.
|
|
||||||
|
|
||||||
## Server Errors
|
|
||||||
|
|
||||||
No server errors detected.
|
|
||||||
|
|
||||||
## Environment
|
|
||||||
- Browser: Chromium (headless)
|
|
||||||
- Viewport: 1280x720
|
|
||||||
- Duration: 88 seconds
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
[debug] [vite] connecting...
|
|
||||||
[debug] [vite] connected.
|
|
||||||
[debug] [vite] connecting...
|
|
||||||
[debug] [vite] connected.
|
|
||||||
[debug] [vite] connecting...
|
|
||||||
[debug] [vite] connected.
|
|
||||||
[debug] [vite] connecting...
|
|
||||||
[debug] [vite] connected.
|
|
||||||
[31m[error][0m Failed to fetch unread count TypeError: Failed to fetch
|
|
||||||
at window.fetch (http://localhost:5173/node_modules/@sveltejs/kit/src/runtime/client/fetcher.js?v=9aff597a:66:10)
|
|
||||||
at fetchUnreadCount (http://localhost:5173/src/lib/stores/notifications.svelte.ts?t=1777114433090:31:46)
|
|
||||||
at Object.init (http://localhost:5173/src/lib/stores/notifications.svelte.ts?t=1777114433090:74:2)
|
|
||||||
at http://localhost:5173/src/lib/components/NotificationBell.svelte?t=1777114433090:71:10
|
|
||||||
at untrack (http://localhost:5173/node_modules/.vite/deps/chunk-W6TT6Y22.js?v=9aff597a:4131:12)
|
|
||||||
at $effect (http://localhost:5173/node_modules/.vite/deps/chunk-XZDNTRGL.js?v=9aff597a:4165:23)
|
|
||||||
at update_reaction (http://localhost:5173/node_modules/.vite/deps/chunk-W6TT6Y22.js?v=9aff597a:3831:18)
|
|
||||||
at update_effect (http://localhost:5173/node_modules/.vite/deps/chunk-W6TT6Y22.js?v=9aff597a:3970:21)
|
|
||||||
at flush_queued_effects (http://localhost:5173/node_modules/.vite/deps/chunk-W6TT6Y22.js?v=9aff597a:2955:7)
|
|
||||||
at #process (http://localhost:5173/node_modules/.vite/deps/chunk-W6TT6Y22.js?v=9aff597a:2613:7)
|
|
||||||
[debug] [vite] connecting...
|
|
||||||
[debug] [vite] connected.
|
|
||||||
[debug] [vite] connecting...
|
|
||||||
[debug] [vite] connected.
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"branch": "main",
|
|
||||||
"commitSha": "0797406f02698a5bf43ce3ecb17336017245f91b",
|
|
||||||
"startedAt": "2026-04-25T11:02:36.168Z",
|
|
||||||
"description": "Verify B: CSS strikethrough for struck-through rule, no fake input for illegible"
|
|
||||||
}
|
|
||||||
@@ -1,121 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"action": "open http://localhost:5173/hilfe/transkription",
|
|
||||||
"relativeTimeSec": 2.8,
|
|
||||||
"timestamp": "2026-04-25T11:02:46.720Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"action": "screenshot step-rules.png",
|
|
||||||
"relativeTimeSec": 3.3,
|
|
||||||
"timestamp": "2026-04-25T11:02:47.146Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"action": "snapshot -i",
|
|
||||||
"relativeTimeSec": 6.5,
|
|
||||||
"timestamp": "2026-04-25T11:02:50.423Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"action": "fill @e6 admin@familyarchive.local",
|
|
||||||
"relativeTimeSec": 10.7,
|
|
||||||
"timestamp": "2026-04-25T11:02:54.622Z",
|
|
||||||
"element": {
|
|
||||||
"label": "E-Mail-Adresse",
|
|
||||||
"bbox": {
|
|
||||||
"x": 481,
|
|
||||||
"y": 314,
|
|
||||||
"width": 318,
|
|
||||||
"height": 42
|
|
||||||
},
|
|
||||||
"viewport": {
|
|
||||||
"width": 1280,
|
|
||||||
"height": 720
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"action": "fill @e7 admin123",
|
|
||||||
"relativeTimeSec": 11.5,
|
|
||||||
"timestamp": "2026-04-25T11:02:55.421Z",
|
|
||||||
"element": {
|
|
||||||
"label": "Passwort",
|
|
||||||
"bbox": {
|
|
||||||
"x": 481,
|
|
||||||
"y": 398,
|
|
||||||
"width": 318,
|
|
||||||
"height": 42
|
|
||||||
},
|
|
||||||
"viewport": {
|
|
||||||
"width": 1280,
|
|
||||||
"height": 720
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"action": "click @e8",
|
|
||||||
"relativeTimeSec": 12.7,
|
|
||||||
"timestamp": "2026-04-25T11:02:56.543Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"action": "open http://localhost:5173/hilfe/transkription",
|
|
||||||
"relativeTimeSec": 14.9,
|
|
||||||
"timestamp": "2026-04-25T11:02:58.745Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"action": "screenshot step-rules.png",
|
|
||||||
"relativeTimeSec": 15.9,
|
|
||||||
"timestamp": "2026-04-25T11:02:59.804Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"action": "snapshot",
|
|
||||||
"relativeTimeSec": 27.8,
|
|
||||||
"timestamp": "2026-04-25T11:03:11.712Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"action": "click @e17",
|
|
||||||
"relativeTimeSec": 38.6,
|
|
||||||
"timestamp": "2026-04-25T11:03:22.492Z",
|
|
||||||
"element": {
|
|
||||||
"label": "Durchgestrichene Wörter",
|
|
||||||
"bbox": {
|
|
||||||
"x": 366,
|
|
||||||
"y": 711.5,
|
|
||||||
"width": 174,
|
|
||||||
"height": 24
|
|
||||||
},
|
|
||||||
"viewport": {
|
|
||||||
"width": 1280,
|
|
||||||
"height": 720
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"action": "screenshot step-strikethrough.png",
|
|
||||||
"relativeTimeSec": 39,
|
|
||||||
"timestamp": "2026-04-25T11:03:22.830Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"action": "open http://localhost:5173/hilfe/transkription",
|
|
||||||
"relativeTimeSec": 62.2,
|
|
||||||
"timestamp": "2026-04-25T11:03:46.063Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"action": "screenshot --full-page step-full.png",
|
|
||||||
"relativeTimeSec": 63.7,
|
|
||||||
"timestamp": "2026-04-25T11:03:47.577Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"action": "scroll 0 500",
|
|
||||||
"relativeTimeSec": 77.7,
|
|
||||||
"timestamp": "2026-04-25T11:04:01.584Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"action": "scroll down",
|
|
||||||
"relativeTimeSec": 80.7,
|
|
||||||
"timestamp": "2026-04-25T11:04:04.579Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"action": "screenshot step-scrolled.png",
|
|
||||||
"relativeTimeSec": 81,
|
|
||||||
"timestamp": "2026-04-25T11:04:04.856Z"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
Before Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 66 KiB |