Skip to content

test(e2e): re-enable 5 skipped browser tests, add coverage [follow-up to #283]#286

Merged
EmersonBraun merged 1 commit intomainfrom
foundation/e2e-reenable
Apr 15, 2026
Merged

test(e2e): re-enable 5 skipped browser tests, add coverage [follow-up to #283]#286
EmersonBraun merged 1 commit intomainfrom
foundation/e2e-reenable

Conversation

@EmersonBraun
Copy link
Copy Markdown
Owner

Summary

Removes the `test.describe.skip` wrappers in the React and multi-agent E2E specs, expands assertion coverage, and proves the browser side end-to-end.

Local result: 10 passed, 0 skipped, 0 failed. Up from 4 passed + 5 skipped on PR #282.

Why this was blocked

PR #282 introduced Playwright coverage for all four example apps. Two of the four (react, multi-agent) had their browser-side tests skipped because `@agentskit/core` imported `node:fs/promises` at module load — the React root never mounted, so there was no UI to assert against.

PR #283 fixed that core issue by relocating Node-only helpers to `@agentskit/memory` and `@agentskit/cli`. This branch is built on top of #283 and removes the skips.

What changed

Selectors

Switched from `getByPlaceholder(/type|message/i)` to `locator('[data-ak-input]')`. The example apps use custom placeholders ('Ask about the weather in any city...', 'Give the planner a task to delegate...') that the regex didn't match. The `data-ak-input` attribute is the headless contract — stable across placeholder changes.

Coverage expanded

  • example-react: 5 tests (server / mount / typed input reflected / submit shows user message / first turn triggers tool call)
  • example-multi-agent: 3 tests (server / mount / submit)
  • example-ink: 1 test (unchanged)
  • example-runtime: 1 test (unchanged)

Dependencies

Order PR
1st #283 (core browser-compat fix) — merge first
2nd #282 (E2E infrastructure) — already provides playwright config + helpers + workflow
3rd This PR (#286) — re-enables tests + better selectors

This branch already includes the fix from #283 (merged in), so it's self-contained — but if #283 lands first on `main`, this PR's diff shrinks naturally.

Verification

```bash
pnpm --filter "./packages/*" build
pnpm exec playwright test
```

Local run output (10/10 passing, 17.2s):

```
✓ ink — renders the chat container
✓ multi-agent — dev server serves index HTML
✓ multi-agent — chat UI mounts
✓ multi-agent — submitting a prompt produces output
✓ react — dev server serves index HTML
✓ react — chat UI mounts
✓ react — typed input is reflected in the textarea
✓ react — submitting renders the user message
✓ react — first turn triggers a tool call
✓ runtime — executes and produces assistant output
```

Test plan

  • All previously-skipped tests now run
  • No `test.skip` left in the e2e directory
  • Selectors use stable headless attributes (`data-ak-*`)
  • Demo adapters (deterministic) make assertions reproducible
  • CI confirms the 10-test pass after merge order is respected

Refs #251 #281 #283 #211

Removes the test.skip wrappers in example-react and example-multi-agent
specs that were blocked by #281 (core importing fs/promises). With the
fix from foundation/core-browser-compat (PR #283) merged in, the React
apps mount and the tests pass.

Selector update: switched from getByPlaceholder(/type|message/i) to
locator('[data-ak-input]'). The example apps use custom placeholders
('Ask about the weather in any city...', 'Give the planner a task to
delegate...'), so the regex never matched. The data-ak-input attribute
is the headless contract — stable across placeholder changes.

Result locally:
  Before: 4 passed, 5 skipped, 0 failed
  Now:    10 passed, 0 skipped, 0 failed

Coverage by suite:
  example-ink           1 test
  example-runtime       1 test
  example-react         5 tests (mount, typed input, send, tool call, server)
  example-multi-agent   3 tests (server, mount, send)

Builds on: PR #283 (core fix) merged into this branch.
Closes the unblock task tracked alongside #251 and #281.

Refs #251 #281 #283 #211
@EmersonBraun EmersonBraun force-pushed the foundation/e2e-reenable branch from 0371e13 to a96388c Compare April 15, 2026 12:28
@EmersonBraun EmersonBraun merged commit 2686894 into main Apr 15, 2026
1 of 4 checks passed
@EmersonBraun EmersonBraun deleted the foundation/e2e-reenable branch April 15, 2026 12:29
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.

1 participant