Skip to content

Commit b4d8613

Browse files
test(layout): update page-number field expectations
Adjust header/footer token and footer rendering expectations to the spaced "- N -" format, and migrate the renderer page-context test to the pageNumberFieldFormat shape.
1 parent a23b921 commit b4d8613

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/layout-engine/layout-bridge/test/resolveHeaderFooterTokens.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ describe('resolveHeaderFooterTokens', () => {
8181
resolveHeaderFooterTokens(blocks, 3, 10, 'iii', 7);
8282

8383
const block = blocks[0] as ParagraphBlock;
84-
expect(block.runs[0].text).toBe('-7-');
84+
expect(block.runs[0].text).toBe('- 7 -');
8585
expect((block.runs[0] as TextRun).token).toBe('pageNumber');
8686
});
8787

packages/layout-engine/painters/dom/src/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5763,7 +5763,7 @@ describe('DomPainter', () => {
57635763

57645764
const footerEl = mount.querySelector('.superdoc-page-footer');
57655765
expect(footerEl).toBeTruthy();
5766-
expect(footerEl?.textContent).toBe('-4-');
5766+
expect(footerEl?.textContent).toBe('- 4 -');
57675767
});
57685768

57695769
it('bottom-aligns footer content within the footer box', () => {

packages/layout-engine/painters/dom/src/renderer-page-context-patch.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const pageNumberBlock: FlowBlock = {
99
{
1010
text: '0',
1111
token: 'pageNumber',
12-
pageNumberFormat: 'upperRoman',
12+
pageNumberFieldFormat: { format: 'upperRoman' },
1313
fontFamily: 'Arial',
1414
fontSize: 12,
1515
} as TextRun,

0 commit comments

Comments
 (0)