Appearance
Playwright E2E 実行コマンド一覧
Local 向け Playwright E2E の npm スクリプト一覧です。前提・fixture・トラブルシュートは Playwright E2E 実行ガイド を参照してください。
package.json の test:e2e* は 12 本です(セットアップ・fixture・レポート含む)。
共通の事前 export(fixture 必須 suite)
bash
export WP_ROOT="/Users/a/Local Sites/slotkouryaku/app/public"
export WP_CLI_BIN=/tmp/wp-cli-slotkouryaku # シェル alias は不可。用意手順は実行ガイド参照
export SLOT_KOURYAKU_E2E_FIXTURE=1
export PLAYWRIGHT_BASE_URL=http://slotkouryaku.localセットアップ・補助(3)
| コマンド | 内容 |
|---|---|
npm run test:e2e:install | Chromium をインストール |
npm run test:e2e:fixture | 有料記事 fixture CLI(WP-CLI) |
npm run test:e2e:report | 直近の HTML レポートを開く |
テスト実行(9)
| コマンド | 対象 |
|---|---|
npm run test:e2e | chromium 一式(smoke + access + member-registration。WP-CLI 必須) |
npm run test:e2e:headed | 上記を headed |
npm run test:e2e:ui | 上記を UI モード |
npm run test:e2e:paid-article-access | 有料記事 サイト内表示制御のみ |
npm run test:e2e:paid-article-access:headed | 同上 headed |
npm run test:e2e:member-registration | 会員登録〜メール確認(軽量)のみ |
npm run test:e2e:member-registration:headed | 同上 headed |
npm run test:e2e:paid-article-stripe | Stripe Checkout 通し(opt-in。通常 E2E には含まれない) |
npm run test:e2e:paid-article-stripe:headed | 同上 headed |
よく使う実行例
fixture 必須 suite(test:e2e / access / member-registration など)では、上の「共通の事前 export」を先に済ませてください。
bash
# 初回のみ
npm run test:e2e:install
# chromium 一式
PLAYWRIGHT_BASE_URL=http://slotkouryaku.local npm run test:e2e
# 会員登録のみ
npm run test:e2e:member-registration
# 有料記事 access のみ
npm run test:e2e:paid-article-access
# Stripe 通し(別 env が必要。方針は Stripe E2E ドキュメント参照)
npm run test:e2e:paid-article-stripe詳細ドキュメント
| 内容 | 正本 |
|---|---|
| 前提・Local 手順・アーティファクト | Playwright E2E 実行ガイド |
| 有料記事 fixture | 有料記事 E2E fixture 実行ガイド |
| Stripe 通しの前提・方針 | 有料記事 Stripe Checkout / Webhook E2E 方針 |