All skills
asyrafhussin avatar

/e2e-playwright-testing

@c03e38f

End-to-end testing with Playwright for web applications. Use when writing E2E tests, browser automation, form submission testing, or user flow testing. Triggers on "playwright", "e2e test", "browser test", "end-to-end", "form flow testing", or test files in tests/e2e/.

Use this Skill: https://skilld.dev/gh/asyrafhussin/agent-skills/e2e-playwright-testing

This session only. Nothing lands on disk.

rulesorg-mirror-routes.md

≈528 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Mirror Route Structure in Test Organization

Impact: MEDIUM (scalable test organization as app grows)

Organize E2E test files to mirror your application's route groups. This makes tests discoverable and scalable as features are added.

Incorrect

tests/e2e/specs/
  test1.spec.js          # What does this test?
  test2.spec.js          # No grouping
  all-tests.spec.js      # One giant file with 200 tests
  login-and-buy.spec.js  # Mixed concerns

Problems:

  • Can't find the test for a specific feature
  • Adding a new feature means figuring out which file to edit
  • One giant file causes merge conflicts
  • Mixed concerns make failures hard to diagnose

Correct

tests/e2e/specs/
  auth/
    login.spec.js
    register.spec.js
  customer/                    # matches role:customer routes
    egold/
      buy.spec.js
      sell.spec.js
      redeem.spec.js
      kyc-gate.spec.js
    gold-saving/
      new-agreement.spec.js
    special-trade-in/
      new-agreement.spec.js
    semantan-point/
      convert.spec.js
    team/
      member-profile.spec.js
  admin/                       # matches role:admin routes
    customers/
      kyc-approve.spec.js
    egold/
      approve-reject.spec.js
    pos-demo/
      transaction.spec.js
  management/                  # matches role:superadmin routes
    branches/
      create-edit.spec.js
    gold-price/
      add-price.spec.js
  ui/                          # cross-cutting concerns
    dark-mode.spec.js
    responsive.spec.js
    navigation.spec.js
    global-search.spec.js

Naming convention:

  • Folders match route prefixes (/admin/* → admin/)
  • Files match the feature or page name
  • ui/ folder for cross-cutting concerns (theme, responsive, navigation)
  • One describe block per file, focused on one page/feature

Reference: Playwright Docs — Test Organization

Source: SKILL.md on GitHub

No alerts16d4 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill provides a comprehensive set of best practices and patterns for writing reliable end-to-end tests using Playwright. It focuses on locator strategies, authentication reuse, form handling, and test organization. No security issues were detected.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at c03e38f. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 6 months ago
Other metadata
metadata
{
  "author": "Agent Skills Contributors",
  "version": "1.0.0",
  "playwrightVersion": "1.50+",
  "nodeVersion": "18+"
}

README badge

README badge for asyrafhussin/agent-skills/e2e-playwright-testing