automattic/wp-calypso/ui-testing

Claude Code and agent skill by automattic/wp-calypso

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Run comprehensive UI tests for the Image Studio feature. Covers Media Library entry points, Edit Mode, Generate Mode, Block Editor integration, navigation, and delete. Use when running the full UI smoke test or testing any Image Studio surface.

Install

npx vskill@latest install automattic/wp-calypso/ui-testing

SKILL.md

The same SKILL.md was published earlier as automattic/wp-calypso/ui-testing.

Image Studio UI Tests

Run comprehensive UI tests for the Image Studio feature. All tests are required to pass.

Testing Strategy

Only generate one image per test run (Section 6). All other sections verify DOM state without triggering AI generation. This keeps the test run under 5 minutes instead of 20+.

  • Smoke test (Section 6): One real generation to verify the end-to-end AI pipeline works
  • All other sections: Verify UI elements, controls, navigation, dialogs, and entry points via DOM assertions only — no generation needed

Prerequisites

  • Important: If test site is not provided, ask the user for test site URL (e.g., https://yoursite.wordpress.com)
  • If not logged in, stop and ask user to log in before proceeding
  • At least 1 image uploaded to Media Library
  • (Optional) A draft post with an Image block for Sections 9-10

Section Dependencies

Sections are designed to run sequentially, but some depend on others:

Section 1 (Entry Points)
├── 1.3 "Edit with AI" row action ──► Sections 2, 3, 4 (Edit Mode)
└── 1.1 "Generate Image" button ──► Sections 5, 6, 7 (Generate Mode)
Section 8 (Hash Deep-Link) ──► Fallback entry to Edit Mode (Sections 2-4)
Section 9 (Block Editor Generate) ──► independent
Section 10 (Block Editor Edit) ──► requires existing image in a post
Section 11 (Navigation Arrows) ──► requires Edit Mode (2+ images in library)
Section 12 (Delete Permanently) ──► requires Edit Mode with Image Info sidebar

Setup

  1. Navigate to test site and log in if needed
  2. Go to wp-admin/upload.php (Media Library)
  3. Note the ID of an existing image (hover over "Edit" and check URL for post=123)

CSS Selectors & Aria Labels Reference

Full selector tables for all elements (Modal, Sidebar, Generate Mode, Canvas, Block Editor): see references/selectors.md.

Key selectors used across most sections:

  • Modal overlay: .components-modal__screen-overlay.image-studio-overlay
  • Modal content: .image-studio-modal__content
  • Close button: aria-label="Close image editor"
  • Save button: .image-studio-header button.is-primary
  • Image display: .image-studio-image
  • Generate Image button: .big-sky-image-studio-link

Automation Notes (Playwright)

When running these tests with Playwright MCP (not playwright-test):

  • Verification via DOM, not screenshots: Do NOT take screenshots to verify results. Instead, use playwright_evaluate to query the DOM for expected elements (e.g., check that .image-studio-overlay exists and has offsetHeight > 0). This is faster and more reliable. Use playwright_get_visible_text or playwright_get_visible_html for content checks.
  • Block editor iframe: The editor content area is inside iframe[name="editor-canvas"]. Use playwright_iframe_click / playwright_iframe_fill for interactions inside the editor canvas.
  • Image Studio modal: The modal uses .image-studio-overlay / .image-studio-modal__content and intercepts pointer events on background elements. Target elements inside the modal specifically.
  • Suggestion chips: Clicking a suggestion chip populates the textarea with an expanded prompt but does not auto-send. You must press Enter or click the send button after.
  • Generation timing: Instead of fixed sleep calls, poll for .image-studio-image to appear or for the loading indicator to disappear. Max wait: 50 seconds.
  • Generation retry rule: If no image appears by timeout (even without an explicit error), retry once with the same prompt. If retry also fails, mark as backend issue and continue.
  • Style/Aspect Ratio buttons: These use dynamic module class names (AgentUIInputToolbar-module_button). Prefer matching by text content or aria-label.
  • Block Editor setup order (important):
  1. Click Add block inside iframe[name="editor-canvas"] (inline inserter), choose Image.
  2. Verify the Image placeholder appears in the iframe.
  3. For Section 9, assert/click Generate Image from that placeholder.
  4. For Section 10, click Select Image in that same placeholder, then choose an item in media modal and click Select before checking toolbar.
  5. Only assert Edit with AI after the image is actually inserted and the block is selected.
  • Toolbar visibility in block editor: After inserting/selecting an image, click the image once and wait for block toolbar to render before asserting Edit with AI.
  • Asserting element state: Use playwright_evaluate to check:
  • Visibility: element.offsetHeight > 0
  • Disabled: element.disabled === true or element.getAttribute('aria-disabled') === 'true'
  • Text content: element.textContent.includes('expected text')
  • Existence: document.querySelector('.selector') !== null

Section 1: Media Library Entry Points

Setup: Must be on Media Library page (wp-admin/upload.php)

StepActionExpected Result
1.1Look at toolbar above media grid"Generate Image" button visible (.big-sky-image-studio-link)
1.2Click "List view" toggle (icon with horizontal lines)View switches to list/table format
1.3Hover mouse over any image rowRow actions appear: "Edit", "Delete Permanently", "View", "Copy URL", "Download file" AND "Edit with AI"
1.4Look at left sidebar navigation"AI Editor" menu item exists below "Media" (note: this links to the site editor, not Image Studio edit mode)

FAIL if: Any expected element is missing

Note: If 1.3 fails, use Section 8 (hash deep-link) as fallback to reach Edit Mode.


Section 2: Edit Mode

Setup: Must have image ID from Media Library. Enter via "Edit with AI" row action (Section 1.3) or hash deep-link (Section 8).

StepActionExpected Result
2.1Click "Edit with AI" on any image rowModal opens (.image-studio-overlay), header shows "Image Editor" (.image-studio-header__title) with "Beta" badge (.image-studio-badge)
2.2Examine modal header (.image-studio-header)Left: nav arrows, "Media Library" button; Center: "Select" tool; Right: "Image Info" toggle, "Save" button, Close (X) (aria-label="Close image editor")
2.3Look at main canvas areaSelected image displayed (.image-studio-image) full-size with no crop/highlight overlays
2.4Click "Image Info" toggle in headerSidebar (.image-studio-sidebar) slides in from right showing metadata fields

FAIL if: Modal doesn't open, header elements missing, or canvas blank


Section 3: Sidebar & Metadata

Setup: Must have Edit Mode open with Image Info sidebar (.image-studio-sidebar) visible

StepActionExpected Result
3.1Examine sidebar content (.image-studio-sidebar__content)Fields: Title, Caption, Description, Alt Text, File Details section
3.2Look for Regenerate buttonsEach field has a sparkles/refresh icon button to its right
3.3Click Regenerate next to Alt Text fieldField shows loading state, then new AI-generated text appears
3.4Click Image Info toggle to close sidebarSidebar slides out, canvas expands
3.5Click Image Info toggle againSidebar reopens, edited Alt Text still shows new value

FAIL if: Regenerate buttons missing, AI fails to generate, or edits don't persist


Section 4: Unsaved Changes Dialog

Setup: Must have Edit Mode open

StepActionExpected Result
4.1Capture current attachment ID from URL hash or row action (data-attachment-id)Stable ID is available for deterministic reopen
4.2Edit the Title field (append " - TEST")Title field shows modified text
4.3DO NOT click Save—
4.4Click Close (X) (aria-label="Close image editor")Confirmation dialog appears (.image-studio-confirmation-dialog-content)
4.5Examine dialog contentText: "You have unsaved changes"; Buttons: "Discard" (secondary), "Save" (primary)
4.6Click "Discard"Dialog closes, modal closes, changes lost
4.7Wait for modal teardown (overlay removed).image-studio-overlay no longer exists
4.8Reopen the same attachment ID (prefer direct hash: upload.php#ai-image-editor={ID} or exact row action selector)Edit mode opens for that exact image
4.9Verify TitleTitle shows original value (without " - TEST")

FAIL if: No confirmation dialog appears, or changes persist after discard


Section 5: Generate Mode

Setup: Must be on Media Library page

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
12,647
Repository forks
2,029
7-day trend score
47

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/automattic/wp-calypso/ui-testing/badge)](https://verified-skill.com/skills/automattic/wp-calypso/ui-testing)

Something wrong with this skill or its page? Tell us.