Files
openhuman/app/test/e2e/specs/skill-multi-round.spec.ts
T
Mega MindandGitHub 04146bf0bf Fix/191 skills reliability upstream (#282)
* feat(skills): core RPC data stats, tool timeout env, ping state merge (#191)

- Add openhuman.skills_data_stats and SkillDataDirectoryStats (disk usage).
- Centralize tool execution timeout via OPENHUMAN_TOOL_TIMEOUT_SECS (tool_timeout).
- Apply timeout to skill event loop, agent tool loop, harness default, delegate.
- Ping scheduler: merge connection_error into published_state via registry.
- JSON-RPC e2e: assert skills_data_stats.

Closes #214
Closes #218
Part of #213 (backend)

Made-with: Cursor

* feat(app): skills sync stats UI, reconnect resync, FE timeouts, chat errors (#191)

- useSkillDataDirectoryStats + Skills.tsx merge disk stats with skill state.
- resyncRunningSkillsAfterReconnect on socket connect; disconnectSkill OAuth cleanup in finally.
- withTimeout for callTool/triggerSync; VITE_TOOL_TIMEOUT_SECS in app .env.example.
- Structured ChatSendError in Conversations (data-chat-send-error-code).

Closes #213
Closes #215
Closes #216
Closes #217
Closes #219

Made-with: Cursor

* test(e2e): onboarding helpers and skills smoke specs (#191)

- shared-flows: 5-step onboarding, completeOnboardingIfVisible.
- auth-access-control + voice-mode use shared helpers.
- skills-registry: named skill assertion; new skill-oauth, multi-round, reconnect, lifecycle specs.

Closes #220
Closes #221
Closes #222
Closes #223
Closes #224
Part of #189 (E2E helpers)

Made-with: Cursor

* style: rustfmt + Prettier for CI (PR #282)

Fix Type Check workflow: prettier --check and cargo fmt --check.

Made-with: Cursor

* fix: PR #282 review — tool timeout config, tool_timeout module, CI diagnostics

- Centralize VITE_TOOL_TIMEOUT_SECS in config.ts (TOOL_TIMEOUT_SECS)
- Move tool_timeout to folder module; merge_published_state broadcasts SKILL_STATE_CHANGED
- Resync guard after socket reconnect; qjs_engine logs data dir stat errors
- E2E: registry/lifecycle/multi-round failure diagnostics; onboarding label constant
- chatSendError arrow export; rustfmt/import grouping in event_loop

Made-with: Cursor

* test(e2e): add Gmail skill end-to-end tests

- Introduced a comprehensive end-to-end test suite for the Gmail skill, covering the full lifecycle from discovery to OAuth completion and email management.
- Implemented two modes: a lifecycle-only mode that validates the skill's event loop without real credentials, and a live mode that interacts with the Gmail API using actual credentials.
- Added detailed environment variable requirements and usage instructions for both testing modes.

Closes #XXX (replace with relevant issue number if applicable)
2026-04-02 15:25:31 -07:00

56 lines
1.9 KiB
TypeScript

// @ts-nocheck
/**
* Multi-round tool usage via chat (issue #222) — smoke: authenticated user can open Conversations.
* Deep agent+tool loops are covered in Rust integration tests; here we verify the shell route.
*/
import { waitForApp, waitForAppReady } from '../helpers/app-helpers';
import { triggerAuthDeepLinkBypass } from '../helpers/deep-link-helpers';
import {
dumpAccessibilityTree,
textExists,
waitForWebView,
waitForWindowVisible,
} from '../helpers/element-helpers';
import { completeOnboardingIfVisible, navigateViaHash } from '../helpers/shared-flows';
import { clearRequestLog, getRequestLog, startMockServer, stopMockServer } from '../mock-server';
describe('Multi-round tool conversation smoke', () => {
before(async () => {
await startMockServer();
await waitForApp();
clearRequestLog();
});
after(async () => {
await stopMockServer();
});
it('loads Conversations after login for agent tool use', async () => {
await triggerAuthDeepLinkBypass('e2e-multi-round-token');
await waitForWindowVisible(25_000);
await waitForWebView(15_000);
await waitForAppReady(15_000);
await completeOnboardingIfVisible('[MultiRoundE2E]');
await navigateViaHash('/conversations');
await browser.pause(2_500);
const ok =
(await textExists('Message OpenHuman')) ||
(await textExists('Conversation')) ||
(await textExists('Type a message'));
if (!ok) {
const tree = await dumpAccessibilityTree();
console.error('[MultiRoundE2E] Accessibility tree (truncated):', tree.slice(0, 4000));
console.error('[MultiRoundE2E] Request log:', getRequestLog());
try {
const html = await browser.getPageSource();
console.error('[MultiRoundE2E] Page source (truncated):', html.slice(0, 4000));
} catch {
// ignore
}
}
expect(ok).toBe(true);
});
});