test(dates): update top-bar specs to honest long DAY label
All checks were successful
CI / Unit & Component Tests (pull_request) Successful in 3m46s
CI / OCR Service Tests (pull_request) Successful in 20s
CI / Backend Unit Tests (pull_request) Successful in 3m50s
CI / fail2ban Regex (pull_request) Successful in 44s
CI / Semgrep Security Scan (pull_request) Successful in 20s
CI / Compose Bucket Idempotency (pull_request) Successful in 1m1s
All checks were successful
CI / Unit & Component Tests (pull_request) Successful in 3m46s
CI / OCR Service Tests (pull_request) Successful in 20s
CI / Backend Unit Tests (pull_request) Successful in 3m50s
CI / fail2ban Regex (pull_request) Successful in 44s
CI / Semgrep Security Scan (pull_request) Successful in 20s
CI / Compose Bucket Idempotency (pull_request) Successful in 1m1s
The top bar now renders document dates through formatDocumentDate, so a DAY-precision date like 1923-04-15 renders as "15. April 1923" (de) via Intl.DateTimeFormat — no longer the old short "15.04.1923". These two browser-project specs still asserted the old short form and were never updated (CI-only, not run locally by prior agents). Refs #666 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit was merged in pull request #677.
This commit is contained in:
@@ -46,10 +46,12 @@ describe('DocumentTopBar', () => {
|
||||
await expect.element(page.getByRole('heading', { name: 'brief.pdf' })).toBeVisible();
|
||||
});
|
||||
|
||||
it('renders the short documentDate when one is present', async () => {
|
||||
it('renders the precision-aware long documentDate when one is present', async () => {
|
||||
render(DocumentTopBar, { props: baseProps() });
|
||||
|
||||
await expect.element(page.getByText('15.04.1923')).toBeVisible();
|
||||
// documentDate '1923-04-15' with default DAY precision renders the honest
|
||||
// long German label via formatDocumentDate (Refs #666), not the old short form.
|
||||
await expect.element(page.getByText('15. April 1923')).toBeVisible();
|
||||
});
|
||||
|
||||
it('omits the date paragraph entirely when documentDate is null', async () => {
|
||||
|
||||
@@ -32,10 +32,12 @@ describe('DocumentTopBarTitle', () => {
|
||||
await expect.element(page.getByRole('heading', { name: 'brief.pdf' })).toBeVisible();
|
||||
});
|
||||
|
||||
it('renders the short date format when a documentDate is supplied', async () => {
|
||||
it('renders the precision-aware long date when a documentDate is supplied', async () => {
|
||||
render(DocumentTopBarTitle, { props: baseProps });
|
||||
|
||||
await expect.element(page.getByText('15.04.1923')).toBeVisible();
|
||||
// '1923-04-15' defaults to DAY precision and renders the honest long German
|
||||
// label via formatDocumentDate (Refs #666), not the old short form.
|
||||
await expect.element(page.getByText('15. April 1923')).toBeVisible();
|
||||
});
|
||||
|
||||
it('omits the date paragraph entirely when documentDate is null', async () => {
|
||||
|
||||
Reference in New Issue
Block a user