Skip to content

Turn one illustration into an animated 2D mesh avatar with a coding agent and a local editor

Align two end-to-end tests with current behaviour

shinshin86c0d3c14e5374
diff --git a/e2e/editor.spec.ts b/e2e/editor.spec.ts
index 4b4f946..8576033 100644
--- a/e2e/editor.spec.ts
+++ b/e2e/editor.spec.ts
@@ -71,13 +71,15 @@ test('rebuilds from cached assets, marks cut-outs stale, and sweeps angles', asy
await page.getByTestId('part-eyes').click();
await page.getByText(`1 · Opening (${fixture.eyes[0].opening.length})`, { exact: true }).click();
await page.getByRole('spinbutton', { name: 'eyes.0.opening.0.0', exact: true }).fill('451');
- await expect(page.getByText(/Outlines changed/)).toBeVisible();
+ const stale = page.getByTestId('stale-banner');
+ await expect(stale).toContainText('The sample is read-only. To continue editing, copy it into a project.');
+ await expect(stale.getByRole('button', { name: 'Copy and continue editing', exact: true })).toBeVisible();
await expect.poll(async () => Number(await canvas.getAttribute('data-revision'))).toBeGreaterThan(revision + 1);
await expect(page.getByText('Engine ready', { exact: true })).toBeVisible();
expect(assets.length).toBe(count);
await page.screenshot({ path: 'docs/screenshots/stale.png' });
await page.getByRole('button', { name: 'Undo', exact: true }).click();
- await expect(page.getByText(/Outlines changed/)).toBeHidden();
+ await expect(stale).toHaveCount(0);
await page.getByRole('button', { name: 'Sweep angles', exact: true }).click();
await expect(page.getByRole('button', { name: 'Stop sweep' })).toBeVisible();
for (let frame = 0; frame < 3; frame++) {
diff --git a/e2e/workflow.spec.ts b/e2e/workflow.spec.ts
index c457fc4..cfe1634 100644
--- a/e2e/workflow.spec.ts
+++ b/e2e/workflow.spec.ts
@@ -170,7 +170,11 @@ test('external sprite updates load automatically while keeping edited outlines,
await expect(page.getByTestId('preview-status')).toHaveAttribute('data-state', 'ready'); await page.waitForTimeout(300);
expect(await pixels(page)).not.toBe(before); await expect(page.locator('.mouth-fallback')).toHaveCount(0);
await page.screenshot({ path: 'docs/screenshots/ui4-auto-after-en-1440x900.png' });
+ // Notices expire. Check Japanese on a new update, not by translating an old notice.
+ await expect(page.locator('.save-notice')).toHaveCount(0, { timeout: 10000 });
await page.getByRole('button', { name: '日本語', exact: true }).click();
+ const manifest = join(directory, 'built/sprites/sprites.json');
+ await writeFile(manifest, await readFile(manifest));
await expect(page.getByRole('status').filter({ hasText: '描き分け画像を読み込みました' })).toBeVisible();
await page.screenshot({ path: 'docs/screenshots/ui4-auto-after-ja-1440x900.png' });
await page.getByRole('button', { name: '英語', exact: true }).click();