Skip to content

[MINOR] Remove orphaned login modal backdrops before driving the navbar in Selenium tests - #5502

Open
voidmatcha wants to merge 1 commit into
apache:masterfrom
voidmatcha:fix/login-modal-orphan-backdrop
Open

voidmatcha wants to merge 1 commit into
apache:masterfrom
voidmatcha:fix/login-modal-orphan-backdrop

Conversation

@voidmatcha

Copy link
Copy Markdown
Member

What is this PR for?

After ZEPPELIN-6711, AuthenticationIT.testSimpleAuthentication still fails intermittently in test-selenium-with-spark-module-for-spark-3-5. #loginModal is already hidden, but when logoutUser clicks the navbar user menu, <div class="modal-backdrop fade"> intercepts the click.

Bootstrap 3.4.1 removes a backdrop through this.$backdrop. When the login modal is shown and hidden again while an earlier transition is still running, that reference is replaced and the earlier backdrop is never removed. It stays over the page at opacity 0 and intercepts every click, so the existing retry in logoutUser fails for the same reason.

dismissLoginModal() now removes .modal-backdrop elements that no displayed modal owns once the login modal is closed. An intercepted navbar click also logs the modal and backdrop state. The app-side behaviour that leaves the backdrop behind is not addressed here.

What type of PR is it?

Bug Fix

Todos

  • Remove backdrops that no displayed modal owns
  • Log the modal state when the navbar click is intercepted

What is the Jira issue?

How should this be tested?

./mvnw clean install -DskipTests -am -pl zeppelin-integration -Pweb-classic -Pintegration -Pspark-scala-2.12 -Pspark-3.5 -Pweb-dist
./mvnw verify -pl zeppelin-integration -Dit.test=AuthenticationIT -Dtest=none -Dsurefire.failIfNoSpecifiedTests=false -Pweb-classic -Pintegration -Pspark-scala-2.12 -Pspark-3.5 -Pweb-dist -Pusing-source-tree

I ran only AuthenticationIT on a fork, with the same build as the CI job:

Variant Runs Pass Fail
master + diagnostics only 30 17 13
this PR 100 100 0

All 13 failures logged the same state: loginModal=modal fade ng-scope display=none, backdrops=[modal-backdrop fade]. With this PR, 44 of the 100 runs logged and removed such a backdrop, and all passed.

Screenshots (if appropriate)

N/A

Questions:

  • Does the license files need to update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? No

@kimyenac

Copy link
Copy Markdown
Contributor

This fixes a regression from #5497 (ZEPPELIN-6711). Before #5497, authenticationUser removed .modal-backdrop unconditionally after login. #5497 moved that behind "#loginModal still displayed after 10s", and loginModalClosed only checks #loginModal itself, so an orphaned backdrop is no longer removed.

test-selenium-with-spark-module-for-spark-3-5 went from 0/39 failures (2026-09-20 to the #5497 merge) to 12/15 after it, all with the same modal-backdrop fade interception at AuthenticationIT.java:101, including every master push since.

Removing unowned backdrops once the modal is closed restores the cleanup I dropped, under the right condition. LGTM, thanks for tracking it down.

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.

2 participants