Skip to content

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

test(e2e): remove Gmail Composio regression tests

Steven Enamakel723fbddbdff5
diff --git a/app/test/e2e/specs/connector-gmail-composio.spec.ts b/app/test/e2e/specs/connector-gmail-composio.spec.ts
index db259510e6..df36708c8f 100644
--- a/app/test/e2e/specs/connector-gmail-composio.spec.ts
+++ b/app/test/e2e/specs/connector-gmail-composio.spec.ts
@@ -1,21 +1,16 @@
/**
* E2E: Gmail (Composio) connector flow.
- *
- * Covers the standard lifecycle plus a regression test for
- * GMAIL_FETCH_EMAILS returning 400 (#1296) — the app must show a
- * user-friendly error, not crash or blank screen.
+ * Covers the connector card and its connection states.
*/
import { waitForApp } from '../helpers/app-helpers';
import {
assertConnectorCardVisible,
assertModalPhase,
assertSessionNotNuked,
- injectComposioFault,
openConnectorModal,
seedComposioConnection,
seedComposioToolkits,
} from '../helpers/composio-helpers';
-import { callOpenhumanRpc } from '../helpers/core-rpc';
import {
textExists,
waitForText,
@@ -26,7 +21,6 @@ import { triggerAuthLoopbackBypass } from '../helpers/loopback-auth-helpers';
import { completeOnboardingIfVisible, navigateToSkills } from '../helpers/shared-flows';
import {
clearRequestLog,
- getRequestLog,
resetMockBehavior,
setMockBehavior,
startMockServer,
@@ -69,40 +63,6 @@ describe('Gmail (Composio) connector flow', () => {
});
-
-
- it('GMAIL_FETCH_EMAILS returning 400 shows user-friendly error, not blank screen (#1296)', async function () {
- this.timeout(60_000);
- // Inject a 400 response on execute
- setMockBehavior('composioExecuteFails', '1');
- clearRequestLog();
-
- await callOpenhumanRpc('openhuman.composio_execute', {
- connection_id: 'c-gmail-1',
- action: 'GMAIL_FETCH_EMAILS',
- params: {},
- });
- const execReq = getRequestLog().find(r => r.url.includes('/composio/execute'));
- if (execReq) {
- // The mock returns 400 — the RPC layer should surface a safe error, not
- // crash, which the `assertSessionNotNuked` below is what actually checks.
- // This used to log `execReq.statusCode`, which the request log has never
- // recorded (`scripts/mock-api/server.mjs:72-78` stores method/url/body/
- // headers/timestamp), so every run printed `undefined`. Found by typing
- // `getRequestLog()`; log what the log actually holds.
- console.log(`${LOG} execute request reached the mock: ${execReq.method} ${execReq.url}`);
- }
-
- // Critical: app must remain responsive — session not nuked
- await assertSessionNotNuked();
-
- // Navigate to skills; the page must not be blank
- await navigateToSkills();
- const gmailVisible = await textExists(CONNECTOR_NAME);
- expect(gmailVisible).toBe(true);
- console.log(`${LOG} PASS: 400 on GMAIL_FETCH_EMAILS does not blank the screen`);
- });
-
it('failed connection shows error state, not blank screen', async function () {
this.timeout(60_000);
seedComposioConnection(TOOLKIT_SLUG, 'FAILED', 'c-gmail-fail');
@@ -125,6 +85,4 @@ describe('Gmail (Composio) connector flow', () => {
await assertSessionNotNuked();
console.log(`${LOG} PASS: expired auth does not log user out`);
});
-
-
});
diff --git a/app/test/playwright/specs/connector-gmail-composio.spec.ts b/app/test/playwright/specs/connector-gmail-composio.spec.ts
index 2acebeda87..f348e7b20b 100644
--- a/app/test/playwright/specs/connector-gmail-composio.spec.ts
+++ b/app/test/playwright/specs/connector-gmail-composio.spec.ts
@@ -2,7 +2,6 @@ import { expect, type Page, test } from '@playwright/test';
import {
bootAuthenticatedPage,
- callCoreRpc,
dismissWalkthroughIfPresent,
waitForAppReady,
} from '../helpers/core-rpc';
@@ -10,11 +9,8 @@ import {
const CONNECTOR_NAME = 'Gmail';
const TOOLKIT_SLUG = 'gmail';
const CONNECTION_ID = 'c-gmail-1';
-const ACTION = 'GMAIL_FETCH_EMAILS';
const MOCK_BASE = 'http://127.0.0.1:' + (process.env.E2E_MOCK_PORT || '18473');
-type RequestLogEntry = { method?: string; url?: string; body?: string };
-
async function mockFetch(path: string, init?: RequestInit) {
const response = await fetch(MOCK_BASE + path, init);
if (!response.ok) throw new Error('mock request failed: ' + response.status + ' ' + path);
@@ -37,10 +33,6 @@ async function setMockBehavior(behavior: Record<string, unknown>) {
});
}
-async function getRequestLog(): Promise<RequestLogEntry[]> {
- const payload = await mockFetch('/__admin/requests');
- return (payload.data as RequestLogEntry[]) ?? [];
-}
async function seedConnector(status: 'ACTIVE' | 'FAILED' | 'EXPIRED' = 'ACTIVE') {
await setMockBehavior({
@@ -152,13 +144,6 @@ async function openModal(page: Page) {
return dialog;
}
-function unwrapConnections(payload: unknown): Array<{ toolkit?: string; status?: string }> {
- const root = payload as {
- result?: { connections?: Array<{ toolkit?: string; status?: string }> };
- connections?: Array<{ toolkit?: string; status?: string }>;
- };
- return root.result?.connections ?? root.connections ?? [];
-}
test.describe('Gmail connector', () => {
test.beforeEach(async ({ page }, testInfo) => {
@@ -170,44 +155,6 @@ test.describe('Gmail connector', () => {
await expect(page.getByTestId('skill-install-composio-gmail')).toContainText(CONNECTOR_NAME);
});
- test('routes authorize through the mock backend', async () => {
- await callCoreRpc('openhuman.composio_authorize', { toolkit: TOOLKIT_SLUG });
- const requests = await getRequestLog();
- const authReq = requests.find(
- request =>
- request.method === 'POST' && request.url?.includes('/agent-integrations/composio/authorize')
- );
- expect(authReq).toBeDefined();
- expect(JSON.parse(authReq?.body || '{}')).toMatchObject({ toolkit: TOOLKIT_SLUG });
- });
-
- test('persists connected state through list_connections', async () => {
- const payload = await callCoreRpc<unknown>('openhuman.composio_list_connections', {});
- const hit = unwrapConnections(payload).find(
- connection => connection.toolkit?.toLowerCase() === TOOLKIT_SLUG
- );
- expect(hit?.status).toBe('ACTIVE');
- });
-
- test('routes composio_execute without blanking the app', async ({ page }) => {
- await callCoreRpc('openhuman.composio_execute', { tool: ACTION, arguments: {} });
- await assertSessionNotNuked(page);
- });
-
- test('survives a 400 fetch emails error and keeps the skills page usable', async ({ page }) => {
- await setMockBehavior({ composioExecuteFails: '1' });
- await expect(
- callCoreRpc('openhuman.composio_execute', {
- connection_id: CONNECTION_ID,
- tool: ACTION,
- arguments: {},
- })
- ).rejects.toThrow(/failed/i);
- await assertSessionNotNuked(page);
- await reloadSkills(page);
- await expect(page.getByTestId('skill-install-composio-gmail')).toContainText(CONNECTOR_NAME);
- });
-
test('survives failed connector state on the skills page', async ({ page }) => {
await seedConnector('FAILED');
await reloadSkills(page);
@@ -226,20 +173,7 @@ test.describe('Gmail connector', () => {
await assertSessionNotNuked(page);
});
- test('survives a 4xx composio execute error', async ({ page }) => {
- await setMockBehavior({ composioExecuteFails: '400' });
- await expect(
- callCoreRpc('openhuman.composio_execute', {
- connection_id: CONNECTION_ID,
- tool: ACTION,
- arguments: {},
- })
- ).rejects.toThrow(/failed/i);
- await assertSessionNotNuked(page);
- });
-
- test('routes disconnect through the mock backend', async ({ page }) => {
- await callCoreRpc('openhuman.composio_delete_connection', { connection_id: CONNECTION_ID });
+});
const requests = await getRequestLog();
const deleteReq = requests.find(
request =>