mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-22 20:41:50 +08:00
test(core): support fast embedding progress (#12685)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Tests** - Improved test stability by handling potential errors during embedding progress checks in end-to-end tests. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -294,12 +294,16 @@ export class ChatPanelUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static async waitForEmbeddingProgress(page: Page) {
|
public static async waitForEmbeddingProgress(page: Page) {
|
||||||
await page.getByTestId('chat-panel-embedding-progress').waitFor({
|
try {
|
||||||
state: 'visible',
|
await page.getByTestId('chat-panel-embedding-progress').waitFor({
|
||||||
});
|
state: 'visible',
|
||||||
await page.getByTestId('chat-panel-embedding-progress').waitFor({
|
});
|
||||||
state: 'hidden',
|
await page.getByTestId('chat-panel-embedding-progress').waitFor({
|
||||||
});
|
state: 'hidden',
|
||||||
|
});
|
||||||
|
} catch {
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async enableNetworkSearch(page: Page) {
|
public static async enableNetworkSearch(page: Page) {
|
||||||
|
|||||||
Reference in New Issue
Block a user