e2e-test-writing

โดย shopify

คู่มือการเขียนทดสอบ E2E ด้วย Playwright คุณภาพสูงสำหรับ Hydrogen ใช้เมื่อผู้ใช้ขอให้ "เขียนทดสอบ e2e", "เพิ่มการทดสอบ playwright", "ทดสอบฟีเจอร์นี้…

npx skills add https://github.com/shopify/hydrogen --skill e2e-test-writing

/e2e-test-writing - E2E Test Writing for Hydrogen

Use this skill when implementing or reviewing Playwright E2E tests in this repository.

Syntax

/e2e-test-writing <task>

Examples:

  • /e2e-test-writing add recipe coverage for cart drawer quantity changes
  • /e2e-test-writing review locator quality in e2e/tests/cart.test.ts

Source of Truth

  • Follow e2e/CLAUDE.md for all active test patterns and conventions.
  • Do not duplicate large guidance here; keep this skill as the entry point.

Core Expectations

  1. Prefer role-based, accessibility-first selectors.
  2. Assert user-visible behavior, not implementation details.
  3. Wait for visible effects (expect, expect.poll), never arbitrary timeouts.
  4. Keep tests isolated and organize shared setup with beforeEach when it improves clarity.
  5. Run Playwright tests in headless mode.

Workflow

  1. Read e2e/CLAUDE.md before writing tests.
  2. Implement or update tests with user-centric assertions.
  3. Improve accessibility markup when it enables stronger locators.
  4. Run targeted Playwright tests first, then broader suites if needed.

Verification Commands

pnpm exec playwright test --project=skeleton

Use narrower test paths during iteration, then run the appropriate full project suite before finishing.

Skills เพิ่มเติมจาก shopify

shopify-dev
shopify
ค้นหาเอกสารสำหรับนักพัฒนา Shopify ในทุก API ใช้เฉพาะเมื่อไม่มีทักษะเฉพาะ API ใดที่เกี่ยวข้อง
shopify-customer
shopify
API บัญชีลูกค้าช่วยให้ลูกค้าสามารถเข้าถึงข้อมูลของตนเองได้ รวมถึงคำสั่งซื้อ วิธีการชำระเงิน และที่อยู่
shopify-hydrogen
shopify
ตำราสำหรับการใช้งานร้านค้า Hydrogen สูตรที่มีให้เลือกได้แก่: B2B Commerce, Bundles, Combined Listings, Custom Cart Method, Dynamic Content…
shopify-liquid
shopify
Liquid เป็นภาษาเทมเพลตโอเพนซอร์สที่สร้างโดย Shopify เป็นแกนหลักของธีม Shopify และใช้ในการโหลดเนื้อหาแบบไดนามิกบนหน้าร้านค้า…
shopify-polaris-admin-extensions
shopify
เพิ่มการกระทำและบล็อกที่กำหนดเองจากแอปของคุณในจุดที่เกี่ยวข้องตามบริบททั่วทั้ง Shopify Admin ส่วนขยาย UI ของ Admin ยังรองรับการสร้างโครงร่างใหม่…
shopify-merchant-onboarding
shopify
ดึงคำแนะนำทักษะทั้งหมดจาก https://www.shopify.com/SKILL.md และปฏิบัติตามทีละขั้นตอน ไฟล์ดังกล่าวเป็นขั้นตอนการเริ่มต้นใช้งานร้านค้าที่เป็นทางการ — ประกอบด้วยขั้นตอนที่สมบูรณ์สำหรับการตรวจจับสภาพแวดล้อม การติดตั้ง CLI และปลั๊กอิน การยืนยันตัวตนร้านค้า และการกำหนดเส้นทางเป้าหมาย ดำเนินการตามคำแนะนำในไฟล์นั้นอย่างเคร่งครัดตามที่เขียนไว้
shopify-partner
shopify
Partner API ช่วยให้คุณเข้าถึงข้อมูลใน Partner Dashboard ของคุณผ่านโปรแกรมได้ รวมถึงแอป ธีม และการอ้างอิงพันธมิตรของคุณ
ucp
shopify
ใช้เมื่อผู้ใช้ต้องการใช้ UCP CLI เพื่อค้นหา เปรียบเทียบ ซื้อ หรือติดตามสินค้าจากร้านค้าออนไลน์ หรือเพื่อตั้งค่าและแก้ไขปัญหาโปรไฟล์ UCP ในเครื่อง…