Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Fix failing transform tags test (#63964)

Romeo Van Snick21c527187963
diff --git a/e2e/test/scenarios/admin/transforms.cy.spec.ts b/e2e/test/scenarios/admin/transforms.cy.spec.ts
index 987cb0506f7..d24279f1baf 100644
--- a/e2e/test/scenarios/admin/transforms.cy.spec.ts
+++ b/e2e/test/scenarios/admin/transforms.cy.spec.ts
@@ -566,7 +566,6 @@ LIMIT
getTagsInput().type("New tag");
H.popover().findByText("New tag").click();
cy.wait("@createTag");
- H.popover().findByText("New tag").should("be.visible");
H.undoToast().should("contain.text", "Transform tags updated");
});
@@ -622,7 +621,6 @@ LIMIT
getTagsInput().type("New tag");
H.popover().findByText("New tag").click();
cy.wait("@createTag");
- H.popover().findByText("New tag").should("be.visible");
cy.log("Navigate to transform B");
getNavSidebar().findByText("Transforms").click();
diff --git a/enterprise/frontend/src/metabase-enterprise/api/transform-tag.ts b/enterprise/frontend/src/metabase-enterprise/api/transform-tag.ts
index 667feb76ece..1d182c89a7d 100644
--- a/enterprise/frontend/src/metabase-enterprise/api/transform-tag.ts
+++ b/enterprise/frontend/src/metabase-enterprise/api/transform-tag.ts
@@ -55,8 +55,13 @@ export const transformTagApi = EnterpriseApi.injectEndpoints({
method: "DELETE",
url: `/api/ee/transform-tag/${id}`,
}),
- invalidatesTags: (_, error) =>
- invalidateTags(error, [listTag("transform-tag")]),
+ invalidatesTags: (_, error, id) =>
+ invalidateTags(error, [
+ listTag("transform-tag"),
+ // Invalidate transforms that are tagged with this tag, since
+ // they are not tagged with listTag("transform-tag").
+ idTag("transform-tag", id),
+ ]),
}),
}),
});