diff --git a/frontend/test/metabase/scenarios/question/filter.cy.spec.js b/frontend/test/metabase/scenarios/question/filter.cy.spec.js index b2f1cc08508643003ef03696472ecc3c0f5a08ab..1a89b2331f1c2997a8c60c870b0e743f3d43b6fd 100644 --- a/frontend/test/metabase/scenarios/question/filter.cy.spec.js +++ b/frontend/test/metabase/scenarios/question/filter.cy.spec.js @@ -1,6 +1,7 @@ import { signInAsAdmin, restore, + openOrdersTable, openProductsTable, popover, withSampleDataset, @@ -159,4 +160,35 @@ describe("scenarios > question > filter", () => { }); }); }); + + it.skip("should filter based on remapped values (metabase#13235)", () => { + withSampleDataset(({ ORDERS, PRODUCTS }) => { + // set "Filtering on this field" = "A list of all values" + cy.request("PUT", `/api/field/${ORDERS.PRODUCT_ID}`, { + has_field_values: "list", + }); + // "Display values" = "Use foreign key" as `Product.Title` + cy.request("POST", `/api/field/${ORDERS.PRODUCT_ID}/dimension`, { + name: "Product ID", + type: "external", + human_readable_field_id: PRODUCTS.TITLE, + }); + + // Add filter as remapped Product ID (Product name) + openOrdersTable(); + cy.findByText("Filter").click(); + cy.get(".List-item-title") + .contains("Product ID") + .click(); + cy.get(".scroll-y") + .contains("Aerodynamic Linen Coat") + .click(); + cy.findByText("Add filter").click(); + + cy.log("**Reported failing on v0.36.4 and v0.36.5.1**"); + cy.get(".LoadingSpinner").should("not.exist"); + cy.findAllByText("148.23"); // one of the subtotals for this product + cy.findAllByText("Fantastic Wool Shirt").should("not.exist"); + }); + }); });