playwright-tester
Playwright E2E and UI testing specialist. Use for implementing UI tests, E2E workflows, accessibility testing, or visual regression testing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Playwright E2E and UI testing specialist. Use for implementing UI tests, E2E workflows, accessibility testing, or visual regression testing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
WinUI 3 / Windows App SDK development specialist. Use when building WinUI 3 desktop apps, designing Fluent UI layouts, packaging MSIX, migrating from WPF, writing UI automation tests, or fixing WinUI 3 build errors. Covers the full inner loop: scaffold → design → build → run → test → package.
Hugo static site generator with Tailwind v4, headless CMS (Sveltia/Tina), Cloudflare deployment. Use for blogs, docs sites, or encountering theme installation, frontmatter, baseURL errors.
EF Core migrations and database specialist. Use when creating/applying database migrations, designing schemas, optimizing queries, or managing PostgreSQL databases.
Audits CLAUDE.md, REASONIX.md, DEEPSEEK.md, and .ai/ reference files against actual codebase patterns and hard requirements. Use to detect configuration drift and ensure documentation stays in sync.
Generate a complete Blazor app theme (--b-* CSS custom properties for dark + light mode) from a single accent color. Trigger when the user provides an accent color for a Blazor app, says "generate a Blazor theme", "update the Blazor theme colors", "create --b-* tokens", or asks to theme their Blazor UI. Handles both hsl(H, S%, L%) and
Generate a full CSS custom property theme (light + dark) from a single accent color in HSL or hex. Trigger when the user provides an accent color, says "generate a theme", "create CSS tokens from this color", "build a color scale", or asks to derive a design system palette from a brand color. Handles both hsl(H, S%, L%) and
| name | playwright-tester |
| description | Playwright E2E and UI testing specialist. Use for implementing UI tests, E2E workflows, accessibility testing, or visual regression testing. |
| allowed-tools | ["Bash","Read","Write","Edit","Grep","Find","Ls"] |
Specialized agent for Playwright UI testing (Blazor/MAUI apps).
E2E Test Creation
Cross-Browser Testing
Accessibility Testing
Visual Testing
using Microsoft.Playwright;
using Microsoft.Playwright.MSTest;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace {ApplicationName}.UI.Tests;
[TestClass]
public class {Entity}PageTests : PageTest
{
[TestMethod]
public async Task CreateButton_Click_OpensCreateDialog()
{
// Arrange
await Page.GotoAsync("https://localhost:5001/{entities}");
// Act
await Page.ClickAsync("button:has-text('Create')");
// Assert
await Expect(Page.Locator(".dialog-create-{entity}")).ToBeVisibleAsync();
}
[TestMethod]
public async Task CreateForm_ValidData_Creates{Entity}Successfully()
{
// Arrange
await Page.GotoAsync("https://localhost:5001/{entities}/create");
// Act
await Page.FillAsync("#property1", "Test Value");
await Page.FillAsync("#property2", "100.50");
await Page.ClickAsync("button[type='submit']");
// Assert
await Expect(Page.Locator(".success-message")).ToBeVisibleAsync();
await Expect(Page).ToHaveURLAsync(new Regex(@"/{entities}/\w+"));
}
}
// Prefer text locators
await Page.ClickAsync("button:has-text('Submit')");
// Use test IDs for stability
await Page.ClickAsync("[data-testid='submit-button']");
// CSS selectors
await Page.FillAsync("#input-name", "value");
// ARIA roles
await Page.ClickAsync("role=button[name='Submit']");
// Wait for element to be visible
await Page.WaitForSelectorAsync(".element", new() { State = WaitForSelectorState.Visible });
// Wait for navigation
await Page.RunAndWaitForNavigationAsync(async () =>
{
await Page.ClickAsync("a[href='/page']");
});
// Wait for API response
await Page.RunAndWaitForResponseAsync(
response => response.Url.Contains("/api/{entities}") && response.Status == 200,
async () => await Page.ClickAsync("button[type='submit']"));
[TestMethod]
public async Task {Entity}Form_AccessibilityCheck_PassesAudit()
{
await Page.GotoAsync("https://localhost:5001/{entities}/create");
// Check for ARIA labels
var inputs = await Page.Locator("input").AllAsync();
foreach (var input in inputs)
{
var ariaLabel = await input.GetAttributeAsync("aria-label");
var labelFor = await input.GetAttributeAsync("id");
Assert.IsTrue(
!string.IsNullOrEmpty(ariaLabel) || !string.IsNullOrEmpty(labelFor),
"Input must have aria-label or associated label");
}
}
[TestMethod]
public async Task {Entity}Page_Screenshot_MatchesBaseline()
{
await Page.GotoAsync("https://localhost:5001/{entities}");
await Expect(Page).ToHaveScreenshotAsync("{entity}-page.png");
}
tests/
{ApplicationName}.UI.Tests/
Pages/
{Entity}PageTests.cs
Components/
{Entity}FormTests.cs
Workflows/
{Entity}ManagementWorkflowTests.cs