Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(e2e): align settings coverage with current surfaces

Steven Enamakel93f980bd0d2e
diff --git a/app/test/e2e/helpers/shared-flows.ts b/app/test/e2e/helpers/shared-flows.ts
index 0023e52533..e18c0ddd3f 100644
--- a/app/test/e2e/helpers/shared-flows.ts
+++ b/app/test/e2e/helpers/shared-flows.ts
@@ -172,8 +172,11 @@ const HASH_REDIRECTS = {
'/settings/composio-triggers': '/connections?tab=composio-key',
'/settings/autonomy': '/settings/agent-access',
'/settings/composio-routing': '/connections?tab=composio-key',
- '/settings/agent-chat': '/connections?tab=llm#agent-chat',
- '/settings/local-model-debug': '/connections?tab=llm#local-model',
+ // The retired debug panels both redirect to the surviving LLM surface.
+ // Do not append their former fragment identifiers: the browser treats a
+ // second `#` as part of the hash and the router intentionally removes it.
+ '/settings/agent-chat': '/connections?tab=llm',
+ '/settings/local-model-debug': '/connections?tab=llm',
'/settings/llm': '/connections?tab=llm',
'/settings/voice': '/connections?tab=voice',
'/settings/search': '/connections?tab=search',
diff --git a/app/test/e2e/specs/settings-account-preferences.spec.ts b/app/test/e2e/specs/settings-account-preferences.spec.ts
index aa8e499b33..6b2e047c06 100644
--- a/app/test/e2e/specs/settings-account-preferences.spec.ts
+++ b/app/test/e2e/specs/settings-account-preferences.spec.ts
@@ -70,15 +70,12 @@ describe('Settings - Account Preferences', function () {
// the recovery-phrase flow wired through to the wallet domain.
});
- it('persists privacy analytics and meet handoff toggles to core config', async function () {
+ it('persists the privacy analytics toggle to core config', async function () {
this.timeout(90_000);
const beforeAnalytics = await callOpenhumanRpc('openhuman.config_get_analytics_settings', {});
- const beforeMeet = await callOpenhumanRpc('openhuman.config_get_meet_settings', {});
expect(beforeAnalytics.ok).toBe(true);
- expect(beforeMeet.ok).toBe(true);
const initialAnalytics = Boolean(beforeAnalytics.result?.result?.enabled);
- const initialMeet = Boolean(beforeMeet.result?.result?.auto_orchestrator_handoff);
await navigateViaHash('/settings/privacy');
await waitForText('Privacy', 15_000);
@@ -93,18 +90,10 @@ describe('Settings - Account Preferences', function () {
},
{ timeout: 15_000, interval: 500, timeoutMsg: 'analytics setting did not persist' }
);
- await clickSelector('[data-testid="privacy-meet-handoff-toggle"]');
-
await browser.waitUntil(
async () => {
const analytics = await callOpenhumanRpc('openhuman.config_get_analytics_settings', {});
- const meet = await callOpenhumanRpc('openhuman.config_get_meet_settings', {});
- return (
- analytics.ok &&
- meet.ok &&
- Boolean(analytics.result?.result?.enabled) === !initialAnalytics &&
- Boolean(meet.result?.result?.auto_orchestrator_handoff) === !initialMeet
- );
+ return analytics.ok && Boolean(analytics.result?.result?.enabled) === !initialAnalytics;
},
{ timeout: 15_000, interval: 500, timeoutMsg: 'privacy settings did not persist' }
);
@@ -112,7 +101,6 @@ describe('Settings - Account Preferences', function () {
const snapshot = await callOpenhumanRpc('openhuman.app_state_snapshot', {});
expect(snapshot.ok).toBe(true);
expect(Boolean(snapshot.result?.result?.analyticsEnabled)).toBe(!initialAnalytics);
- expect(Boolean(snapshot.result?.result?.meetAutoOrchestratorHandoff)).toBe(!initialMeet);
});
it('opens the billing route and shows the moved-to-web redirect panel', async function () {
diff --git a/app/test/e2e/specs/settings-advanced-config.spec.ts b/app/test/e2e/specs/settings-advanced-config.spec.ts
index f7cc6adc4b..229eecb551 100644
--- a/app/test/e2e/specs/settings-advanced-config.spec.ts
+++ b/app/test/e2e/specs/settings-advanced-config.spec.ts
@@ -16,13 +16,6 @@ import { startMockServer, stopMockServer } from '../mock-server';
const USER_ID = 'e2e-settings-advanced-config';
-async function readLocalStorageJson<T = unknown>(key: string): Promise<T | null> {
- return await browser.execute(storageKey => {
- const raw = window.localStorage.getItem(storageKey);
- return raw ? JSON.parse(raw) : null;
- }, key);
-}
-
describe('Settings - Advanced Config', function () {
this.timeout(90_000);
@@ -48,32 +41,19 @@ describe('Settings - Advanced Config', function () {
await waitForText('Restart Tour', 15_000);
});
- it('persists notification routing settings through core RPC', async function () {
+ it('toggles the surviving notification preference control', async function () {
this.timeout(60_000);
- const before = await callOpenhumanRpc('openhuman.notification_settings_get', {
- provider: 'gmail',
- });
- expect(before.ok).toBe(true);
- const initialEnabled = Boolean(before.result?.settings?.enabled);
-
- // /settings/notification-routing now redirects to
- // /settings/notifications#routing (the Routing tab on the tabbed
- // Notifications panel). Navigate to the tabbed panel directly and click
- // the Routing tab so we land on the same content the legacy path used to
- // render.
await navigateViaHash('/settings/notifications');
- await clickText('Routing', 10_000);
- await waitForText('Notification Intelligence', 15_000);
- await clickSelector('input[type="checkbox"]');
+ const toggle = await browser.$('[aria-label="Toggle Messages notifications"]');
+ await toggle.waitForExist({ timeout: 15_000 });
+ const initiallyEnabled = await toggle.getAttribute('aria-checked');
+ await toggle.click();
await browser.waitUntil(
async () => {
- const after = await callOpenhumanRpc('openhuman.notification_settings_get', {
- provider: 'gmail',
- });
- return after.ok && Boolean(after.result?.settings?.enabled) === !initialEnabled;
+ return (await toggle.getAttribute('aria-checked')) !== initiallyEnabled;
},
- { timeout: 15_000, interval: 500, timeoutMsg: 'notification routing did not persist' }
+ { timeout: 15_000, interval: 250, timeoutMsg: 'notification preference did not toggle' }
);
});
@@ -225,57 +205,19 @@ describe('Settings - Advanced Config', function () {
expect(backend.result?.result?.api_key_set).toBe(false);
});
- it('persists agent chat draft state to localStorage', async function () {
+ it('redirects retired agent chat debug links to the LLM settings surface', async function () {
this.timeout(90_000);
await navigateViaHash('/settings/agent-chat');
-
- await waitForText('Overrides', 15_000);
-
- // Use the native value setter + React change event to drive controlled
- // inputs. WebDriver's setValue clears the field but does not always
- // trigger React's synthetic onChange on controlled inputs.
- const setReactInput = async (selector: string, value: string) => {
- await browser.execute(
- (sel: string, val: string) => {
- const el = document.querySelector<HTMLInputElement | HTMLTextAreaElement>(sel);
- if (!el) return;
- const setter = Object.getOwnPropertyDescriptor(
- el instanceof HTMLTextAreaElement
- ? window.HTMLTextAreaElement.prototype
- : window.HTMLInputElement.prototype,
- 'value'
- )?.set;
- if (setter) setter.call(el, val);
- else el.value = val;
- el.dispatchEvent(new Event('input', { bubbles: true }));
- el.dispatchEvent(new Event('change', { bubbles: true }));
- },
- selector,
- value
- );
- };
-
- await setReactInput('input[placeholder="gpt-4o"]', 'gpt-4.1-mini');
- await setReactInput('input[placeholder="0.7"]', '0.2');
- await browser.pause(500);
-
- await browser.waitUntil(
- async () => {
- const payload = await readLocalStorageJson<{
- modelOverride?: string;
- temperature?: string;
- messages?: Array<{ role: string; text: string }>;
- }>('openhuman.settings.agentChat.history');
- return payload?.modelOverride === 'gpt-4.1-mini' && payload?.temperature === '0.2';
- },
- { timeout: 20_000, interval: 500, timeoutMsg: 'agent chat draft did not persist' }
- );
+ const panel = await browser.$('[data-testid="api-keys-panel"]');
+ await panel.waitForExist({ timeout: 15_000 });
+ expect(await panel.isDisplayed()).toBe(true);
});
it('mounts the remaining advanced settings routes', async function () {
this.timeout(90_000);
await navigateViaHash('/settings/local-model-debug');
- await waitForText('Local Model Debug', 15_000);
+ const panel = await browser.$('[data-testid="api-keys-panel"]');
+ await panel.waitForExist({ timeout: 15_000 });
await navigateViaHash('/settings/about');
await waitForText('Software updates', 15_000);
diff --git a/app/test/e2e/specs/settings-ai-skills.spec.ts b/app/test/e2e/specs/settings-ai-skills.spec.ts
index b470e9726e..5224fffa24 100644
--- a/app/test/e2e/specs/settings-ai-skills.spec.ts
+++ b/app/test/e2e/specs/settings-ai-skills.spec.ts
@@ -37,12 +37,9 @@ describe('Settings - AI & Skills', function () {
this.timeout(90_000);
await navigateViaHash('/settings/llm');
- await waitForText('AI', 15_000);
- const hasAiSurface =
- (await textExists('Cloud providers')) ||
- (await textExists('Primary cloud')) ||
- (await textExists('Reasoning'));
- expect(hasAiSurface).toBe(true);
+ const panel = await browser.$('[data-testid="api-keys-panel"]');
+ await panel.waitForExist({ timeout: 15_000 });
+ expect(await panel.isDisplayed()).toBe(true);
});
it('mounts Tools panel and shows skill toggles (13.3.2)', async () => {