Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

browser test: wait for token request to finish before reloading #4618

Merged
merged 1 commit into from Oct 27, 2023

Conversation

minrk
Copy link
Member

@minrk minrk commented Oct 27, 2023

this may be the cause of flaky tests where there are no tokens to list

This might fix failures like this one in test_revoke_token[request_by_user]:

        if token_type in {"server_up", "request_by_user"}:
>           await expect(revoke_btns).to_have_count(1)
E           AssertionError: Locator expected to have count '1'
E           Actual value: 0 
E           Call log:
E           LocatorAssertions.to_have_count with timeout 5000ms

where the failure suggests that the token wasn't actually requested, and the logs appear to confirm that the request for a new token is not received by the server. My hunch is that awaiting the button click doesn't await the resulting fetch, and reloading the page prevents it from actually firing. A second option is that the javascript click event isn't hooked up before we trigger the click, so clicking doesn't do anything.

this may be the cause of flaky tests where there are no tokens to list
@consideRatio consideRatio merged commit f1a2f7d into jupyterhub:main Oct 27, 2023
17 of 18 checks passed
@minrk minrk deleted the flaky-browser branch October 27, 2023 17:59
@minrk
Copy link
Member Author

minrk commented Feb 6, 2024

@meeseeksdev backport to 4.x

meeseeksmachine pushed a commit to meeseeksmachine/jupyterhub that referenced this pull request Feb 6, 2024
minrk added a commit that referenced this pull request Feb 6, 2024
…8-on-4.x

Backport PR #4618 on branch 4.x (browser test: wait for token request to finish before reloading)
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.

None yet

2 participants