mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
fix(core): ai make it real ci timeout (#12954)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Replaced the boolean flag for selecting AI workflow endpoints with a clear and flexible enum, enhancing clarity and maintainability for AI-powered features. * **Tests** * Simplified example text in AI action tests to improve consistency. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
This commit is contained in:
@@ -12,10 +12,7 @@ test.describe('AIAction/MakeItReal', () => {
|
||||
loggedInPage: page,
|
||||
utils,
|
||||
}) => {
|
||||
const { makeItReal } = await utils.editor.askAIWithText(
|
||||
page,
|
||||
'AFFiNE is a workspace with fully merged docs'
|
||||
);
|
||||
const { makeItReal } = await utils.editor.askAIWithText(page, 'Hello');
|
||||
const { answer, responses } = await makeItReal();
|
||||
await expect(answer.locator('iframe')).toBeVisible({ timeout: 30000 });
|
||||
expect(responses).toEqual(new Set(['insert-below']));
|
||||
@@ -28,10 +25,7 @@ test.describe('AIAction/MakeItReal', () => {
|
||||
const { makeItReal } = await utils.editor.askAIWithEdgeless(
|
||||
page,
|
||||
async () => {
|
||||
await utils.editor.createEdgelessText(
|
||||
page,
|
||||
'AFFiNE is a workspace with fully merged docs'
|
||||
);
|
||||
await utils.editor.createEdgelessText(page, 'Hello');
|
||||
}
|
||||
);
|
||||
const { answer, responses } = await makeItReal();
|
||||
@@ -46,10 +40,7 @@ test.describe('AIAction/MakeItReal', () => {
|
||||
const { makeItReal } = await utils.editor.askAIWithEdgeless(
|
||||
page,
|
||||
async () => {
|
||||
await utils.editor.createEdgelessNote(
|
||||
page,
|
||||
'AFFiNE is a workspace with fully merged docs'
|
||||
);
|
||||
await utils.editor.createEdgelessNote(page, 'Hello');
|
||||
}
|
||||
);
|
||||
const { answer, responses } = await makeItReal();
|
||||
@@ -77,10 +68,7 @@ test.describe('AIAction/MakeItReal', () => {
|
||||
loggedInPage: page,
|
||||
utils,
|
||||
}) => {
|
||||
const { makeItReal } = await utils.editor.askAIWithText(
|
||||
page,
|
||||
'AFFiNE is a workspace with fully merged docs'
|
||||
);
|
||||
const { makeItReal } = await utils.editor.askAIWithText(page, 'Hello');
|
||||
const { answer } = await makeItReal();
|
||||
const insert = answer.getByTestId('answer-insert-below');
|
||||
await insert.click();
|
||||
|
||||
Reference in New Issue
Block a user