본문으로 건너뛰기
cccskills
무료GitHub에 공개

browse

Playwright-powered browser automation and E2E testing for SolanaOS Hub. Covers test configuration, agent-driven test generation (planner/generator/healer), NanoHub route testing, Convex API validation, wallet flow testing, IPFS Hub verification, and CI/CD integration. Use when asked about E2E tests, browser automation, Playwright setup, NanoHub testing, visual regression, or Hub route verification.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md9.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Browse — Playwright E2E Testing for SolanaOS Hub

Browser automation and end-to-end testing skill for the SolanaOS NanoHub, powered by Playwright.

Quick Start

# Install Playwright browsers
npx playwright install chromium

# Run E2E tests
bun run test:e2e

# Run with UI mode
npx playwright test --ui

# Generate tests interactively
npx playwright codegen https://seeker.solanaos.net

NanoHub Test Configuration

The NanoHub uses a dual config setup:

Playwright Config (playwright.config.ts)

Browser-based E2E tests against the built frontend.

import { defineConfig, devices } from '@playwright/test'

export default defineConfig({
  testDir: './e2e',
  testMatch: /.*\.pw\.test\.ts/,
  timeout: 60_000,
  expect: { timeout: 10_000 },
  fullyParallel: true,
  retries: process.env.CI ? 2 : 0,
  use: {
    baseURL: process.env.PLAYWRIGHT_BASE_URL || 'http://127.0.0.1:4173',
    trace: 'retain-on-failure',
  },
  webServer: {
    command: 'bun run preview -- --host 127.0.0.1 --port 4173',
    url: 'http://127.0.0.1:4173',
    reuseExistingServer: !process.env.CI,
  },
  projects: [
    { name: 'chromium', use: { ...devices['Desktop Chrome'] } },
  ],
})

Vitest E2E Config (vitest.e2e.config.ts)

Node-based E2E tests for CLI and API validation (no browser needed).

bun vitest run -c vitest.e2e.config.ts

NanoHub Routes to Test

RouteAuthWhat to verify
/NoLanding page renders, navigation works
/launchNoBoot sequence animation, CTA links
/mobileNoSeeker mobile walkthrough renders
/skillsNoSkill cards load from Convex
/soulsNoSoul cards load from Convex
/ipfsNoIPFS Hub page renders, wallet input works
/agentsNoAgent directory loads public agents
/dashboardYesWallet connect, agent factory, pairing
/uploadYesSkill publish flow with file upload
/settingsYesUser preferences, agent config
/miningNoBitAxe fleet dashboard renders
/strategyNoStrategy builder loads
/createYesSkill creator wizard
/auth/callbackNoGitHub OAuth redirect handling

Writing Hub Tests

Public Route Test

import { test, expect } from '@playwright/test'

test('IPFS Hub page loads', async ({ page }) => {
  await page.goto('/ipfs')
  await expect(page.locator('h1')).toContainText('Private IPFS')
  await expect(page.locator('.gallery-stat-card')).toHaveCount(4)
})

test('agent directory shows cards', async ({ page }) => {
  await page.goto('/agents')
  await expect(page.locator('h1')).toContainText('Registered')
  // Wait for Convex query
  await page.waitForSelector('.agent-card', { timeout: 10_000 })
})

test('skill search works', async ({ page }) => {
  await page.goto('/skills')
  await page.locator('input[type="search"]').fill('solanaos')
  await page.waitForSelector('.skill-card')
  await expect(page.locator('.skill-card')).toHaveCount.greaterThan(0)
})

Authenticated Route Test

import { test, expect } from '@playwright/test'

// Use storage state from auth setup
test.use({ storageState: 'e2e/.auth/user.json' })

test('dashboard loads for authenticated user', async ({ page }) => {
  await page.goto('/dashboard')
  await expect(page.locator('.dashboard-section')).toBeVisible()
})

Convex API Test (Vitest, no browser)

import { describe, expect, it } from 'vitest'

const CONVEX_URL = process.env.CONVEX_URL || 'https://artful-frog-940.convex.cloud'

describe('Convex IPFS API', () => {
  it('GET /api/v1/ipfs/files returns array', async () => {
    const res = await fetch(
      `${CONVEX_URL}/api/v1/ipfs/files?wallet=test`,
      { headers: { Accept: 'application/json' } }
    )
    expect(res.ok).toBe(true)
    const data = await res.json()
    expect(data).toHaveProperty('files')
    expect(Array.isArray(data.files)).toBe(true)
  })

  it('GET /api/v1/ipfs/stats returns stats object', async () => {
    const res = await fetch(
      `${CONVEX_URL}/api/v1/ipfs/stats?wallet=test`,
      { headers: { Accept: 'application/json' } }
    )
    expect(res.ok).toBe(true)
    const data = await res.json()
    expect(data.stats).toHaveProperty('totalFiles')
  })
})

Playwright Agents (AI-Driven Testing)

Playwright includes three built-in AI test agents.

Setup

npx playwright init-agents --loop=vscode

Planner

Explores the app and produces a Markdown test plan.

