Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

1.3 KB
Raw Blame
import assert from 'node:assert/strict';

export default {
  name: 'mcp-app-card',
  entry: './mcp-app-card-fixture.tsx',
  viewport: { width: 800, height: 520 },
  real: 'McpAppCard, McpAppController, Button, saved fallback text, theme and translations',
  notCovered: 'Live cross-origin App, teardown handshake, fullscreen and full Cindy session switching; verified separately from this error-surface screenshot',
  stubs: {
    'src/renderer/features/device-link/stickySessionOrigin':
      'export const getStickySessionDeviceId = () => undefined;',
    'src/renderer/features/device-link/remoteProjectsStore':
      'export const remoteProjectsStore = { subscribe: () => () => {} };',
  },
  cases: { default: { about: 'Failed App retains saved text and offers retry' } },
  async ready(page) { await page.getByRole('alert').waitFor(); },
  async check(page, ui) {
    assert.equal(await page.locator('iframe').count(), 0);
    const retry = page.getByRole('button', { name: await ui.t('mcpApps.retry'), exact: true });
    await retry.click();
    await page.waitForFunction(() => document.documentElement.dataset.fixtureOpens === '2');
    await page.getByRole('alert').waitFor();
    assert.ok(await page.getByText('Saved result:', { exact: false }).isVisible());
    assert.ok(await retry.isVisible());
  },
};