From 357ecd76c29b36926ea47f3fcf4292e78d4f5995 Mon Sep 17 00:00:00 2001
From: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Date: Thu, 17 Feb 2022 15:34:06 +0100
Subject: [PATCH] Repro #20560: Shouldn't display filter action menu when
 clicking on a value in single-record view (#20579)

* Add repro for #20560

* Get only the popover element

* Avoid false positive assertion
---
 .../visualizations/object_detail.cy.spec.js     | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/frontend/test/metabase/scenarios/visualizations/object_detail.cy.spec.js b/frontend/test/metabase/scenarios/visualizations/object_detail.cy.spec.js
index 62a91d736ff..6190216bde6 100644
--- a/frontend/test/metabase/scenarios/visualizations/object_detail.cy.spec.js
+++ b/frontend/test/metabase/scenarios/visualizations/object_detail.cy.spec.js
@@ -1,4 +1,5 @@
-import { restore, popover } from "__support__/e2e/cypress";
+import { restore, popover, openPeopleTable } from "__support__/e2e/cypress";
+
 import { SAMPLE_DATABASE } from "__support__/e2e/cypress_sample_database";
 
 const { ORDERS, ORDERS_ID } = SAMPLE_DATABASE;
@@ -94,6 +95,20 @@ describe("scenarios > question > object details", () => {
       .parent()
       .contains("8");
   });
+
+  it.skip("should not offer drill-through on the object detail records (metabase#20560)", () => {
+    openPeopleTable({ limit: 2 });
+
+    cy.get(".Table-ID")
+      .contains("2")
+      .click();
+    cy.url().should("contain", "objectId=2");
+
+    cy.findByText("Domenica Williamson").click();
+    // Popover is blocking the city. If it renders, Cypress will not be able to click on "Searsboro" and the test will fail.
+    // Unfortunately, asserting that the popover does not exist will give us a false positive result.
+    cy.findByText("Searsboro").click();
+  });
 });
 
 function getFirstTableColumn() {
-- 
GitLab