mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 04:48:53 +00:00
> 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 -->
30 lines
937 B
TypeScript
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]*苹果/
|
|
);
|
|
});
|
|
});
|