mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
test(core): fix chat with tag falky (#12141)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Tests** - Improved reliability of chat panel end-to-end tests by refining the sequence of UI interactions and wait conditions during tag and collection selection. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -264,8 +264,11 @@ export class ChatPanelUtils {
|
||||
await withMenu.getByTestId('ai-chat-with-tags').click();
|
||||
await withMenu.getByText(tag).click();
|
||||
await page.getByTestId('chat-panel-chips').getByText(tag);
|
||||
await this.waitForEmbeddingProgress(page);
|
||||
await withMenu.waitFor({
|
||||
state: 'hidden',
|
||||
});
|
||||
}
|
||||
await this.waitForEmbeddingProgress(page);
|
||||
}
|
||||
|
||||
public static async chatWithCollections(page: Page, collections: string[]) {
|
||||
@@ -276,8 +279,11 @@ export class ChatPanelUtils {
|
||||
await withMenu.getByTestId('ai-chat-with-collections').click();
|
||||
await withMenu.getByText(collection).click();
|
||||
await page.getByTestId('chat-panel-chips').getByText(collection);
|
||||
await this.waitForEmbeddingProgress(page);
|
||||
await withMenu.waitFor({
|
||||
state: 'hidden',
|
||||
});
|
||||
}
|
||||
await this.waitForEmbeddingProgress(page);
|
||||
}
|
||||
|
||||
public static async waitForEmbeddingProgress(page: Page) {
|
||||
|
||||
Reference in New Issue
Block a user