Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

1.3 KB
Raw Blame
import { expect, test } from '@playwright/test';

import { bootAuthenticatedPage, callCoreRpc, waitForAppReady } from '../helpers/core-rpc';

test.describe('Skill discovery (UI + core RPC)', () => {
  test.beforeEach(async ({ page }, testInfo) => {
    const testSlug = testInfo.title.toLowerCase().replace(/[^a-z0-9]+/g, '-');
    await bootAuthenticatedPage(page, 'pw-skill-execution-' + testSlug, '/home');
  });

  test('lands the user on a logged-in shell', async ({ page }) => {
    await waitForAppReady(page);
    await expect(page.getByTestId('chat-message-input')).toBeVisible();
  });

  test('core.ping responds over the same JSON-RPC URL the UI uses', async () => {
    const ping = await callCoreRpc<{ ok?: boolean }>('core.ping', {});
    expect(ping.ok).toBe(true);
  });

  test('skills UI surface shows installed tools', async ({ page }) => {
    // /skills redirects to /connections (Phase 2 rename)
    await page.goto('/#/connections');
    await waitForAppReady(page);

    const hash = await page.evaluate(() => window.location.hash);
    expect(String(hash)).toContain('/connections');

    const text = await page.locator('#root').innerText();
    expect(
      ['Composio Integrations', 'Composio', 'Channels', 'Gmail', 'Notion', 'GitHub'].some(marker =>
        text.includes(marker)
      )
    ).toBe(true);
  });
});