Skip to content

Unify manual source URL test IDs in intake UI and E2E selectors#62

Merged
sasazaki1994 merged 1 commit into
mainfrom
codex/-data-testid
May 13, 2026
Merged

Unify manual source URL test IDs in intake UI and E2E selectors#62
sasazaki1994 merged 1 commit into
mainfrom
codex/-data-testid

Conversation

@sasazaki1994

@sasazaki1994 sasazaki1994 commented May 13, 2026

Copy link
Copy Markdown
Owner

Motivation

  • The Manual Source URL intake UI and existing E2E/spec references used inconsistent data-testid values, so tests and documentation needed alignment.
  • The validation error indicator should be targetable by tests only when the form shows the specific manual-URL validation message.

Description

  • Updated the landing intake component src/features/landing/components/question-intake.tsx to set the textarea data-testid to manual-source-url-input and add a help text element with data-testid="manual-source-url-help".
  • Imported MANUAL_SOURCE_URLS_ERROR_MESSAGE and added a conditional data-testid="manual-source-url-error" on the form error paragraph when the error equals the manual-URL validation message.
  • Updated the Playwright test e2e/home.spec.ts to assert visibility of the new manual-source-url-input test id.
  • Updated specs/manual-source-url-intake.md to document the new data-testid values for input, help text, and validation error.

Testing

  • Ran pnpm typecheck which completed successfully.
  • Ran pnpm lint which completed successfully.

Codex Task

Summary by CodeRabbit

リリースノート

  • Tests

    • エンドツーエンドテストの検証ロジックを改善しました。
  • Chores

    • UI要素のテスト識別子を更新し、テストの信頼性と保守性を向上させました。

Review Change Stack

@sasazaki1994 sasazaki1994 merged commit dea72df into main May 13, 2026
1 check passed
@coderabbitai

coderabbitai Bot commented May 13, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 69f4bb31-22e3-4c6c-b1cf-fbc5eb5dfa1c

📥 Commits

Reviewing files that changed from the base of the PR and between 6b265b2 and 2029704.

📒 Files selected for processing (3)
  • e2e/home.spec.ts
  • specs/manual-source-url-intake.md
  • src/features/landing/components/question-intake.tsx

概要

手動ソースURL入力コンポーネントのテスト識別子が標準化されます。テキストエリアと関連するフォーム要素が単数形の data-testid 値に変更され、特定の検証エラーを対象とした条件付きエラーレンダリングが実装されます。

変更内容

手動ソースURL入力のテスト識別子

レイヤー / ファイル 概要
コンポーネントのテスト識別子
src/features/landing/components/question-intake.tsx
手動ソースURLsエラーメッセージ定数をインポートして使用し、ヘルプテキスト段落に data-testid を追加します。テキストエリアの data-testid を複数形から単数形に変更し、エラーメッセージが定数と一致する場合のみ data-testid="manual-source-url-error" を条件付きで適用します。
仕様とe2eテストの更新
specs/manual-source-url-intake.md, e2e/home.spec.ts
手動ソースURL入力の仕様ドキュメントとe2eホームページテストが、名前変更されたテスト識別子(テキストエリア、ヘルプテキスト、エラーメッセージ)を反映するように更新されます。

関連する可能性のあるPR

  • sasazaki1994/TraceMap#38: 両方のPRはランディング「手動ソースURL」入力のUI/テストカバレッジに関連しており、e2e/home.spec.tssrc/features/landing/components/question-intake.tsx のアサーションと data-testid 配線を変更しています。

推定レビュー時間

🎯 2 (Simple) | ⏱️ ~10 minutes

🐰 テスト識別子を整えて
単数形へと統一され
エラーメッセージも
しっかり区別 ✨
テストの未来、磨かれて

✨ 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 codex/-data-testid

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant