Skip to content

Fix modal overlay dismissal in QMS tests#11

Open
ArtyomSavchenko wants to merge 2 commits into
developfrom
claude/kind-noether-hxq5tr
Open

Fix modal overlay dismissal in QMS tests#11
ArtyomSavchenko wants to merge 2 commits into
developfrom
claude/kind-noether-hxq5tr

Conversation

@ArtyomSavchenko

Copy link
Copy Markdown
Member

Summary

Enhanced the closeNewMessagePopup method to properly handle multiple stacked modal overlays that can remain open after adding a message, which was causing subsequent clicks to time out.

Key Changes

  • Added a loop to repeatedly press Escape until all modal overlays are dismissed (max 5 attempts)
  • Added explicit wait for the first overlay to detach after each Escape key press
  • Added a final assertion to verify no overlays remain before proceeding
  • Improved code comments explaining why multiple dismissals are necessary

Implementation Details

The previous implementation only pressed Escape once, which was insufficient when multiple modal popups were stacked. Each overlay intercepts pointer events, so lingering overlays would cause subsequent click actions to time out. The new implementation:

  • Checks the count of modal overlays before attempting dismissal
  • Waits for the topmost overlay to detach with a 1-second timeout
  • Includes error handling to continue even if the wait times out
  • Performs a final validation that all overlays are gone before the method completes

https://claude.ai/code/session_012JGaU2EosGSuqyQCss1rh1

The TESTS-206 test intermittently timed out clicking buttonComments because a
modal-overlay from the add-message popup remained and intercepted pointer
events. Escape only closes the topmost popup, so a single Escape + click left a
second overlay behind when more than one popup was open.

Dismiss popups in a loop until no modal-overlay remains and assert it is gone
before returning, so subsequent clicks are not blocked.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012JGaU2EosGSuqyQCss1rh1
@ArtyomSavchenko ArtyomSavchenko marked this pull request as draft July 13, 2026 07:00
Signed-off-by: Artem Savchenko <armisav@gmail.com>
@ArtyomSavchenko ArtyomSavchenko marked this pull request as ready for review July 15, 2026 04:05
@ArtyomSavchenko ArtyomSavchenko changed the title Fix modal overlay dismissal in closeNewMessagePopup Fix modal overlay dismissal in QMS tests Jul 15, 2026
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.

3 participants