Refactor Page Object banner
alexanderop alexanderop

Refactor Page Object

Testing community

Description

--- 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 1. **Create the Page Object Factory**: * Define an async function `create<ComponentName>Page(

Installation

Installs to ~/.claude/commands/alexanderop-markvim-refactor-page-object.md

Terminal
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.

Full documentation available on GitHub

View Source Repository