Skip to content

SWF(refactor): E2E ページオブジェクトのヘッダー・フッター初期化を基底クラスにまとめる - #810

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1795145865-e2e-site-page-base
Open

devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1795145865-e2e-site-page-base

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

E2E のページオブジェクト5つが同じ page・header・footer の初期化を重複して持っていたため、共通の基底クラス SitePage にまとめた。テストの挙動と spec の書き方は変わらない。

// tests/e2e/pages/site-page.ts
export class SitePage {
  readonly page: Page;
  readonly header: Header;
  readonly footer: Footer;
  constructor(page: Page) { /* header と footer を生成 */ }
}

// 例: About ページはコンストラクターごと不要になる
export class AboutPage extends SitePage { ... }
  • 継承するクラス: HomePage、AboutPage、ArticlePage、TagPage、NotFoundPage
  • RssFeedPage はヘッダーとフッターを持たないため、変更していない
  • 公開 API(page、header、footer などのプロパティ)は同じで、spec ファイルは変更していない
  • docs/e2e-testing.md のディレクトリ構成とページオブジェクトの一覧に site-page.ts を追記した

動作確認

このブランチで次のコマンドを実行した。

pnpm run lint

Result (93 files):
- 0 errors
- 0 warnings
- 2 hints

(hint 2件は既存の ESLint 設定にある includeIgnoreFile の非推奨の警告で、この PR とは関係ない)

pnpm run build:e2e のあと pnpm run test:e2e --project=chromium

  2 skipped
  70 passed (17.5s)

ビジュアルスナップショットのテスト3件を含め、すべて通った。スナップショットは更新していない。

試すコマンド: pnpm run build:e2e && pnpm run test:e2e --project=chromium

未確認: chromium 以外のブラウザのプロジェクトはローカルで実行していない(CI で確認する)。


Software Factory opened this PR for Daiki
Implemented in session Share Header/Footer setup in E2E page objects
Review with Devin · Open in Devin Desktop


Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access that start with 'Devin'.

  • Disable automatic comment, CI, and merge conflict monitoring

@coderabbitai

coderabbitai Bot commented Nov 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f26ef023-6431-4bae-90dc-3074208db2e2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
blog 5b5491f Commit Preview URL

Branch Preview URL
Nov 20 2026, 03:41 AM

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

QA結果: 合格

ページオブジェクトの共通化の前後で、E2Eの結果は同じでした。マージベース e693614b とPRのhead 5b5491fa で同じプロジェクトを実行し、テストごとの結果を比べました。

プロジェクト マージベース(成功 / スキップ) PR(成功 / スキップ)
Chromium 70 / 2 70 / 2
Firefox 48 / 24 48 / 24
Mobile Chrome 57 / 15 57 / 15
合計 175 / 41 175 / 41
  • 失敗とフレークはマージベースとPRのどちらでも0件です。テスト名、プロジェクト、期待する結果、最終の結果は、すべてのテストで一致しました。
  • playwright test --list は両方とも17ファイル・432件で、差分はありません。
  • 変更されたのはページオブジェクトの6ファイルと docs/e2e-testing.md だけです。アプリのコード、アサーション、セレクター、テスト名、スナップショット、スキップは変わっていません。
  • GitHubのCIでは、E2Eとフルページの見た目の回帰テストを含むチェックがすべて成功しています。

確認できなかったこと

  • WebKit と Mobile Safari のプロジェクト(合わせて216件)は、VMにブラウザーの依存がないため実行していません。
  • フルページの見た目の回帰テストはローカルでは実行せず、CIの結果だけを確かめました。
  • 画面の変更はないPRなので、ブラウザーでの手動操作と録画はしていません。

Written by Devin

This branch has not been deployed

No deployments
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.

0 participants