Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

phoenix-playwright-tests

БесплатноБез исполняемых скриптовНе проверен

Write Playwright E2E tests for the Phoenix AI observability platform. Use when creating, updating, or debugging Playwright tests, or when the user asks about…

Arize-aiот Arize-ai★ 12 510 звёзд на GitHub

Об этом скилле

Phoenix Playwright Test Writing

Write end-to-end tests for Phoenix using Playwright. Tests live in js/app/tests/ and follow established patterns.

Timeout Policy

  • Do not pass timeout args in test code under js/app/tests.
  • Tune timing centrally in js/app/playwright.config.ts (global timeout, expect.timeout, use.navigationTimeout, and webServer.timeout).

Quick Start

import { expect, test } from "@playwright/test";
import { randomUUID } from "crypto";

test.describe("Feature Name", () => {
  test.beforeEach(async ({ page }) => {
    await page.goto(`/login`);
    await page.getByLabel("Email").fill("admin@localhost");
    await page.getByLabel("Password").fill("admin123");
    await page.getByRole("button", { name: "Log In", exact: true }).click();
    await page.waitForURL("**/projects");
  });

  test("can do something", async ({ page }) => {
    // Test implementation
  });
});

Test Credentials

User Email Password Role
Admin admin@localhost admin123 admin
Member [email protected] member123 member
Viewer [email protected] viewer123 viewer

Selector Patterns (Priority Order)

  1. Role selectors (most robust):

    page.getByRole("button", { name: "Save" });
    page.getByRole("link", { name: "Datasets" });
    page.getByRole("tab", { name: /Evaluators/i });
    page.getByRole("menuitem", { name: "Edit" });
    page.getByRole("cell", { name: "my-item" });
    page.getByRole("heading", { name: "Title" });
    page.getByRole("dialog");
    page.getByRole("textbox", { name: "Name" });
    page.getByRole("combobox", { name: /mapping/i });
    
  2. Label selectors:

    page.getByLabel("Email");
    page.getByLabel("Dataset Name");
    page.getByLabel("Description");
    
  3. Text selectors:

    page.getByText("No evaluators added");
    page.getByPlaceholder("Search...");
    
  4. Test IDs (when available):

    page.getByTestId("create-dataset-button");
    // element with state — select the stable id, filter on the data attribute
    page.locator('[data-testid="llm-evaluator-form-submit-button"][data-mode="create"]');
    

    data-testids are scoped, fully spelled out (...-button, never ...-btn), and constant regardless of state — state is exposed via a sibling data-* attribute (data-mode, data-state, …), so never key a getByTestId off a value that only exists in one mode. If you need a data-testid that doesn't exist yet, add it following references/test-ids.md in the phoenix-frontend skill (pattern: <scope>-<subject>-<role>).

  5. CSS locators (last resort):

    page.locator('button:has-text("Save")');
    

Common UI Patterns

Dropdown Menus

// Click button to open dropdown
await page.getByRole("button", { name: "New Dataset" }).click();
// Select menu item
await page.getByRole("menuitem", { name: "New Dataset" }).click();

Nested Menus (Submenus)

// Open menu, hover over submenu trigger, click submenu item
await page.getByRole("button", { name: "Add evaluator" }).click();
await page
  .getByRole("menuitem", { name: "Use LLM evaluator template" })
  .hover();
await page.getByRole("menuitem", { name: /correctness/i }).click();

// IMPORTANT: Always use getByRole("menuitem") for submenu items, not getByText()
// Playwright's auto-waiting handles the submenu appearance timing
// ❌ BAD - flaky in CI:
// await page.getByText("ExactMatch").first().click();
// ✅ GOOD - reliable:
// await page.getByRole("menuitem", { name: /ExactMatch/i }).click();

Dialogs/Modals

// Wait for dialog
await expect(page.getByRole("dialog")).toBeVisible();
// Fill form in dialog
await page.getByLabel("Name").fill("test-name");
// Submit
await page.getByRole("button", { name: "Create" }).click();
// Wait for close
await expect(page.getByRole("dialog")).not.toBeVisible();

Tables with Row Actions

// Find row by cell content
const row = page.getByRole("row").filter({
  has: page.getByRole("cell", { name: "item-name" }),
});
// Click action button in row (usually last button)
await row.getByRole("button").last().click();
// Select action from menu
await page.getByRole("menuitem", { name: "Edit" }).click();

Tabs

await page.getByRole("tab", { name: /Evaluators/i }).click();
await page.waitForURL("**/evaluators");
await expect(page.getByRole("tab", { name: /Evaluators/i })).toHaveAttribute(
  "aria-selected",
  "true",
);

Form Inputs in Sections

// When multiple textboxes exist, scope to section
const systemSection = page.locator('button:has-text("System")');
const systemTextbox = systemSection
  .locator("..")
  .locator("..")
  .getByRole("textbox");
await systemTextbox.fill("content");
Полный SKILL.md на GitHub

Установить phoenix-playwright-tests в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

EXAMPLES.mdUI-COMPONENTS.md

FAQ

Что делает скилл phoenix-playwright-tests?

Write Playwright E2E tests for the Phoenix AI observability platform. Use when creating, updating, or debugging Playwright tests, or when the user asks about testing UI features, writing E2E tests, or automating browser interactions for Phoenix.

Как установить скилл phoenix-playwright-tests?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл phoenix-playwright-tests запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить phoenix-playwright-tests с