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:
@@ -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/
|
||||
/苹果/
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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]*苹果/
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user