mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 18:46:19 +08:00
feat(server): adapt gemini3.1 preview (#14583)
#### PR Dependency Tree * **PR #14583** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added Gemini 3.1 Pro Preview support (text, image, audio) and new GPT‑5 variants as defaults; centralized persistent telemetry state for more reliable client identity. * **UX** * Improved model submenu placement in chat preferences. * More robust mindmap parsing, preview, regeneration and replace behavior. * **Chores** * Bumped AI SDK and related dependencies. * **Tests** * Expanded/updated tests and increased timeouts for flaky flows. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -280,6 +280,27 @@ export async function loginUserDirectly(
|
||||
}
|
||||
}
|
||||
|
||||
async function dismissBlockingModal(page: Page) {
|
||||
const modal = page.locator('modal-transition-container [data-modal="true"]');
|
||||
if (
|
||||
!(await modal
|
||||
.first()
|
||||
.isVisible()
|
||||
.catch(() => false))
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
const closeButton = page.getByTestId('modal-close-button').last();
|
||||
if (await closeButton.isVisible().catch(() => false)) {
|
||||
await closeButton.click({ timeout: 5000 });
|
||||
} else {
|
||||
await page.keyboard.press('Escape');
|
||||
}
|
||||
|
||||
await expect(modal.first()).toBeHidden({ timeout: 10000 });
|
||||
}
|
||||
|
||||
export async function enableCloudWorkspace(page: Page) {
|
||||
await clickSideBarSettingButton(page);
|
||||
await page.getByTestId('workspace-setting:preference').click();
|
||||
@@ -288,6 +309,7 @@ export async function enableCloudWorkspace(page: Page) {
|
||||
// wait for upload and delete local workspace
|
||||
await page.waitForTimeout(2000);
|
||||
await waitForAllPagesLoad(page);
|
||||
await dismissBlockingModal(page);
|
||||
await clickNewPageButton(page);
|
||||
}
|
||||
|
||||
@@ -303,6 +325,7 @@ export async function enableCloudWorkspaceFromShareButton(page: Page) {
|
||||
// wait for upload and delete local workspace
|
||||
await page.waitForTimeout(2000);
|
||||
await waitForEditorLoad(page);
|
||||
await dismissBlockingModal(page);
|
||||
await clickNewPageButton(page);
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,10 @@ export async function clickNewPageButton(page: Page, title?: string) {
|
||||
}
|
||||
|
||||
export async function waitForEmptyEditor(page: Page) {
|
||||
await expect(page.locator('.doc-title-container-empty')).toBeVisible();
|
||||
await page.waitForSelector(
|
||||
'.doc-title-container-empty, doc-title .inline-editor',
|
||||
{ timeout: 20000 }
|
||||
);
|
||||
}
|
||||
|
||||
export function getBlockSuiteEditorTitle(page: Page) {
|
||||
|
||||
Reference in New Issue
Block a user