Playwright Component Testing
mellowagain/gitarena
Set up component testing with Playwright using a story gallery — scaffold stories and a gallery dev page driven by the built-in mount fixture, no dedicated component-testing runtime.
使用 Bun 1.4 内置的 Bun.WebView 无头浏览器对前端页面(Vue/Vite 等)做端到端冒烟与交互测试。当需要加载页面、真实点击、读取 DOM/应用状态、做断言、截图归档,或对本地开发服务器/静态站点做零依赖的浏览器级验证、可视化巡检、交互回归测试时,应使用本技能。
$ npx skills add pa001024/dna-builder --skill bun-webview-test -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install pa001024/dna-builder bun-webview-test --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/pa001024/dna-builder.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/bun-webview-test .claude/skills/bun-webview-test && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "bun-webview-test" agent skill from https://github.com/pa001024/dna-builder/tree/master/.agents/skills/bun-webview-test into .claude/skills/bun-webview-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bun-webview-test", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/pa001024/dna-builder/tree/master/.agents/skills/bun-webview-testType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add pa001024/dna-builder --skill bun-webview-test -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install pa001024/dna-builder bun-webview-test --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pa001024/dna-builder.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/bun-webview-test .agents/skills/bun-webview-test && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "bun-webview-test" agent skill from https://github.com/pa001024/dna-builder/tree/master/.agents/skills/bun-webview-test into .agents/skills/bun-webview-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bun-webview-test", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add pa001024/dna-builder --skill bun-webview-test -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install pa001024/dna-builder bun-webview-test --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pa001024/dna-builder.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/bun-webview-test .cursor/skills/bun-webview-test && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "bun-webview-test" agent skill from https://github.com/pa001024/dna-builder/tree/master/.agents/skills/bun-webview-test into .cursor/skills/bun-webview-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bun-webview-test", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/pa001024/dna-builder.git --path .agents/skills/bun-webview-test--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add pa001024/dna-builder --skill bun-webview-test -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install pa001024/dna-builder bun-webview-test --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pa001024/dna-builder.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/bun-webview-test .gemini/skills/bun-webview-test && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "bun-webview-test" agent skill from https://github.com/pa001024/dna-builder/tree/master/.agents/skills/bun-webview-test into .gemini/skills/bun-webview-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bun-webview-test", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install pa001024/dna-builder bun-webview-testInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add pa001024/dna-builder --skill bun-webview-test -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/pa001024/dna-builder.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/bun-webview-test .github/skills/bun-webview-test && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "bun-webview-test" agent skill from https://github.com/pa001024/dna-builder/tree/master/.agents/skills/bun-webview-test into .github/skills/bun-webview-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bun-webview-test", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add pa001024/dna-builder --skill bun-webview-test -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install pa001024/dna-builder bun-webview-test --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pa001024/dna-builder.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/bun-webview-test .opencode/skills/bun-webview-test && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "bun-webview-test" agent skill from https://github.com/pa001024/dna-builder/tree/master/.agents/skills/bun-webview-test into .opencode/skills/bun-webview-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bun-webview-test", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
bun-webview-test使用 Bun 1.4 内置的 Bun.WebView 无头浏览器对前端页面(Vue/Vite 等)做端到端冒烟与交互测试。当需要加载页面、真实点击、读取 DOM/应用状态、做断言、截图归档,或对本地开发服务器/静态站点做零依赖的浏览器级验证、可视化巡检、交互回归测试时,应使用本技能。
Bun Webview Test is an agent skill from pa001024/dna-builder. 使用 Bun 1.4 内置的 Bun.WebView 无头浏览器对前端页面(Vue/Vite 等)做端到端冒烟与交互测试。当需要加载页面、真实点击、读取 DOM/应用状态、做断言、截图归档,或对本地开发服务器/静态站点做零依赖的浏览器级验证、可视化巡检、交互回归测试时,应使用本技能。
Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including scripts and reference files (for example `references/webview-api.md`, `scripts/example.test.ts` and `scripts/webview-test.ts`).
It sits in Testing & QA. It works with Vite, Vue.js, pnpm and Playwright. The repository describes itself as: 二重螺旋构筑模拟器 Duet Night Abyss Builder. The licence is MIT.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 0a808c9. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 2 files in scripts/ (TypeScript), which the agent can run.
Shell commands in SKILL.md call:
pnpmbunFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Bun Webview Test loads about 1.2k tokens when it runs, and up to ~2.3k if it reads all its reference files. Until then it costs about 40 tokens; SKILL.md has 320 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from pa001024/dna-builder at commit 0a808c9, republished under its MIT licence (© pa001024). 320 words, ~1,198 tokens.
.claude/skills/bun-webview-test/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.本技能封装 Bun 1.4 新增的 Bun.WebView 无头浏览器能力,提供一套零依赖的前端端到端测试框架。它取代了 Puppeteer / Playwright 的安装开销,用单个 bun 命令即可驱动真实浏览器(macOS 用系统 WebKit,Windows/Linux 用已安装的 Chrome/Edge 经 CDP)完成:页面加载、真实用户输入、DOM/状态读取、断言与截图。
完整 API 细节见 references/webview-api.md,不要凭记忆猜测方法签名。
pnpm dev 起的开发服务器(本项目默认 http://localhost:1420)做冒烟测试。bun --version 确认;低于此版本无 Bun.WebView。pnpm dev 启动本项目开发服务器(或指向任意可访问 URL)。Bun.WebView 在 Windows 默认走 Chrome 后端,需本机已装 Chrome/Chromium/Edge/Brave。找不到时设 BUN_CHROME_PATH 指向可执行文件,或装 Playwright 的 chrome-headless-shell。macOS 用系统 WebKit,无需安装。pnpm dev / pnpm dd2(保持 http://localhost:1420 可访问)。?hideUpdateInfo=1 打开页面(见下方「启动弹窗」),否则会被数据包弹窗挡住。bun .agents/skills/bun-webview-test/scripts/example.test.ts
# 或指定地址
bun .agents/skills/bun-webview-test/scripts/example.test.ts --url http://localhost:1420.tmp 约定),通过 screenshots/home.png 查看首屏。注意点:
router.push 加参数不会生效。/char/:id 构筑页)依然会因为
charBuild.calculateWeaponAttributes is not a function 之类报错渲染失败。这类页面要在
已装数据包的浏览器里人工验证,或给 WebView 传 dataStore: "./profile" 复用已装数据包的 profile。document.querySelector("dialog.modal.modal-open") 非空即被挡住。新建一个 *.test.ts,从框架导入能力,注册用例,末尾调用 run():
import { test, expectVisible, expectEval, expectNoConsoleErrors, snapshot, run } from "./webview-test.ts"
test("标题区域可见", async ({ view }) => {
await expectVisible(view, "header h1")
})
test("无控制台错误", async () => {
await expectNoConsoleErrors()
})
run()可用断言辅助(详见 scripts/webview-test.ts):expectText、expectContains、expectVisible、expectCount、expectCountAtLeast、expectEval、expectNoConsoleErrors、snapshot、evalExpr。
直接在用例内也能调用底层 view 方法:await view.click("button.submit")、await view.evaluate("app.store.xxx")、await view.scroll(0, 400)、await view.screenshot({ format: "png" })。
--url <地址>:覆盖基准地址(默认 http://localhost:1420)。FRONTEND_TEST_URL:同上,优先级低于 --url。0 全部通过;1 有用例失败;2 无法导航到目标(通常是服务器没起)。new WebView({ width, height, console, dataStore }),无需 npm 安装浏览器引擎。click/type/press/scroll 派发原生事件(isTrusted === true),选择器方法自动等待可操作。evaluate(expr) 在页面上下文执行 JS 字符串并返回反序列化结果;evalExpr 封装了 undefined 安全处理。snapshot(ctx, name, format) 保存到 screenshots/(相对 process.cwd(),建议以 .tmp 为工作目录),供人工或更严格的回归对比。evaluate 接收字符串表达式;多语句用 (function(){ ... })() 包裹,顶层 const/let 会抛 SyntaxError。console 选项必须是函数(console: (level, ...a) => {...}),传 true 会抛 ERR_INVALID_ARG_TYPE。evaluate 读取 DOM/状态做代码级断言,截图仅作人工辅助。navigate 会重置页面:注入到 window 上的钩子/状态(含 localStorage 之外的临时全局量)会随整页加载丢失,
所以钩子只能在最后一次 navigate 之后装,且每个用例内自给自足,不要跨用例依赖注入态。window.Worker 记录 URL 再触发交互(new Worker 的参数是 URL 对象,String() 后含 xxx.worker)。await import("/src/utils/xxx.ts") 可直接调纯前端模块(裸包名解析不了),
用来断言「语料/索引是否已建」这类不体现在 DOM 上的状态,比翻 UI 稳。localStorage、Worker 计数),别把「数据没装」误判成功能坏了。WebView 传 dataStore: "./profile"。?hideUpdateInfo=1,否则启动期的数据包弹窗会盖住页面(详见上方「启动弹窗」)。.tmp/:框架按 process.cwd() 写 screenshots/,所以以 .tmp 为工作目录运行
(workdir: <repo>/.tmp)即可让产物落在 .tmp/screenshots/,不要在仓库根留下 screenshots/。Select 只能坐标点可见项:打开后全部 option 都在 DOM(本项目等级选择器有 240 个,不做虚拟化,[role=option] 可数),但当前选中项会对齐触发器,序号小于当前值的 option getBoundingClientRect().top 为负、点不到;view.type + Enter 的 typeahead 不生效。改值的做法:先 evaluate 取出一个可见(top > 0 && bottom < innerHeight)且 innerText 不等于当前值的 option,再用 view.click(x, y) 点它的中心。pnpm lint / pnpm test)。webview-test.ts — 测试框架:注册器 test、断言辅助、截图、运行器 run。测试文件应 import 它。example.test.ts — 可直接运行的冒烟示例,针对本项目 http://localhost:1420。webview-api.md — Bun.WebView 完整 API 精简参考(构造、方法、后端、事件、注意事项)。© pa001024, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 3 other files (scripts, references) in .agents/skills/bun-webview-test of pa001024/dna-builder.
Open the folder on GitHubat commit 0a808c9
Bun Webview Test next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Bun Webview Test this skillpa001024/dna-builder | 136 | — | ~1.2k | Automated safety check: Pass | MIT | |
| Playwright Component Testingmellowagain/gitarena | 115 | 1 repos | ~2.6k | Automated safety check: Pass | MIT | |
| Handsontable Visual Test Demoshandsontable/handsontable | 22k | — | ~1.3k | Automated safety check: Pass | Custom licence | |
| Validate BranchZenUml/web-sequence | 150 | — | ~1.1k | Automated safety check: Pass | MIT | |
| Devinggo Project Inithuagelong/devinggo | 122 | — | ~1.1k | Automated safety check: Notes | Apache-2.0 | |
| Projectlin-97/gi-demo | 188 | — | ~1.4k | Automated safety check: Notes | Apache-2.0 |
mellowagain/gitarena
Set up component testing with Playwright using a story gallery — scaffold stories and a gallery dev page driven by the built-in mount fixture, no dedicated component-testing runtime.
handsontable/handsontable
Explains how to add or change the demo pages that Handsontable's visual regression suite photographs, including per-feature routes in the js demo and the shared grid.
ZenUml/web-sequence
Run local validation checks for ZenUML web-sequence before pushing, opening a PR, or merging.
huagelong/devinggo
DevingGo 项目初始化与本地开发环境配置流程。用于用户询问项目初始化、开发环境搭建、依赖检查、配置文件生成、数据库迁移、本地启动后端/前端/Worker 服务、或希望 AI 大模型一步步把 DevingGo 跑起来时。适用于基于本项目 CLI、Makefile、manifest/config、hack/config、admin-ui 前端工作区的初始化排障与启动验证。
lin-97/gi-demo
后台管理模板的项目总览与前端强制规范。涵盖 Vue 3 + Arco Design + Gi 组件库、目录结构、自动导入、CRUD/API 约定与代码风格。在当前仓库内开发、新增页面、查阅架构或不确定项目规范时使用。
vuetifyjs/vuetify
Maintains the Vuetify repo's local Playground.vue so contributors get a realistic reproduction and a short demo they can paste into a pull request description.
pa001024/dna-builder
This skill documents how to use the fmodel-mcp toolkit (a CUE4Parse-based .NET CLI plus a thin Python MCP server) to inspect and export Unreal Engine game assets — pak files, textures, meshes…
pa001024/dna-builder
制作与调试 Unreal Engine 4.27 游戏的 pak 模组(模型/网格/资产换皮,如《二重螺旋》Duet Night Abyss)。两条路线:编辑器烘焙(Blender 自由改模型 → UE4.27 cook → pak)与二进制替换(改写已烘焙 .uasset 的导出名/载荷)。当需要「把 A 的模型换成 B 的模型」「让模型能自由导入 Blender…
pa001024/dna-builder
给 dna-builder 里任意角色从零推一套「最优构筑」(BD)的通用方法论:读角色机制 → 辅助候选排列组合 → buff 组(含光环型海妖 / 角色专属如大冲击)→ 定计算方向 → 魔灵与潜质 → 必带 MOD → 用 autoBuild 跑一遍并剔除不合理件 → 消融实验。当需要「给某个角色配一套最优 BD」「这个角色带什么辅助/队友最强」「跑一下 XX…
pa001024/dna-builder
用 V8 CPU profile 定位 JS/TS 热点函数,并用「同进程交替 A/B + best(min) 统计量 + checksum 锚点」的微基准方法安全地做性能优化。当需要优化计算热点、怀疑某函数耗时占比高、想评估某个优化(含 Wasm/SIMD 等加速路径)是否真有收益、或要建立可回归的性能基准时使用。
pa001024/dna-builder
《二重螺旋》新手开荒指南(校对至 1.6 版本)。含分阶段开荒流程(历练 35 前 / 35~45 / 45~60 / 60 后)、前期角色与武器获取清单、角色获取循环(深渊→周本→密函商店)、魔之楔六大系列与金 Mod 升级口径、减负活动、灾厄武器四把(棘刺绝响 / 无止无休 / 权火将熄 / 血染织羽)的两条刷取路线与 1.6 配队(暗队 /…
pa001024/dna-builder
在 dna-builder 里新增一个 /admin 后台管理页(侧边栏菜单 + 路由 + REST 封装 + 统计卡/筛选卡/表格/分页 + 详情弹窗),并在本地实测验证。当需要给后台加新的管理页面、或改动 src/admin/ 下的页面结构时使用。
Works with
Categories
使用 Bun 1.4 内置的 Bun.WebView 无头浏览器对前端页面(Vue/Vite 等)做端到端冒烟与交互测试。当需要加载页面、真实点击、读取 DOM/应用状态、做断言、截图归档,或对本地开发服务器/静态站点做零依赖的浏览器级验证、可视化巡检、交互回归测试时,应使用本技能。. Bun Webview Test is an agent skill from pa001024/dna-builder.
Bun Webview Test fits situations like: testing & QA work in your project.
Run `npx skills add pa001024/dna-builder --skill bun-webview-test -a claude-code`. Or copy the skill folder (.agents/skills/bun-webview-test in pa001024/dna-builder) into .claude/skills/bun-webview-test in your project. Claude Code loads it when a task matches its description.
Run `npx skills add pa001024/dna-builder --skill bun-webview-test -a codex`. Or copy the skill folder (.agents/skills/bun-webview-test in pa001024/dna-builder) into .agents/skills/bun-webview-test in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pa001024/dna-builder --skill bun-webview-test -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bun-webview-test, .gemini/skills/bun-webview-test, .github/skills/bun-webview-test and .opencode/skills/bun-webview-test in your project.
Going by SKILL.md and its folder, Bun Webview Test needs TypeScript for the scripts in its folder and the command-line tools its instructions call (pnpm and bun). Our summary lists: Node.js.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Bun Webview Test is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.2k tokens (SKILL.md is roughly 4.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.1k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Bun Webview Test: Playwright Component Testing (mellowagain/gitarena, 115 stars), Handsontable Visual Test Demos (handsontable/handsontable, 22k stars), Validate Branch (ZenUml/web-sequence, 150 stars) and Devinggo Project Init (huagelong/devinggo, 122 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
pa001024 (a GitHub user) maintains it in pa001024/dna-builder, which has 136 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 8, 2026.
Source: pa001024/dna-builder on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.