Refactor Page Object — Testing skill for Claude Code
Refactor a Vue component test to use the Page Object Pattern.
How to install Refactor Page Object
Installs to ~/.claude/commands/alexanderop-markvim-refactor-page-object.md
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/alexanderop/MarkVim/HEAD/.claude/commands/refactor-page-object.md -o ~/.claude/commands/alexanderop-markvim-refactor-page-object.md Restart Claude Code, or start a new session, for it to be picked up.
What Refactor Page Object does
description: Refactor a Vue component test to use the Page Object Pattern argument-hint: [test-file-path]
Page Object Pattern Refactoring
Refactor the test file located at @$1 to use the **Page Object Pattern**.
Context
Analyze the component import in @$1 to understand the component being tested. You need to abstract all UI interactions into a helper function.
Refactoring Rules
- Create the Page Object Factory:
- Define an async function `createPage(
Alternatives in Testing
- Webapp Testing — Test local web applications using Playwright for UI verification and debugging 94.1k ★
- #29 — #52, #103) 92.5k ★
- /test Routing — Vérifie le routing de commandes RTK sans exécution (dry-run) 25.5k ★
Full documentation available on GitHub
View Source RepositoryRelated Skills
QA Generate
Convert a JSON test plan into Playwright spec, page object, and fixtures.
Inkline
by inkline - Structures development workflow using pnpm with emphasis on TypeScript and Vue 3 Composition API,
Safe Refactor
Test-safe file refactoring with facade pattern and incremental migration. Use when splitting large files to pr
Motion Design
Design and spec motion for a screen, component, or page — picks tool, durations, easings, and writes a develop
Generate Automation From Mobile Flow
Sinh automation Appium từ flow mobile chạy thật trên device/emulator — hỗ trợ Native Android, Native iOS, Flut
Fleet Fix
Generate and test remediation diffs for a systemic pattern across affected repositories for human review.
Related Agents
Test Refactor Specialist.Agent
Improves test code quality and maintainability. Removes duplication, extracts Page Object Models, parameterize
Playwright Test Reviewer
Read-only auditor that checks a given file set against this repository's test conventions. Use after any test
Test Automator
Test-automation builder specializing in Playwright E2E. Bootstraps the toolchain itself (@playwright/test, bro