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

Do not offer to delete archived collections (#33991)

* Reproduce #33996
parent 20988e95
No related branches found
No related tags found
No related merge requests found
......@@ -110,8 +110,19 @@ describe("scenarios > collections > archive", () => {
cy.findByTestId("toast-undo").should("not.exist");
cy.log("test bulk delete");
cy.log(
"Make sure we don't offer to delete archived collections (metabase#33996)",
);
cy.findByTestId(`archive-item-${COLLECTION_NAME}`)
.as("archivedCollection")
.findByLabelText("unarchive icon")
.should("exist");
cy.get("@archivedCollection")
.findByLabelText("trash icon")
.should("not.exist");
cy.log("test bulk delete");
cy.get("@archivedCollection")
.findByLabelText("archive-item-swapper")
.realHover()
.click();
......
......@@ -71,7 +71,7 @@ export const ArchivedItem = ({
/>
</Tooltip>
)}
{onDelete && (
{model !== "collection" && onDelete && (
<Tooltip
tooltip={t`Delete this ${getTranslatedEntityName(
model,
......
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