Repository navigation
test: wait for the file editor to take the save's answer before reloading - #6859
Merged
Merged
Conversation
…ding `test_a_retry_after_a_save_with_no_answer_keeps_the_typing_after_it[on]` reloaded as soon as Playwright saw the retried save's 200. The editor marks the save as settled only once its own `await` takes that answer, so a reload in between still found the save in flight, and the page asked before leaving. That prompt is the behavior #6787 intends for a save without an answer, so the test is what was wrong. It now waits until the editor clears its record of the file's unsettled work in this tab, the record that decides whether leaving asks, before it reloads. Refs #6858
Collaborator
Author
|
Merged at |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test_a_retry_after_a_save_with_no_answer_keeps_the_typing_after_it[on]reloaded the page as soon as Playwright saw the retried save's 200. The editor treats the save as in flight until its ownawaittakes that answer, so a reload in that gap correctly asked before leaving, and the test read['beforeunload'] == []. This is the prompt #6787 added for a save the editor has no answer for, so the product is right and the test needed the fix. Before it reloads, the test now waits until the editor clears its record of the file's unsettled work in this tab (tabStorekeyfile:notes-file:notes). That record is null exactly when the editor'sbeforeUnloadfinds nothing unsettled.Evidence
cirun 45123246324 onmainat39ee727dd:assert ['beforeunload'] == [], plus the teardown error that follows, because the test ended before consuming its expectedERR_FAILEDand 409.leaf-dev suite flake --copies 12onmainfailed 1 of 12 copies with the same assertion.fetchanswer by 500 ms. With it, the old test fails every run with CI's message and teardown error, and the new test passes both cases.--cpu-throttle 6.tests/model/test_suite_source.pypasses.Refs #6858 — automated triage