Skip to content

Commit 2733b32

Browse files
jongyoulclaude
andcommitted
fix(integration): wait for login modal to close before clicking UI elements
The Selenium test InterpreterModeActionsIT.testPerUserIsolatedAction fails intermittently because the login modal overlay remains visible after authentication, causing ElementClickInterceptedException when the test tries to click the user dropdown button. Wait for the modal to become invisible and remove any lingering backdrop via JavaScript before proceeding. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent 33214d4 commit 2733b32

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

zeppelin-integration/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,19 @@ protected void authenticationUser(String userName, String password) {
6161
By.xpath("//*[@id='loginModalContent']//button[contains(.,'Login')]"),
6262
MAX_BROWSER_TIMEOUT_SEC).click();
6363

64-
ZeppelinITUtils.sleep(1000, false);
64+
// Wait for the login modal to fully close before interacting with other elements
65+
WebDriverWait wait = new WebDriverWait(manager.getWebDriver(),
66+
Duration.ofSeconds(MAX_BROWSER_TIMEOUT_SEC));
67+
wait.until(ExpectedConditions.invisibilityOfElementLocated(By.id("loginModal")));
68+
69+
// Dismiss any lingering modal backdrop via JavaScript
70+
try {
71+
((JavascriptExecutor) manager.getWebDriver()).executeScript(
72+
"document.querySelectorAll('.modal-backdrop').forEach(e => e.remove());");
73+
} catch (Exception e) {
74+
// ignore if not ready
75+
}
76+
ZeppelinITUtils.sleep(500, false);
6577
}
6678

6779
protected void logoutUser(String userName) throws URISyntaxException {

0 commit comments

Comments
 (0)