test: wait for freeze pane dialog to close in spreadsheet ITs - #10028
Merged
Conversation
The freeze pane dialog is modal and closes with an animation. Clicking a cell while it is still closing hits the overlay instead of the sheet, which left the selection on A1 and made the custom editor reject the programmatic focus from sendKeys, so the typed value was lost. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
sissbruecker
marked this pull request as ready for review
September 7, 2026 06:44
vaadin-review-bot
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed the changes — left 1 comment.
| Finding | |
|---|---|
| The new wait can itself throw StaleElementReferenceException, adding a new flake to a de-flaking PR |
…et ITs Co-authored-by: Sascha Ißbrücker <357820+sissbruecker@users.noreply.github.com>
|
DiegoCardoso
approved these changes
Sep 7, 2026
sissbruecker
deleted the
test/spreadsheet-wait-for-freeze-pane-dialog
branch
September 7, 2026 08:27
sissbruecker
added a commit
that referenced
this pull request
Sep 7, 2026
… (CP: 25.3) (#10038) This PR cherry-picks changes from the original PR #10028 to branch 25.3. --- #### Original PR description > ## Description > > Follow-up to #9874 > > `CustomEditorIT.customEditorAlwaysVisibleInFrozenCells_persistsValue` failed consistently > in a local run and is flaky in CI. The freeze pane dialog is modal and closes with an > animation of roughly 300 ms. `addFreezePane` returned as soon as the submit button was > clicked, so the next click on a cell landed on the still-closing overlay and was swallowed. > The sheet selection stayed on A1 after the freeze pane re-render, and the spreadsheet > rejects programmatic focus on a custom editor whose cell is not selected. The focus that > `sendKeys` gives the editor was bounced back to the sheet, and the typed value was lost. > > - Made both `addFreezePane` helpers in `AbstractSpreadsheetIT` wait until no `vaadin-dialog` has the `opened` or `closing` attribute before returning > - `DialogElement.isOpen()` is not enough because `opened` is already false while the closing animation runs > - Also covers `FreezePaneIT`, `PopupButtonIT` and `FormulaFormatIT`, which use the same helpers > - Removed the click-retry loop in `CustomEditorIT.performKeyboardTestsToCell` added by #9874 and restored the single click and assertion > - The loop only checked that the editor element exists, which is always true for always-visible editors, so it did not detect the lost click > - Both frozen-cell tests passed 4 of 4 consecutive runs with the single click once the dialog wait was in place > - Kept the focus wait in `assertEditorInCellIsFocused` from #9874, as it covers a real server round trip unrelated to the dialog > > ## Type of change > > - Tests > Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Sascha Ißbrücker <357820+sissbruecker@users.noreply.github.com>
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.



Description
Follow-up to #9874
CustomEditorIT.customEditorAlwaysVisibleInFrozenCells_persistsValuefailed consistentlyin a local run and is flaky in CI. The freeze pane dialog is modal and closes with an
animation of roughly 300 ms.
addFreezePanereturned as soon as the submit button wasclicked, so the next click on a cell landed on the still-closing overlay and was swallowed.
The sheet selection stayed on A1 after the freeze pane re-render, and the spreadsheet
rejects programmatic focus on a custom editor whose cell is not selected. The focus that
sendKeysgives the editor was bounced back to the sheet, and the typed value was lost.addFreezePanehelpers inAbstractSpreadsheetITwait until novaadin-dialoghas theopenedorclosingattribute before returningDialogElement.isOpen()is not enough becauseopenedis already false while the closing animation runsFreezePaneIT,PopupButtonITandFormulaFormatIT, which use the same helpersCustomEditorIT.performKeyboardTestsToCelladded by test: fix flaky spreadsheet custom editor ITs #9874 and restored the single click and assertionassertEditorInCellIsFocusedfrom test: fix flaky spreadsheet custom editor ITs #9874, as it covers a real server round trip unrelated to the dialogType of change