Skip to content
Snippets Groups Projects
Unverified Commit bdb688af authored by Nemanja Glumac's avatar Nemanja Glumac Committed by GitHub
Browse files

#15106 Repro: "Dirty" query fails when sandboxing on linked table column with...

#15106 Repro: "Dirty" query fails when sandboxing on linked table column with multiple dimensions and remapping (#15141)
parent da7ce40d
Branches
Tags
No related merge requests found
......@@ -2,6 +2,7 @@ import {
describeWithToken,
openOrdersTable,
openPeopleTable,
openReviewsTable,
popover,
modal,
restore,
......@@ -17,6 +18,7 @@ const {
ORDERS_ID,
PRODUCTS,
PRODUCTS_ID,
REVIEWS,
REVIEWS_ID,
PEOPLE,
PEOPLE_ID,
......@@ -972,6 +974,63 @@ describeWithToken("formatting > sandboxes", () => {
cy.contains("37.65");
});
it.skip("unsaved/dirty query should work on linked table column with multiple dimensions and remapping (metabase#15106)", () => {
cy.server();
cy.route("POST", "/api/dataset").as("dataset");
remapDisplayValueToFK({
display_value: ORDERS.USER_ID,
name: "User ID",
fk: PEOPLE.NAME,
});
// Remap REVIEWS.PRODUCT_ID Field Type to ORDERS.ID
cy.request("PUT", `/api/field/${REVIEWS.PRODUCT_ID}`, {
table_id: REVIEWS_ID,
special_type: "type/FK",
name: "PRODUCT_ID",
fk_target_field_id: ORDERS.ID,
display_name: "Product ID",
});
cy.sandboxTable({
table_id: ORDERS_ID,
attribute_remappings: {
attr_uid: ["dimension", ["field-id", ORDERS.USER_ID]],
},
});
cy.sandboxTable({
table_id: PEOPLE_ID,
attribute_remappings: {
attr_uid: ["dimension", ["field-id", PEOPLE.ID]],
},
});
cy.sandboxTable({
table_id: REVIEWS_ID,
attribute_remappings: {
attr_uid: [
"dimension",
[
"fk->",
["field-id", REVIEWS.PRODUCT_ID],
["field-id", ORDERS.USER_ID],
],
],
},
});
cy.signOut();
cy.signInAsSandboxedUser();
openReviewsTable();
cy.wait("@dataset").then(xhr => {
expect(xhr.response.body.error).not.to.exist;
});
// Add positive assertion once this issue is fixed
});
});
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment