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

Repro #19603: Archived sub-collections are still showing in Permissions (#19615)

parent bad01b82
No related branches found
No related tags found
No related merge requests found
import { restore } from "__support__/e2e/cypress";
describe("issue 19603", () => {
beforeEach(() => {
restore();
cy.signInAsAdmin();
// Archive second collection (nested under the first one)
cy.request("GET", "/api/collection/").then(({ body }) => {
const { id } = body.find(c => c.slug === "second_collection");
cy.archiveCollection(id);
});
});
it("archived subcollection should not show up in permissions (metabase#19603)", () => {
cy.visit("/admin/permissions/collections");
cy.findByText("First collection").click();
cy.findByText("Second collection").should("not.exist");
});
});
import { restore } from "__support__/e2e/cypress";
const UNARCHIVED_PARENT_NAME = "Unarchived parent";
const ARCHIVED_NAME = "Archived child";
describe("issue 19603", () => {
beforeEach(() => {
restore();
cy.signInAsAdmin();
cy.createCollection({
name: UNARCHIVED_PARENT_NAME,
}).then(response => {
const { id: collectionId } = response.body;
cy.createCollection({
name: ARCHIVED_NAME,
parent_id: collectionId,
archived: true,
}).then(response => {
const { id: archivedCollectionId } = response.body;
cy.archiveCollection(archivedCollectionId);
});
});
});
it("should not show archived collections on the collections permissions page (metabase#19603)", () => {
cy.visit("admin/permissions/collections");
cy.findByText(UNARCHIVED_PARENT_NAME).click();
cy.findByText(ARCHIVED_NAME).should("not.exist");
});
});
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