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

#17777 Repro: Hiding all tables in data model removes them from the permissions page (#17779)

parent 6561cda1
No related branches found
No related tags found
No related merge requests found
import { restore, popover } from "__support__/e2e/cypress";
import { SAMPLE_DATASET } from "__support__/e2e/cypress_sample_dataset";
const { ORDERS_ID, PRODUCTS_ID, PEOPLE_ID, REVIEWS_ID } = SAMPLE_DATASET;
describe.skip("issue 17777", () => {
beforeEach(() => {
restore();
cy.signInAsAdmin();
hideTables([ORDERS_ID, PRODUCTS_ID, PEOPLE_ID, REVIEWS_ID]);
});
it("should still be able to set permissions on individual tables, even though they are hidden in data model (metabase#17777)", () => {
cy.visit("/admin/permissions/data/group/1");
cy.findByText("Permissions for the All Users group");
cy.findByText("Sample Dataset").click();
cy.location("pathname").should(
"eq",
"/admin/permissions/data/group/1/database/1",
);
cy.findByTestId("permission-table").within(() => {
cy.findByText("Orders");
cy.findByText("Products");
cy.findByText("Reviews");
cy.findByText("People");
});
cy.findAllByText("No self-service")
.first()
.click();
popover().contains("Unrestricted");
});
});
function hideTables(tables) {
cy.request("PUT", "/api/table", {
ids: tables,
visibility_type: "hidden",
});
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment