Files
openhuman/app/test/e2e/specs/skill-oauth.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

43 lines
1.4 KiB
TypeScript

// @ts-nocheck
/**
* OAuth-oriented skills UI smoke test (issue #221).
* Verifies Skills page shows connection/setup affordances after auth.
*/
import { waitForApp, waitForAppReady } from '../helpers/app-helpers';
import { triggerAuthDeepLinkBypass } from '../helpers/deep-link-helpers';
import { textExists, waitForWebView, waitForWindowVisible } from '../helpers/element-helpers';
import { completeOnboardingIfVisible, navigateToSkills } from '../helpers/shared-flows';
import { clearRequestLog, startMockServer, stopMockServer } from '../mock-server';
describe('Skill OAuth UI smoke', () => {
before(async () => {
await startMockServer();
await waitForApp();
clearRequestLog();
});
after(async () => {
await stopMockServer();
});
it('reaches Skills page and shows skill rows with actions after login', async () => {
await triggerAuthDeepLinkBypass('e2e-skill-oauth-token');
await waitForWindowVisible(25_000);
await waitForWebView(15_000);
await waitForAppReady(15_000);
await completeOnboardingIfVisible('[SkillOAuthE2E]');
await navigateToSkills();
await browser.pause(2_500);
const hasSkillChrome =
(await textExists('Skills')) ||
(await textExists('Install')) ||
(await textExists('Available')) ||
(await textExists('Connect')) ||
(await textExists('Setup'));
expect(hasSkillChrome).toBe(true);
});
});