Skip to content

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

Fix flaky data-model field-description preview hovercard (#78284)

github-automation-metabase49716266bf11
diff --git a/e2e/support/helpers/e2e-datamodel-helpers.ts b/e2e/support/helpers/e2e-datamodel-helpers.ts
index 06bea6ea754..46664525fc6 100644
--- a/e2e/support/helpers/e2e-datamodel-helpers.ts
+++ b/e2e/support/helpers/e2e-datamodel-helpers.ts
@@ -805,7 +805,7 @@ function verifyTablePreview({
});
if (description != null) {
- cy.findByTestId("header-cell").realHover();
+ hoverHeaderCell();
}
});
@@ -814,6 +814,26 @@ function verifyTablePreview({
}
}
+// Open the preview's column-description hovercard. The hovercard opens on a
+// delayed `openDelay` timer, and a single one-shot `realHover()` can miss it:
+// after `cy.wait("@dataset")` the table re-renders on a microtask (fetch
+// resolution) and Chrome v133+ headless hit-tests CDP mouse events
+// differently, either of which drops the hover and cancels the open timer,
+// leaving the hovercard permanently absent for that attempt. Re-query the cell
+// for each dispatch so the events land on the post-render DOM node, and fire
+// both `mouseover` (bubbles → React 18 synthetic onMouseEnter for any wrapper)
+// and `mouseenter` (for native useEventListener handlers Mantine attaches
+// directly to the cell).
+function hoverHeaderCell() {
+ const headerCell = () =>
+ cy
+ .findByTestId("header-cell")
+ .findByTestId("cell-data")
+ .should("be.visible");
+ headerCell().trigger("mouseenter", { force: true });
+ headerCell().trigger("mouseover", { force: true });
+}
+
function verifyObjectDetailPreview({
rowNumber,
row,