Skip to content

v0.19.1

Choose a tag to compare

@abewheel abewheel released this 06 Apr 17:30
· 238 commits to main since this release

⚠️ Breaking changes in 0.19.0 ⚠️

sunpeak is now a first-class MCP App server testing framework with or without the broader sunpeak framework and runtime!

Changes:

  • sunpeak/test is now the mcp fixture (was the live fixture). E2e tests import from here.
  • sunpeak/test/config is now defineConfig() (was defineLiveConfig()). Playwright configs import from here.
  • Live test imports moved to sunpeak/test/live and sunpeak/test/live/config.
  • jsdom replaced with happy-dom in vitest configs.
  • helpers.ts and global-setup.ts removed from template e2e tests. The mcp fixture handles URL construction and dev overlay suppression.

Upgrade instructions:

# playwright.config.ts
- import { defineConfig, devices } from '@playwright/test';
- export default defineConfig({ ... });
+ import { defineConfig } from 'sunpeak/test/config';
+ export default defineConfig();

# tests/e2e/*.spec.ts
- import { test, expect } from '@playwright/test';
- import { createInspectorUrl } from './helpers';
+ import { test, expect } from 'sunpeak/test';

- for (const host of ['chatgpt', 'claude']) {
-   test('renders', async ({ page }) => {
-     await page.goto(createInspectorUrl({ simulation: 'show-albums', theme: 'light', host }));
-     const iframe = page.frameLocator('iframe').frameLocator('iframe');
-     await expect(iframe.locator('h1')).toBeVisible();
-   });
- }
+ test('renders', async ({ mcp }) => {
+   const result = await mcp.callTool('show-albums', {}, { theme: 'light' });
+   await expect(result.app().locator('h1')).toBeVisible();
+ });

# tests/live/playwright.config.ts
- import { defineLiveConfig } from 'sunpeak/test/config';
+ import { defineLiveConfig } from 'sunpeak/test/live/config';

# tests/live/*.spec.ts
- import { test, expect } from 'sunpeak/test';
+ import { test, expect } from 'sunpeak/test/live';

# vitest.config.ts
- environment: 'jsdom',
+ environment: 'happy-dom',

# package.json
- "jsdom": "^29.0.1",
+ "happy-dom": "^18.0.1",

# Delete these files (no longer needed):
# tests/e2e/helpers.ts
# tests/e2e/global-setup.ts

What's Changed

Full Changelog: v0.18.16...v0.19.1