perf: optimize app startup and background lifecycles
This commit is contained in:
@@ -295,7 +295,16 @@ export async function openModelsPage(page: Page): Promise<void> {
|
||||
await settingsPage.waitFor({ state: 'visible', timeout: 5_000 }).catch(() => undefined);
|
||||
}
|
||||
await expect(settingsPage).toBeVisible();
|
||||
await page.getByTestId('settings-reveal-additional').click();
|
||||
const modelsSection = page.getByTestId('settings-opencode-models');
|
||||
if (!(await modelsSection.isVisible().catch(() => false))) {
|
||||
await page.getByTestId('settings-reveal-additional').click();
|
||||
const adminDialog = page.getByTestId('settings-admin-password-dialog');
|
||||
if (await adminDialog.isVisible().catch(() => false)) {
|
||||
await page.getByTestId('settings-admin-password-input').fill('zhiniankeji666');
|
||||
await page.getByTestId('settings-admin-unlock-button').click();
|
||||
}
|
||||
}
|
||||
await expect(modelsSection).toBeVisible();
|
||||
await page
|
||||
.getByTestId('settings-opencode-models')
|
||||
.getByRole('button', { name: 'Configure models' })
|
||||
|
||||
Reference in New Issue
Block a user