diff --git a/tests/ui/post/post-form-ux.spec.js b/tests/ui/post/post-form-ux.spec.js index ad9b167..720c5e1 100644 --- a/tests/ui/post/post-form-ux.spec.js +++ b/tests/ui/post/post-form-ux.spec.js @@ -107,8 +107,8 @@ test('photo section auto-collapses to a summary after upload and re-expands on t await expect(details).toHaveJSProperty('open', true); }); -// ── Reorder: uploaded photos are renamed photo-1..N; no order field leaks ────── -test('uploaded photos are renamed photo-1..N and the order field never hits frontmatter', async ({ page }) => { +// ── Reorder: uploaded photos are renamed photo-01..NN; no order field leaks ──── +test('uploaded photos are renamed photo-01..NN and the order field never hits frontmatter', async ({ page }) => { const tag = `rename-${Date.now()}`; await page.goto('/post'); await page.fill('input[name="data[title]"]', `UI Test ${tag}`); @@ -124,9 +124,9 @@ test('uploaded photos are renamed photo-1..N and the order field never hits fron const dir = findEntry(tag); expect(dir, 'Entry folder should exist').toBeTruthy(); const files = fs.readdirSync(dir); - // Server renamed both uploads to the deterministic photo-N scheme (drag order). - expect(files).toContain('photo-1.jpg'); - expect(files).toContain('photo-2.jpg'); + // Server renamed both uploads to the deterministic zero-padded photo-NN scheme (drag order). + expect(files).toContain('photo-01.jpg'); + expect(files).toContain('photo-02.jpg'); // The order is sent as a top-level POST key, so it must not appear in frontmatter. const mdName = files.find(f => /\.md$/.test(f));