Skip to content

test: cover cell content attach and detach on column add/remove#12181

Merged
vursen merged 3 commits into
mainfrom
test-grid-cell-content-attach-detach
Jul 17, 2026
Merged

test: cover cell content attach and detach on column add/remove#12181
vursen merged 3 commits into
mainfrom
test-grid-cell-content-attach-detach

Conversation

@vursen

@vursen vursen commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

When a column is removed, the grid also removes the column's <vaadin-grid-cell-content> elements from its light DOM, and adds them back when the column is added again. This behavior wasn't covered by tests for header and footer cells. The declarative header/footer rendering refactor changes how header and footer cell content is managed, so this adds tests to lock in the current behavior first.

Extracted from #12134

Part of #10789


🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

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

Copy link
Copy Markdown

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 three should remove ... cell content tests duplicate boilerplate instead of reusing the forEach-over-sections pattern already in this file.

Comment thread packages/grid/test/column.test.js Outdated
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vursen
vursen requested a review from web-padawan July 17, 2026 13:27
Comment thread packages/grid/test/column.test.js Outdated
let content;

beforeEach(() => {
if (sectionName === 'header') {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: could use switch (sectionName) here with body as default I guess.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 261e04b.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@vursen
vursen merged commit b94dbff into main Jul 17, 2026
12 checks passed
@vursen
vursen deleted the test-grid-cell-content-attach-detach branch July 17, 2026 13:45
@vaadin-bot

Copy link
Copy Markdown
Collaborator

This ticket/PR has been released with Vaadin 25.3.0-alpha6.

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