Command Palette

Search for a command to run...

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

source-command-e2e

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

Migrated source command `e2e`

databaytот databayt★ 19 звёзд на GitHub

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

source-command-e2e

Use this skill when the user asks to run the migrated source command e2e.

Command Template

E2E Command - End-to-End Test Generation

Generate comprehensive E2E tests for user workflows using Playwright

Usage

/e2e [workflow|page|feature] [options]

Examples

/e2e student-enrollment           # Generate enrollment flow tests
/e2e /lab                   # Generate lab interaction tests
/e2e login --multi-tenant         # Test multi-tenant login flows
/e2e payment --all-scenarios      # Generate payment scenarios

Process

1. Workflow Analysis

  • Identify user journey steps
  • Map page transitions
  • Detect form interactions
  • Find API calls
  • Determine assertions needed

2. Test Generation Strategy

User Flow Template

// e2e/student-enrollment.spec.ts
import { expect, test } from "@playwright/tests"

import { loginAs } from "./helpers/auth"
import { fillStudentForm } from "./helpers/forms"

test.describe("Student Enrollment Flow", () => {
  test.beforeEach(async ({ page }) => {
    // Setup: Login as admin
    await loginAs(page, "admin")
    await page.goto("/students")
  })

  test("should enroll new student successfully", async ({ page }) => {
    // Step 1: Navigate to enrollment
    await page.click("text=Add Student")
    await expect(page).toHaveURL("/students/new")

    // Step 2: Fill student information
    await fillStudentForm(page, {
      name: "Harry Potter",
      email: "[email protected]",
      dateOfBirth: "1980-07-31",
      yearLevel: "1",
      guardianEmail: "[email protected]",
    })

    // Step 3: Submit and verify
    await page.click('button:has-text("Enroll Student")')

    // Wait for success message
    await expect(page.locator('[role="alert"]')).toContainText(
      "Student enrolled successfully"
    )

    // Verify redirect
    await expect(page).toHaveURL(/\/students\/[a-z0-9]+/)

    // Verify student appears in list
    await page.goto("/students")
    await expect(page.locator("text=Harry Potter")).toBeVisible()
  })

  test("should validate required fields", async ({ page }) => {
    await page.click("text=Add Student")

    // Submit empty form
    await page.click('button:has-text("Enroll Student")')

    // Check validation messages
    await expect(page.locator("text=Name is required")).toBeVisible()
    await expect(page.locator("text=Email is required")).toBeVisible()
    await expect(page.locator("text=Year level is required")).toBeVisible()
  })

  test("should handle duplicate email", async ({ page }) => {
    // Attempt to enroll with existing email
    await page.click("text=Add Student")
    await fillStudentForm(page, {
      name: "Ron Weasley",
      email: "[email protected]", // Already exists
      yearLevel: "1",
    })

    await page.click('button:has-text("Enroll Student")')

    // Check error message
    await expect(page.locator('[role="alert"]')).toContainText(
      "Email already registered"
    )
  })
})

3. Page Object Model

Generate Page Objects

// pages/StudentPage.ts
export class StudentPage {
  constructor(private page: Page) {}

  async navigateToList() {
    await this.page.goto("/students")
  }

  async clickAddStudent() {
    await this.page.click("text=Add Student")
  }

  async fillForm(data: StudentData) {
    await this.page.fill('[name="name"]', data.name)
    await this.page.fill('[name="email"]', data.email)
    await this.page.selectOption('[name="yearLevel"]', data.yearLevel)

    if (data.guardianEmail) {
      await this.page.fill('[name="guardianEmail"]', data.guardianEmail)
    }
  }

  async submitForm() {
    await this.page.click('button[type="submit"]')
  }

  async verifyStudentInList(name: string) {
    await expect(this.page.locator(`text=${name}`)).toBeVisible()
  }

  async searchStudent(query: string) {
    await this.page.fill('[placeholder="Search students..."]', query)
    await this.page.press('[placeholder="Search students..."]', "Enter")
  }
}

4. Multi-Tenant E2E Tests

test.describe("Multi-Tenant Student Management", () => {
  test("should isolate data between schools", async ({ browser }) => {
    // Create two contexts for different schools
    const school1Context = await browser.newContext({
      baseURL: "https://gryffindor.databayt.org",
    })
    const school2Context = await browser.newContext({
      baseURL: "https://slytherin.databayt.org",
    })

    const page1 = await school1Context.newPage()
    const page2 = await school2Context.newPage()

    // Login to both schools
    await loginAs(page1, "[email protected]")
    await loginAs(page2, "[email protected]")

    // Create student in school1
    await page1.goto("/students/new")
    await fillStudentForm(page1, {
      name: "Harry Potter",
      email: "[email protected]",
    })
    await page1.click('button:has-text("Enroll")')

    // Verify student NOT visible in school2
    a
Полный SKILL.md на GitHub

Установить source-command-e2e в Claude Code и Claude Desktop

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

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

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

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

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

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

FAQ

Что делает скилл source-command-e2e?

Migrated source command `e2e`

Как установить скилл source-command-e2e?

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

Скилл source-command-e2e запускает скрипты?

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

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

Сравнить source-command-e2e с