Skip to content

test: wait for freeze pane dialog to close in spreadsheet ITs - #10028

Merged
sissbruecker merged 2 commits into
mainfrom
test/spreadsheet-wait-for-freeze-pane-dialog
Sep 7, 2026
Merged

test: wait for freeze pane dialog to close in spreadsheet ITs#10028
sissbruecker merged 2 commits into
mainfrom
test/spreadsheet-wait-for-freeze-pane-dialog

Conversation

@sissbruecker

Copy link
Copy Markdown
Member

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 test: fix flaky spreadsheet custom editor ITs #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 test: fix flaky spreadsheet custom editor ITs #9874, as it covers a real server round trip unrelated to the dialog

Type of change

  • Tests

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
sissbruecker marked this pull request as ready for review September 7, 2026 06:44

@vaadin-review-bot vaadin-review-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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>
@sonarqubecloud

sonarqubecloud Bot commented Sep 7, 2026

Copy link
Copy Markdown

@sissbruecker
sissbruecker added this pull request to the merge queue Sep 7, 2026
Merged via the queue into main with commit 083f3df Sep 7, 2026
22 checks passed
@sissbruecker
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>
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.

4 participants