Skip to content

Conversation

@juanjol
Copy link

@juanjol juanjol commented Nov 17, 2025

JavaScript tests randomly fail with "Unable to determine if logged in"
errors. This happens because loggedIn() is called immediately after
clicking the login button, before the page redirect and DOM are fully
loaded. The issue is more frequent in CI environments like Jenkins.

Solution proposed

Added "waits ups to X seconds" after login submission to ensure the page transition completes:

  • Wait up to 3 seconds for URL to change (redirect started)
  • Wait up to 3 seconds for body element to appear (page loaded)

$submit->click();

// Wait for URL change after login (max 3 seconds).
$timeout = microtime(true) + 3;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this option needs to be configurable and should be set to 0 by default to allow users to opt-in.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants