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

#16555 Repro: Collections appear in items list for user with revoked access to collections (#16624)

* Add repro for #16555

* Extract common logic into variables

* Update the assertion
parent 345c5429
No related branches found
No related tags found
No related merge requests found
......@@ -252,6 +252,9 @@ describe("scenarios > collection_defaults", () => {
});
describe("nested collections with revoked parent access", () => {
const { first_name, last_name } = nocollection;
const revokedUsersPersonalCollectionName = `${first_name} ${last_name}'s Personal Collection`;
beforeEach(() => {
// Create Parent collection within `Our analytics`
cy.request("POST", "/api/collection", {
......@@ -288,6 +291,12 @@ describe("scenarios > collection_defaults", () => {
cy.signIn("nocollection");
});
it.skip("should not render collections in items list if user doesn't have collection access (metabase#16555)", () => {
cy.visit("/collection/root");
// Since this user doesn't have access rights to the root collection, it should render empty
cy.findByText("Nothing to see yet.");
});
it("should see a child collection in a sidebar even with revoked access to its parent (metabase#14114)", () => {
cy.visit("/");
cy.findByText("Child");
......@@ -303,14 +312,10 @@ describe("scenarios > collection_defaults", () => {
});
it.skip("should be able to choose a child collection when saving a question (metabase#14052)", () => {
const { first_name, last_name } = nocollection;
openOrdersTable();
cy.findByText("Save").click();
// Click to choose which collection should this question be saved to
cy.findByText(
`${first_name} ${last_name}'s Personal Collection`,
).click();
cy.findByText(revokedUsersPersonalCollectionName).click();
popover().within(() => {
cy.findByText(/Our analytics/i);
cy.findByText(/My personal collection/i);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment