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:
darkskygit
2025-05-06 09:59:48 +00:00
parent 3ac92d0d27
commit fdb2a92c1c

View File

@@ -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) {