Skip to content

testing: cover modal, dialog, select, and dropdown behavior#370

Merged
RtlZeroMemory merged 3 commits intomainfrom
feature/testing-modal-dialog-focus-behavior
Apr 14, 2026
Merged

testing: cover modal, dialog, select, and dropdown behavior#370
RtlZeroMemory merged 3 commits intomainfrom
feature/testing-modal-dialog-focus-behavior

Conversation

@RtlZeroMemory
Copy link
Copy Markdown
Owner

@RtlZeroMemory RtlZeroMemory commented Apr 14, 2026

Summary

  • cover app-level modal, dialog, select, and dropdown behavior in one reviewable landing PR after the earlier stacked branch was collapsed
  • cover dialog escape close with focus restore and stacked modal focus restoration through useModalStack(...)
  • cover select keyboard progression with disabled-option skipping and dropdown outside-click close while retaining existing item-click coverage

Families Covered

  • modal
  • dialog
  • useModalStack
  • select
  • dropdown

Tests Added, Rewritten, Removed

  • added app-level tests in packages/core/src/app/__tests__/widgetBehavior.contracts.test.ts for dialog escape close + focus restore, stacked modal focus restoration, select keyboard progression, and dropdown outside-click close
  • rewrote no existing tests in this PR
  • removed no tests in this PR because the retained lower-level modal, hook, shared-scenario, and dropdown routing suites still protect distinct contracts

Implementation Bugs Fixed

  • none; the behavior-first tests passed once added

Commands Run

  • ./node_modules/.bin/tsc -b packages/core/tsconfig.json --pretty false
  • node --test packages/core/dist/app/__tests__/widgetBehavior.contracts.test.js packages/core/dist/app/__tests__/widgetRenderer.integration.test.js packages/core/dist/testing/__tests__/referenceScenario.semantic.test.js packages/core/dist/widgets/__tests__/modalStack.hook.test.js packages/core/dist/widgets/__tests__/modal.focus.test.js packages/core/dist/widgets/__tests__/dropdown.position.test.js packages/core/dist/runtime/__tests__/overlayUnification.test.js

Unresolved Areas Left Explicit

  • broader mixed overlay pointer ownership remains separate from the focus/close paths covered here
  • dropdown shortcut behavior and long-menu visible-window behavior remain protected by retained lower-level tests rather than new app-level assertions
  • tree lazy-load failure presentation remains under-specified and was not forced into this PR

Dependency Note

  • none; #369 is already merged and this branch already absorbed the previously stacked select/dropdown slice

#Closes 346
#Closes 345

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 14, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9e0518b0-4078-42b6-8dee-1cd79c0d91eb

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/testing-modal-dialog-focus-behavior

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.

…pdown-behavior

testing: cover select and dropdown behavior
@RtlZeroMemory RtlZeroMemory changed the title testing: cover modal and dialog focus behavior testing: cover modal, dialog, select, and dropdown behavior Apr 14, 2026
@RtlZeroMemory RtlZeroMemory changed the base branch from feature/testing-input-textarea-behavior to main April 14, 2026 14:48
@RtlZeroMemory RtlZeroMemory merged commit 9df8069 into main Apr 14, 2026
34 checks passed
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.

1 participant