phaser-test-seam-patterns

Test Phaser games via window.__TEST__ seam patterns for state verification.

2|Updated Feb 13, 2026
One-click install
npx skills add https://github.com/pmarashian/cursor-agent-skills --skill phaser-test-seam-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: phaser-test-seam-patterns
Source: https://github.com/pmarashian/cursor-agent-skills/tree/main/phaser-test-seam-patterns
Command: npx skills add https://github.com/pmarashian/cursor-agent-skills --skill phaser-test-seam-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a robust strategy for testing Phaser games, overcoming the limitations of DOM-based testing for canvas-rendered content by leveraging window.__TEST__ seam patterns.

Core Features & Use Cases

  • Reliable Game Testing: Utilize window.__TEST__ for direct interaction and state checking, bypassing unreliable DOM methods.
  • Efficient Discovery: Learn techniques to find and utilize test seams within Phaser game code.
  • Use Case: When testing a Phaser game, you need to verify that a button click correctly transitions the player to the next level. This Skill guides you to use window.__TEST__.commands.clickNextLevel() to achieve this reliably.

Quick Start

Use the phaser-test-seam-patterns skill to check if the test seam is available by evaluating window.__TEST__?.sceneKey || false.

Frequently Asked Questions about phaser-test-seam-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test Phaser games when DOM-based testing fails on canvas elements?

To test Phaser games when DOM testing fails, leverage `window.__TEST__` seam patterns for direct interaction and state verification, bypassing unreliable DOM methods for canvas-rendered content.

What are test seams in JavaScript game testing and how do they work?

Test seams in JavaScript game testing are exposed `window.__TEST__` hooks allowing direct property access and command execution, enabling reliable state verification when interacting with canvas-rendered game content.

How do I check if a test seam is available before executing commands in a Phaser game?

Check test seam availability by evaluating `window.__TEST__?.sceneKey || false` to gracefully degrade and verify seam presence before executing commands in your Phaser game testing environment.

Can I trigger a level transition in Phaser test automation without relying on UI clicks?

Yes, you can trigger level transitions in Phaser test automation by executing direct commands like `window.__TEST__.commands.clickNextLevel()`, bypassing unreliable canvas UI interactions.

Does this test seam approach work for verifying game state in JavaScript canvas applications?

Yes, the test seam approach works for verifying game state in JavaScript canvas applications by utilizing `window.__TEST__` for direct property access and efficient state checking.