Skip to content

feat: enhance checkRows function to support row configuration for dynamic table rendering#21262

Draft
npapp-dev002 wants to merge 3 commits intodevelopfrom
feat/CXSPA-12378
Draft

feat: enhance checkRows function to support row configuration for dynamic table rendering#21262
npapp-dev002 wants to merge 3 commits intodevelopfrom
feat/CXSPA-12378

Conversation

@npapp-dev002
Copy link
Copy Markdown
Contributor

The previous version called cy.get('cx-table th').then(...) inside the rows.forEach loop — once per row. Cypress .then() callbacks are queued asynchronously. By the time the first callback executes, the synchronous forEach has already finished and rowIndex has reached its final value (e.g. 3 for all rows), so every assertion used the wrong row index.
The fix: cy.get('cx-table th').then(...) is called once, outside the rows loop. Inside the single .then() callback:

  1. The domIndexByLabel map is built synchronously from the real <th> elements.
  2. All row/column assertions are issued synchronously within that same callback, so rowIndex increments correctly in step with each row's assertions being queued into Cypress's command queue.

@github-actions github-actions Bot marked this pull request as draft March 19, 2026 08:30
@npapp-dev002 npapp-dev002 marked this pull request as ready for review March 19, 2026 08:30
@github-actions github-actions Bot marked this pull request as draft March 19, 2026 08:30
@npapp-dev002 npapp-dev002 marked this pull request as ready for review March 19, 2026 08:40
@github-actions
Copy link
Copy Markdown
Contributor

Merge Checks Failed

Please push a commit to re-trigger the build.
To push an empty commit you can use `git commit --allow-empty -m "Trigger Build"`

@github-actions
Copy link
Copy Markdown
Contributor

Merge Checks Failed

Please push a commit to re-trigger the build.
To push an empty commit you can use `git commit --allow-empty -m "Trigger Build"`

@github-actions github-actions Bot marked this pull request as draft March 19, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant