diff --git a/client/package.json b/client/package.json index 0245c5202944..2d49a330de2b 100644 --- a/client/package.json +++ b/client/package.json @@ -141,6 +141,7 @@ "@babel/preset-typescript": "^7.18.6", "@cerner/duplicate-package-checker-webpack-plugin": "^2.3.0", "@testing-library/jest-dom": "^5.16.4", + "@types/markdown-it": "^12.2.3", "@typescript-eslint/eslint-plugin": "^5.51.0", "@typescript-eslint/parser": "^5.51.0", "@vue/test-utils": "^1.3.4", diff --git a/client/src/components/History/CurrentHistory/SelectPreferredStore.vue b/client/src/components/History/CurrentHistory/SelectPreferredStore.vue index 0fd3195918f4..367b88a2ff43 100644 --- a/client/src/components/History/CurrentHistory/SelectPreferredStore.vue +++ b/client/src/components/History/CurrentHistory/SelectPreferredStore.vue @@ -1,76 +1,71 @@ + - - diff --git a/client/src/components/ObjectStore/DescribeObjectStore.vue b/client/src/components/ObjectStore/DescribeObjectStore.vue index 475f583957e6..b36573c0e239 100644 --- a/client/src/components/ObjectStore/DescribeObjectStore.vue +++ b/client/src/components/ObjectStore/DescribeObjectStore.vue @@ -32,7 +32,7 @@ import ObjectStoreRestrictionSpan from "./ObjectStoreRestrictionSpan"; import QuotaUsageBar from "components/User/DiskUsage/Quota/QuotaUsageBar"; import { QuotaSourceUsageProvider } from "components/User/DiskUsage/Quota/QuotaUsageProvider"; import ObjectStoreBadges from "./ObjectStoreBadges"; -import adminConfigMixin from "./adminConfigMixin"; +import { adminMarkup } from "./adminConfig"; export default { components: { @@ -41,7 +41,6 @@ export default { QuotaSourceUsageProvider, QuotaUsageBar, }, - mixins: [adminConfigMixin], props: { storageInfo: { type: Object, @@ -57,7 +56,7 @@ export default { return this.storageInfo.quota?.source; }, descriptionRendered() { - return this.adminMarkup(this.storageInfo.description); + return adminMarkup(this.storageInfo.description); }, isPrivate() { return this.storageInfo.private; diff --git a/client/src/components/ObjectStore/ObjectStoreBadge.test.js b/client/src/components/ObjectStore/ObjectStoreBadge.test.js index 366127991bad..20f1785a9556 100644 --- a/client/src/components/ObjectStore/ObjectStoreBadge.test.js +++ b/client/src/components/ObjectStore/ObjectStoreBadge.test.js @@ -23,8 +23,10 @@ describe("ObjectStoreBadge", () => { const selector = ROOT_COMPONENT.object_store_details.badge_of_type({ type: "more_secure" }).selector; const iconEl = wrapper.find(selector); expect(iconEl.exists()).toBeTruthy(); - expect(wrapper.vm.message).toContain(TEST_MESSAGE); - expect(wrapper.vm.stockMessage).toContain("more secure by the Galaxy adminstrator"); + const popoverStub = wrapper.find("b-popover-stub"); + const popoverText = popoverStub.text(); + expect(popoverText).toContain(TEST_MESSAGE); + expect(popoverText).toContain("more secure by the Galaxy adminstrator"); }); it("should render a valid badge for less_secure type", async () => { @@ -32,7 +34,9 @@ describe("ObjectStoreBadge", () => { const selector = ROOT_COMPONENT.object_store_details.badge_of_type({ type: "less_secure" }).selector; const iconEl = wrapper.find(selector); expect(iconEl.exists()).toBeTruthy(); - expect(wrapper.vm.message).toContain(TEST_MESSAGE); - expect(wrapper.vm.stockMessage).toContain("less secure by the Galaxy adminstrator"); + const popoverStub = wrapper.find("b-popover-stub"); + const popoverText = popoverStub.text(); + expect(popoverText).toContain(TEST_MESSAGE); + expect(popoverText).toContain("less secure by the Galaxy adminstrator"); }); }); diff --git a/client/src/components/ObjectStore/ObjectStoreBadge.vue b/client/src/components/ObjectStore/ObjectStoreBadge.vue index d6f7c086cd1b..b490cf6e2770 100644 --- a/client/src/components/ObjectStore/ObjectStoreBadge.vue +++ b/client/src/components/ObjectStore/ObjectStoreBadge.vue @@ -1,9 +1,79 @@ + + - -