Skip to content

Add E2E tests for all 10 apps (#1)#7

Merged
frouaix merged 13 commits intomainfrom
issue-1-e2e-testing
Feb 22, 2026
Merged

Add E2E tests for all 10 apps (#1)#7
frouaix merged 13 commits intomainfrom
issue-1-e2e-testing

Conversation

@frouaix
Copy link
Copy Markdown
Owner

@frouaix frouaix commented Feb 22, 2026

Summary

Adds comprehensive end-to-end tests for all 10 Apple app adapters, exercising the full server pipeline (MCP server → adapter → Swift executor).

Changes

  • New e2e-apps.test.ts — 45 tests covering:
    • System tools: ping, get_mode
    • Readonly operations for all 10 apps: list_containers, list, search
    • Create/action with dryRun=true for 6 apps (Notes, Calendar, Reminders, Mail, Contacts, Safari)
    • Error paths: invalid app name, create rejected in readonly mode
  • Fix server.test.ts — Updated stale tool names (notes.create_noteapp.create, etc.) and tool count assertions (4 → 7 readonly tools)
  • Fix safari.ts — Resolve TypeScript strict-mode errors (parts[0] nullability)

Test results

  • 150 unit tests ✅
  • 4 integration tests ✅ (fixed)
  • 45 E2E tests ✅ (new)

Scope

  • ✅ Readonly operations (real execution)
  • ✅ Create/action (dryRun pipeline validation)
  • ❌ Destructive operations (update, delete, run_script) — intentionally skipped

Closes #1

- Add 45 E2E tests in e2e-apps.test.ts covering:
  - System tools (ping, get_mode)
  - Readonly operations for all 10 apps (list_containers, list, search)
  - Create/action with dryRun=true for 6 apps
  - Error paths (invalid app, create in readonly mode)
- Fix existing server.test.ts to use current generic app.* tool names
- Fix TypeScript strict errors in safari.ts (parts[0] nullability)
- No destructive operations tested (update, delete, run_script)

Closes #1

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 22, 2026 01:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds end-to-end integration coverage for the MCP server’s Apple app adapters by spawning the real server and exercising the JSON-RPC tool pipeline end-to-end, plus aligns existing integration tests and fixes a Safari adapter strictness issue.

Changes:

  • Added a new integration E2E suite covering readonly tools across all 10 supported apps and dry-run create/action flows for a subset.
  • Updated server.test.ts assertions to match the current tool surface and server version.
  • Fixed SafariAdapter strict-mode nullability around parsing tab index.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
packages/mcp-server/test/integration/server.test.ts Updates integration assertions for current tool names, tool counts, and ping version.
packages/mcp-server/test/integration/e2e-apps.test.ts Introduces a full-pipeline E2E suite that spawns the server and calls app tools via JSON-RPC over stdio.
packages/mcp-server/src/adapters/safari.ts Fixes strict-mode nullability when parsing parts[0] for tab index.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/mcp-server/test/integration/e2e-apps.test.ts
Comment thread packages/mcp-server/test/integration/e2e-apps.test.ts
Comment thread packages/mcp-server/test/integration/e2e-apps.test.ts Outdated
Comment thread packages/mcp-server/test/integration/e2e-apps.test.ts Outdated
frouaix and others added 2 commits February 21, 2026 17:39
The lockfile was generated with pnpm 10 (lockfileVersion 9.0) but CI
was pinned to pnpm 8, causing 'not compatible lockfile' errors.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 22, 2026

@frouaix I've opened a new pull request, #8, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 22, 2026

@frouaix I've opened a new pull request, #9, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 22, 2026

@frouaix I've opened a new pull request, #10, to work on those changes. Once the pull request is ready, I'll request review from you.

frouaix and others added 8 commits February 21, 2026 17:41
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…eout, unref timer

Co-authored-by: frouaix <876178+frouaix@users.noreply.github.com>
Co-authored-by: frouaix <876178+frouaix@users.noreply.github.com>
Co-authored-by: frouaix <876178+frouaix@users.noreply.github.com>
Fix timeout and listener leaks in `readResponseById`
Gate E2E tests behind APPLESCRIPT_E2E flag; auto-skip in CI
Fix callTool() crash on JSON-RPC error responses
- Add @eslint/js and globals to devDependencies
- Add Node.js globals to eslint config (process, Buffer, setTimeout, etc.)
- Ignore dist/ directory in eslint
- Remove unused project option from parser (test files not in tsconfig)
- Disable base no-unused-vars (handled by @typescript-eslint version)
- Fix unused beforeEach import in server.test.ts

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@frouaix frouaix merged commit 5547a7b into main Feb 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

End-to-end testing with Copilot

3 participants