Input: "Generate a test plan for the IPFS Hub upload and recall flow"
Output: specs/ipfs-hub.md

The planner needs a seed test that sets up the environment:

// tests/seed.spec.ts
import { test } from '@playwright/test'

test('seed', async ({ page }) => {
  await page.goto('/')
})

Generator

Transforms Markdown plans into executable Playwright test files.

Input: specs/ipfs-hub.md
Output: tests/ipfs-hub/upload-file.spec.ts

Healer

Automatically repairs failing tests by:

  1. Replaying failing steps
  2. Inspecting current UI for equivalent elements
  3. Patching locators, waits, or data
  4. Re-running until pass or skip
Input: "Heal tests/ipfs-hub/upload-file.spec.ts"
Output: Passing test (or skipped with reason)

Configuration Reference

Top-Level Options

OptionDescription
testDirDirectory with test files
testMatchGlob/regex for test file matching
testIgnoreGlob/regex for files to skip
timeoutPer-test timeout (default: 30s)
retriesRetry count for flaky tests
workersParallel worker count
fullyParallelRun all tests in parallel
forbidOnlyFail if test.only found (CI)
reporterOutput format: list, html, json, dot
outputDirArtifacts directory (screenshots, videos, traces)
globalSetupPath to setup script (runs before all tests)
globalTeardownPath to teardown script (runs after all tests)
webServerAuto-start dev server before tests

use Options

OptionDescription
baseURLBase URL for page.goto('/')
storageStatePre-populated auth state
traceTrace capture: off, on, retain-on-failure, on-first-retry
screenshotScreenshot capture: off, on, only-on-failure
videoVideo recording: off, on, retain-on-failure
headlessRun without browser UI (default: true)
viewportBrowser viewport size
localeUser locale emulation
colorSchemelight or dark mode
geolocationGPS coordinate emulation
permissionsBrowser permission grants
offlineSimulate offline mode
proxyHTTP proxy settings
extraHTTPHeadersHeaders sent with every request
actionTimeoutTimeout per action (click, fill, etc.)
testIdAttributeCustom test ID attribute

Annotations

// Skip a test
test.skip('not ready', async ({ page }) => {})

// Mark as expected failure
test.fail('known bug', async ({ page }) => {})

// Mark as slow (3x timeout)
test.slow()

// Tag for filtering
test('login @smoke', async ({ page }) => {})
test('checkout', { tag: ['@e2e', '@slow'] }, async ({ page }) => {})

// Run tagged tests
// npx playwright test --grep @smoke
// npx playwright test --grep-invert @slow

CLI Commands

# Run all tests
npx playwright test

# Run specific file
npx playwright test e2e/ipfs-hub.pw.test.ts

# Run by title match
npx playwright test -g "IPFS Hub"

# Run with browser visible
npx playwright test --headed

# Debug mode (inspector + slow)
npx playwright test --debug

# Interactive UI mode
npx playwright test --ui

# Generate test code interactively
npx playwright codegen https://seeker.solanaos.net

# View last test report
npx playwright show-report

# View trace file
npx playwright show-trace test-results/trace.zip

# Only re-run failures
npx playwright test --last-failed

# Shard across CI workers
npx playwright test --shard=1/3

CI Integration

# .github/workflows/e2e.yml
name: E2E Tests
on: [push, pull_request]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: oven-sh/setup-bun@v2
      - run: bun install
      - run: npx playwright install --with-deps chromium
      - run: bun run build
      - run: npx playwright test
      - uses: actions/upload-artifact@v4
        if: failure()
        with:
          name: playwright-report
          path: playwright-report/

NanoHub E2E Environment Variables

VariableDescription
PLAYWRIGHT_BASE_URLOverride base URL (skip local server)
PLAYWRIGHT_PORTOverride preview server port (default: 4173)
CLAWHUB_E2E_TOKENAPI token for authenticated CLI tests
CLAWDHUB_E2E_TOKENAlias for above
CLAWHUB_REGISTRYRegistry URL override
CLAWHUB_SITESite URL override
CIEnables retries, single worker, forbidOnly

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

1password

무료

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

x402agent/SolanaOS92026년 7월 23일 업데이트

Manage Apple Notes via the `memo` CLI on macOS (create, view, edit, delete, search, move, and export notes). Use when a user asks SolanaOS to add a note, list notes, search notes, or manage note folders.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

x402agent/SolanaOS92026년 7월 23일 업데이트

Manage Apple Reminders via remindctl CLI (list, add, edit, complete, delete). Supports lists, date filters, and JSON/plain output.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

x402agent/SolanaOS92026년 7월 23일 업데이트

Create, search, and manage Bear notes via grizzly CLI.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

x402agent/SolanaOS92026년 7월 23일 업데이트

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

x402agent/SolanaOS92026년 7월 23일 업데이트

blucli

무료

BluOS CLI (blu) for discovery, playback, grouping, and volume.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

x402agent/SolanaOS92026년 7월 23일 업데이트

x402agent의 스킬 모두 보기

이 스킬의 문제 신고