mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 05:37:32 +00:00
feat(core): embedding progress (#12367)
### TL;DR feat: show embedding progress in settings panel  ### What changed * show embedding progress in settings panel * polling embedding status based on RxJS <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added real-time embedding progress tracking and display in embedding settings, including a visual progress bar and status messages. - Introduced localized text for embedding progress statuses. - Added an optional test ID attribute to the progress bar component for improved testing. - **Style** - Added new styles for embedding progress UI elements. - **Tests** - Added an end-to-end test to verify embedding progress is displayed correctly in the settings UI. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -43,6 +43,24 @@ test.describe('AISettings/Embedding', () => {
|
||||
await utils.settings.waitForWorkspaceEmbeddingSwitchToBe(page, true);
|
||||
});
|
||||
|
||||
test('should show embedding progress', async ({
|
||||
loggedInPage: page,
|
||||
utils,
|
||||
}) => {
|
||||
await utils.settings.enableWorkspaceEmbedding(page);
|
||||
await page.getByTestId('embedding-progress-wrapper');
|
||||
|
||||
const progress = await page.getByTestId('embedding-progress');
|
||||
// wait for the progress to be loading
|
||||
const title = await page.getByTestId('embedding-progress-title');
|
||||
await expect(title).toHaveText(/Loading sync status/i);
|
||||
await expect(progress).not.toBeVisible();
|
||||
|
||||
const count = await page.getByTestId('embedding-progress-count');
|
||||
await expect(count).toHaveText(/\d+\/\d+/);
|
||||
await expect(progress).toBeVisible();
|
||||
});
|
||||
|
||||
test('should allow manual attachment upload for embedding', async ({
|
||||
loggedInPage: page,
|
||||
utils,
|
||||
|
||||
Reference in New Issue
Block a user