Skip to content

test(e2e): maps-coreと重複する既存E2Eを削除しwrapper-onlyに縮約#497

Merged
niryuu merged 2 commits into
masterfrom
495/remove-duplicate-e2e
Jun 10, 2026
Merged

test(e2e): maps-coreと重複する既存E2Eを削除しwrapper-onlyに縮約#497
niryuu merged 2 commits into
masterfrom
495/remove-duplicate-e2e

Conversation

@niryuu

@niryuu niryuu commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

概要

#495 の実装。maps-core E2E(表示・機能)と重複する embed の既存 E2E を削除し、embed E2E を wrapper-only + 統合スモーク1本 に縮約する。#491(maps-core 置き換え)の前準備であり、#496(embed 固有 E2E の追加)に続く削除フェーズ。

所在確認の根拠は #495 のコメント参照: #495 (comment)

変更内容

削除した spec(maps-core でカバー済み)

削除 maps-core 所在
e2e/map.spec.ts(2.1.1/2.1.2) map.spec.ts "render a canvas element" / "render tile content in upper half"
e2e/external-style.spec.ts(×2) external-style.spec.ts "render a map with external style URL" / "fetch the external style URL"
e2e/sample.spec.ts(helper sanity ×2) 対応なし。PR0 の暫定 sanity(ファイル冒頭に「充実したら削除してよい」と明記済)→ 削除。helper.ts 本体は #496 specs が使用するため残す

削除した孤立フィクスチャ(削除 spec 専用で他から未参照)

  • docs/e2e/nocontrol.html
  • docs/e2e/external-style.html
  • docs/e2e/data-key.html

basic.spec.ts の縮約

  • 旧 1.1 → 統合スモーク1本に slim 化(script タグ → auto-render → canvas 描画 の end-to-end 配線確認)
  • 旧 1.3(コンソールエラー無し)→ maps-core map.spec "should not produce application-level console errors" と重複 → 削除
  • 旧 1.4(アトリビューション Shadow DOM)→ maps-core attribution.spec と重複 → 削除
  • 旧 1.2(デフォルト中心 0,0)→ parse-atts 既定値由来の embed 固有挙動で maps-core に対応なし → data-attributes.spec.ts の「data-* 無し → 既定値」ケースへ移設

残る embed E2E(全て wrapper-only + smoke)

basic(smoke) / globals / auto-render / data-attributes / lazy-loading / cleanup / plugin / iframe / pmtiles

結果

メモ

Closes #495
Part of #411

Summary by CodeRabbit

  • Tests

    • E2Eテストを一本化し、スモークでスクリプト読み込み→自動描画→キャンバス表示を検証する構成に再構成しました。
    • data-* フォワーディングの既定値(中心座標が (0,0) になること)を検証するテストを追加しました。
    • 複数の既存E2Eテスト(マップ描画/外部スタイル/サンプル等)を削除しました。
  • Documentation

    • E2E向けのHTMLドキュメント群を削除しました。

maps-core E2E (display/feature) と重複する embed の既存 E2E を削除し、
embed E2E を wrapper-only に縮約する。

