fix(core): falky translate e2e (#13363)

> CLOSE AF-2774

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Tests**
* Updated translation tests to use Simplified Chinese instead of German
as the target language.
* Adjusted expected results in assertions to match Chinese characters
"苹果" instead of the German word "Apfel" across relevant test cases.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
德布劳外 · 贾贵
2025-07-30 14:52:04 +08:00
committed by GitHub
parent 603f2a1e5a
commit 7c1a9957b3
3 changed files with 15 additions and 15 deletions

View File

@@ -18,12 +18,12 @@ test.describe('AIChatWith/EdgelessNoteBlock', () => {
await utils.editor.createEdgelessNote(page, 'Apple');
}
);
const { answer } = await translate('German');
await expect(answer).toHaveText(/Apfel/, { timeout: 10000 });
const { answer } = await translate('Simplified Chinese');
await expect(answer).toHaveText(/苹果/, { timeout: 10000 });
const insertBelow = answer.getByTestId('answer-insert-below');
await insertBelow.click();
await expect(page.locator('affine-edgeless-note').nth(1)).toHaveText(
/Apfel/
/苹果/
);
});
});

View File

@@ -18,12 +18,12 @@ test.describe('AIChatWith/EdgelessTextBlock', () => {
await utils.editor.createEdgelessText(page, 'Apple');
}
);
const { answer } = await translate('German');
await expect(answer).toHaveText(/Apfel/, { timeout: 10000 });
const { answer } = await translate('Simplified Chinese');
await expect(answer).toHaveText(/苹果/, { timeout: 10000 });
const insertBelow = answer.getByTestId('answer-insert-below');
await insertBelow.click();
await expect(page.locator('affine-edgeless-text')).toHaveText(
/Apple[\s\S]*Apfel/
/Apple[\s\S]*苹果/
);
});
});