Closed karuppusamy-blunav closed 1 month ago
FWIW this is the fix I'm using just to get the tests passing. Just bump the height of the containers by 1px:
cy.get(".ag-theme-my-theme").then(($el) => {
const tableElement = $el[0].querySelector(".ag-root")
if (!tableElement) {
return
}
const centerEl = tableElement.querySelector<HTMLDivElement>(
".ag-center-cols-container",
)
const pinnedEl = tableElement.querySelector<HTMLDivElement>(
".ag-pinned-left-cols-container",
)
if (centerEl) {
const centerHeight = Number(centerEl.style.height.replace(/px$/, ""))
centerEl.style.height = `${centerHeight + 1}px`
}
if (pinnedEl) {
const pinnedHeight = Number(pinnedEl.style.height.replace(/px$/, ""))
pinnedEl.style.height = `${pinnedHeight + 1}px`
}
})
There's probably a more succinct way to do this with jQuery.
FWIW this is the fix I'm using just to get the tests passing. Just bump the height of the containers by 1px:
cy.get(".ag-theme-my-theme").then(($el) => { const tableElement = $el[0].querySelector(".ag-root") if (!tableElement) { return } const centerEl = tableElement.querySelector<HTMLDivElement>( ".ag-center-cols-container", ) const pinnedEl = tableElement.querySelector<HTMLDivElement>( ".ag-pinned-left-cols-container", ) if (centerEl) { const centerHeight = Number(centerEl.style.height.replace(/px$/, "")) centerEl.style.height = `${centerHeight + 1}px` } if (pinnedEl) { const pinnedHeight = Number(pinnedEl.style.height.replace(/px$/, "")) pinnedEl.style.height = `${pinnedHeight + 1}px` } })
There's probably a more succinct way to do this with jQuery.
Thanks for the solution, it was working as expected! I have attached the simplified version of it.
cy.get("#ag-grid").within(() => {
cy.get(".ag-center-cols-container").then((el) => {
el.height((_i, h) => h + 1);
});
cy.get(".ag-pinned-left-cols-container").then((el) => {
el.height((_i, h) => h + 1);
});
});
Expected Behavior
The getAgGridData function should return data for all the rows in a table.
Current Behavior
While running the provided command, the getAgGridData function fails to include the last row of the table.
cy.get("#ag-grid").getAgGridData()
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
Failure Information
I have conducted further analysis and discovered that the
isRowNotDestroyed
filter is failing for the last row. Specifically, the conditionrect.bottom <= viewPortRect.bottom
within theisRowNotDestroyed
function is not holding true for the last row.The values of the
rect.bottom
andviewPortRect.bottom
are,