Files
AFFiNE-Mirror/tests/affine-cloud-copilot/e2e/chat-with/edgeless-text-block.spec.ts
德布劳外 · 贾贵 7c1a9957b3 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 -->
2025-07-30 06:52:04 +00:00

30 lines
937 B
TypeScript

import { expect } from '@playwright/test';
import { test } from '../base/base-test';
test.describe('AIChatWith/EdgelessTextBlock', () => {
test.beforeEach(async ({ loggedInPage: page, utils }) => {
await utils.testUtils.setupTestEnvironment(page);
await utils.chatPanel.openChatPanel(page);
});
test('should support insert answer below the current text', async ({
loggedInPage: page,
utils,
}) => {
const { translate } = await utils.editor.askAIWithEdgeless(
page,
async () => {
await utils.editor.createEdgelessText(page, 'Apple');
}
);
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]*苹果/
);
});
});