- 削除: map.spec.ts / external-style.spec.ts / sample.spec.ts
  (maps-core の map.spec / external-style.spec / attribution.spec でカバー済み。所在は #495 のコメント参照)
- 削除(孤立fixture): nocontrol.html / external-style.html / data-key.html
- basic.spec.ts: 1.1 を統合スモーク1本に slim 化 (script→auto-render→canvas)
- basic.spec.ts 1.2 (デフォルト中心0,0) は parse-atts 既定値由来の embed 固有挙動なので
  data-attributes.spec.ts へ移設

Refs #495, #411
@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6165721c-fdab-4153-809d-6a1f409ddcc7

📥 Commits

Reviewing files that changed from the base of the PR and between 2cfd5b5 and c22b599.

📒 Files selected for processing (1)
  • e2e/data-attributes.spec.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • e2e/data-attributes.spec.ts

📝 Walkthrough

Walkthrough

複数の既存 E2E テストファイルおよび E2E 用 HTML ドキュメントを削除し、embed 固有の統合スモーク(bundle → auto-render → canvas 表示確認)と data-* 属性未指定時の既定値検証に再構成しました。

Changes

E2E テスト体系の再構成:maps-core 重複排除と embed 固有スモークへの集約

Layer / File(s) Summary
統合スモークと既定値テストの残置・追加
e2e/basic.spec.ts, e2e/data-attributes.spec.ts
e2e/basic.spec.ts を複数ケースから単一の統合スモーク(script 読込 → auto-render → .geolonia / .geolonia canvas の可視性検証)へ簡略化。e2e/data-attributes.spec.ts に data-* 未指定時の既定中心座標(lat=0, lng=0)を確認するテストを追加。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • geolonia/embed#492: e2e/sample.spec.ts の削除と helper 周りの変更に関連する PR。
  • geolonia/embed#496: data-* フォワーディング/既定値に関する並行変更のある PR。
  • geolonia/embed#489: e2e/helper.tswaitForStyleLoad 等を追加する変更と重なりがある PR。

Suggested reviewers

  • smellman
  • yuiseki
  • sanak

Poem

🐇
小さな地図をひとつ描いたよ、
スモークの中でキャンバスが光る。
データ属性がなくても大丈夫、
中心は零(ぜろ)に帰る。
さあ、軽やかに次へ跳ぼう。

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR タイトルは、maps-core と重複する E2E テストを削除して embed を wrapper-only に縮約するというプルリクエストの主な目的を明確に示しており、変更内容を適切に要約しています。
Linked Issues check ✅ Passed プルリクエストは #495 の要件(重複する E2E テストの削除と wrapper-only への縮約)を完全に実装しており、削除対象の spec ファイル、孤立フィクスチャ、basic.spec.ts の縮約、embed 固有の統合スモークの保持など、すべての目的を達成しています。
Out of Scope Changes check ✅ Passed すべての変更は #495 の要件に直接関連する E2E テストの削除とファイルの縮約であり、スコープ外の変更は含まれていません。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 495/remove-duplicate-e2e

Comment @coderabbitai help to get the list of available commands and usage tips.

@niryuu niryuu self-assigned this Jun 8, 2026
@niryuu
niryuu requested a review from a team June 8, 2026 00:33

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@e2e/data-attributes.spec.ts`:
- Around line 51-52: The test uses toBeCloseTo(0, 0) for center.lat and
center.lng which is too coarse; update both assertions to a stricter precision
(e.g. toBeCloseTo(0, 5)) so the latitude/longitude default-forwarding
regressions are detected—modify the two expectations referencing center.lat and
center.lng in e2e/data-attributes.spec.ts accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8c8ab993-1979-45ab-9f5b-d7ece46ca6be

📥 Commits

Reviewing files that changed from the base of the PR and between 871f5bf and 2cfd5b5.

📒 Files selected for processing (8)
  • docs/e2e/data-key.html
  • docs/e2e/external-style.html
  • docs/e2e/nocontrol.html
  • e2e/basic.spec.ts
  • e2e/data-attributes.spec.ts
  • e2e/external-style.spec.ts
  • e2e/map.spec.ts
  • e2e/sample.spec.ts
💤 Files with no reviewable changes (6)
  • docs/e2e/external-style.html
  • docs/e2e/data-key.html
  • e2e/external-style.spec.ts
  • docs/e2e/nocontrol.html
  • e2e/map.spec.ts
  • e2e/sample.spec.ts

Comment thread e2e/data-attributes.spec.ts Outdated
toBeCloseTo(0, 0) は許容±0.5 で粗く、既定転送のリグレッションを取りこぼす。
既定値は厳密に 0 なので精度 5 に厳密化。

Refs #495

@yuiseki yuiseki left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

#496 に続く削除フェーズ、ありがとうございます。#495 の所在確認コメントを根拠に1件ずつ maps-core の対応テストへ紐づけてあり、削除の判断過程が追えるのがとても良いです。

特に良かった点:

  • 旧 1.2(デフォルト中心 0,0)を単純削除せず data-attributes.spec.ts の「data-* 無し → 既定値」へ移設し、さらに精度を toBeCloseTo(0, 0)toBeCloseTo(0, 5) に厳格化しているところ。embed 固有(parse-atts の既定値由来)の挙動を wrapper-only 側で正しく残せています。
  • 削除した spec(map の tile 描画 / attribution / console error)が maps-core 側のどのテストに対応するかを表で明示している点。
  • sample.spec が「充実したら削除してよい」と自己申告していた PR0 sanity なので、削除が筋に合っています。

1点、非ブロッキングの指摘です(ご判断にお任せします):

external-style.spec.ts の削除で、data-style に外部スタイル URL を渡したときのフォワーディング/解決パスの E2E カバレッジが無くなります。

  • 判定ロジック isGeoloniaStyleCheck 自体は keyring.test.ts でユニット担保済み
  • data-stylestyle オプションの転送は parse-atts.ts...container.dataset でジェネリックに行われる(lat/lng と同機構)

なので低リスクではあるのですが、parse-atts.test.ts は既定の geolonia/basic-v2 しか検証しておらず、「data-style=外部 URL → isGeoloniaStyle=false で外部スタイルとして転送される」という embed 固有の組み合わせを直接押さえたテストは、この PR 後どこにも残りません。これは embed の責任分担「wrapper = data-* フォワーディング」にまさに該当する箇所なので、data-attributes.spec.ts に lat/lng と同様の data-style フォワーディングケースを1件足すか、parse-atts.test.ts に外部 style のアサーションを足しておくと、削除フェーズで取りこぼしが無くなると思います。本 PR で対応しても、別 issue にしても構いません。

削除自体は妥当で CI もグリーンなので approve します 🙌

@yuiseki
yuiseki requested a review from a team June 8, 2026 06:58

@smellman smellman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!
一旦取り入れて問題無いと思います。

@niryuu
niryuu merged commit 35d26ba into master Jun 10, 2026
11 checks passed
@niryuu
niryuu deleted the 495/remove-duplicate-e2e branch June 10, 2026 04:18
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.

maps-coreと重複する既存E2Eテストを削除する

3 participants