Skip to content

test(web-e2e): adapt tests to certified devices json - #267

Merged
gurezo merged 4 commits into
mainfrom
test/issue-258-certified-devices-tests
Sep 12, 2026
Merged

gurezo merged 4 commits into
mainfrom
test/issue-258-certified-devices-tests

Conversation

@gurezo

@gurezo gurezo commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Summary

Certified Devices JSON をデータソースにした後も、unit / E2E が外部ネットワークに依存せず安定して検証できるようにしました。

  • libs-data-access の Device ID resolver に remoteDevices alias の parse テストを追加
  • E2E 用の Certified Devices JSON fixture と page.route mock を追加
  • 既存 E2E を fixture 依存へ載せ替え、壊れていた Nx 雛形 spec を削除
  • 一覧・検索・詳細・Example なし・JSON 取得エラーの導線を E2E でカバー

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Chore (build/test/ci)
  • Breaking change

Related issues

What changed?

  • parseCertifiedAliases が remoteDevices を取り出せることを unit test で検証
  • apps/web-e2e/src/fixtures/certified-devices.json を追加し、本番 GitHub JSON への fetch を Playwright で差し替え
  • 既存の Device ID 互換 / Platform 別 Example E2E を fixture ベースに移行
  • 一覧表示、検索、詳細、Example なしデバイス、JSON 取得エラー UI の E2E を追加
  • 壊れていた apps/web-e2e/src/example.spec.ts を削除

API / Compatibility

  • Public API changes (export / function signature / behavior)
    • Details:
  • This change is backward compatible
  • This change introduces a breaking change
    • Migration notes:

How to test

  1. pnpm nx test libs-data-access
  2. pnpm nx e2e web-e2e
  3. pnpm nx affected -t lint,build,test --base=main

E2E 実行時、ブラウザが raw.githubusercontent.com の本番 devices.json を取得せず、ローカル fixture を使うことを確認してください。

Environment (if relevant)

  • Browser: Chromium / Firefox / WebKit (Playwright)
  • OS: macOS
  • Node version: v24.16.0
  • pnpm version: 11.24.0

Checklist

  • I ran tests locally (if available)
  • I updated docs/README if needed
  • I considered error handling where relevant

Made with Cursor

gurezo and others added 4 commits September 12, 2026 16:54
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@gurezo
gurezo merged commit 707a908 into main Sep 12, 2026
5 checks passed
@gurezo
gurezo deleted the test/issue-258-certified-devices-tests branch September 12, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: unit / E2E test を新データソースへ対応する

1 participant