Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

fixed flaky (#71405)

Sébastien178ecbaeef70
diff --git a/e2e/test/scenarios/embedding/sdk-iframe-embedding/sdk-iframe-embedding.cy.spec.ts b/e2e/test/scenarios/embedding/sdk-iframe-embedding/sdk-iframe-embedding.cy.spec.ts
index 09d9febc993..6293aca8f58 100644
--- a/e2e/test/scenarios/embedding/sdk-iframe-embedding/sdk-iframe-embedding.cy.spec.ts
+++ b/e2e/test/scenarios/embedding/sdk-iframe-embedding/sdk-iframe-embedding.cy.spec.ts
@@ -110,15 +110,20 @@ describe("scenarios > embedding > modular embedding", () => {
cy.wait("@getCardQuery");
frame.within(() => {
- // clientWidth excludes the scrollbar gutter, giving us the actual content area
+ // clientWidth excludes the scrollbar gutter, giving us the actual content area.
+ // Use .should() instead of .then() so Cypress retries until the
+ // async column-expansion cycle has finished painting.
H.tableInteractive()
.findByTestId("table-scroll-container")
- .then(($scrollContainer) => {
+ .should(($scrollContainer) => {
const contentWidth = $scrollContainer[0].clientWidth;
+ expect(contentWidth).to.be.greaterThan(0);
const $headerCells = $scrollContainer.find(
'[data-testid="header-cell"]',
);
+ expect($headerCells.length).to.be.greaterThan(0);
+
let totalHeaderWidth = 0;
$headerCells.each((_, el) => {
totalHeaderWidth += el.getBoundingClientRect().width;