一键导入
docs-testing
Run Playwright E2E tests against the Crosswalker Starlight docs site. Use when building docs, changing themes/plugins, or verifying deployments.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run Playwright E2E tests against the Crosswalker Starlight docs site. Use when building docs, changing themes/plugins, or verifying deployments.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Build, configure, and add content to the Crosswalker Astro Starlight documentation site. Use when working with docs/, adding pages, changing theme/plugins, or troubleshooting the docs build.
Create and edit JSON Canvas files (.canvas) with nodes, edges, groups, and connections. Use when working with .canvas files, creating visual canvases, mind maps, flowcharts, or when the user mentions Canvas files in Obsidian.
Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when working with .base files, creating database-like views of notes, or when the user mentions Bases, table views, card views, filters, or formulas in Obsidian.
Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax. Use when working with .md files in Obsidian, or when the user mentions wikilinks, callouts, frontmatter, tags, embeds, or Obsidian notes.
Use when writing tests, analyzing test results, or improving test coverage. Provides conventions for workflow testing, comment syntax, and improvement patterns.
| name | docs-testing |
| description | Run Playwright E2E tests against the Crosswalker Starlight docs site. Use when building docs, changing themes/plugins, or verifying deployments. |
Run Playwright tests against the Crosswalker documentation site (Astro Starlight).
| Command | What it does |
|---|---|
cd docs && bun run test:local | Run all tests against local preview server |
cd docs && bun run test:deploy | Run deployment tests only |
cd docs && bun run test:e2e | Run in headed mode (see the browser) |
cd docs && bun run test:e2e:ui | Playwright UI mode (interactive) |
cd docs && TEST_URL=https://cybersader.github.io bun run test:deploy
cd docs
bun install
npx playwright install chromium
bun run build # Must build before testing
docs/tests/
├── smoke.spec.ts # 10 tests — UI, nav, content pages
└── deployment.spec.ts # 4 tests — accessibility, errors, assets, meta
Tests that the site renders correctly:
Tests for production readiness:
Playwright captures screenshots on failure automatically. View them in:
docs/test-results/
await page.screenshot({ path: 'docs/test-results/my-screenshot.png' });
# Read the PNG file — Claude Code can view images directly
docs/playwright.config.ts/Crosswalker prefix (Astro base path)bun run preview on port 4321import { test, expect } from '@playwright/test';
const BASE = '/Crosswalker';
test('my new page loads', async ({ page }) => {
await page.goto(`${BASE}/my-section/my-page/`);
await expect(page.locator('h1')).toContainText('My Page');
});
| Issue | Fix |
|---|---|
| 404 on all pages | Did you bun run build first? Preview serves from dist/ |
| Chromium not found | Run npx playwright install chromium |
| Tailwind classes not applied | Check docs/src/styles/global.css has @source directives |
| Base path 404s | All page.goto() must use ${BASE}/path/ prefix |