Import normalizer: offline tool to normalize the raw archive spreadsheets #663
@@ -46,10 +46,12 @@ describe('DocumentTopBar', () => {
|
|||||||
await expect.element(page.getByRole('heading', { name: 'brief.pdf' })).toBeVisible();
|
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() });
|
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 () => {
|
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();
|
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 });
|
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 () => {
|
it('omits the date paragraph entirely when documentDate is null', async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user