fix: isolate settings and unify account controls with Code

This commit is contained in:
鲨鱼辣椒 committed 2026-10-13 15:15:27 +08:00
1 parent 430233f825
commit 2cc542f1f8
32 files changed
+759 -1091

No files matched your search

+12
View File
@@ -37,6 +37,9 @@ test.describe('Makelore administrator-protected proxy settings', () => {
await openSettingsFromSidebarAccountMenu(page);
await expect(page.getByTestId('settings-page')).toBeVisible();
await expect(page.getByTestId('sidebar')).toHaveCount(0);
await expect(page.getByTestId('titlebar-sidebar-toggle')).toHaveCount(0);
await expect(page.getByTestId('settings-back-button')).toBeVisible();
await page.getByTestId('settings-reveal-additional').click();
await expect(page.getByTestId('settings-proxy-section')).not.toBeVisible();
@@ -52,6 +55,11 @@ test.describe('Makelore administrator-protected proxy settings', () => {
await ensureSwitchState(proxyToggle, true);
await expect(proxySaveButton).toBeEnabled();
await page.getByTestId('settings-back-button').click();
await expect(page.getByTestId('settings-page')).toBeVisible();
await expect(proxyToggle).toHaveAttribute('data-state', 'checked');
await expect(proxySaveButton).toBeEnabled();
expect(await page.evaluate(() => window.dispatchEvent(new Event('beforeunload', { cancelable: true })))).toBe(false);
await proxySaveButton.click();
await expect.poll(async () => await readProxyEnabled(page)).toBe(true);
@@ -60,5 +68,9 @@ test.describe('Makelore administrator-protected proxy settings', () => {
await expect(proxySaveButton).toBeEnabled();
await proxySaveButton.click();
await expect.poll(async () => await readProxyEnabled(page)).toBe(false);
await expect(page.getByTestId('settings-page')).toHaveAttribute('data-settings-dirty', 'false');
await page.getByTestId('settings-back-button').click();
await expect(page).toHaveURL(/\/chat$/);
await expect(page.getByTestId('sidebar')).toBeVisible();
});
});