diff --git a/client/package.json b/client/package.json
index ed687a94ce63..1d0b902aa408 100644
--- a/client/package.json
+++ b/client/package.json
@@ -142,6 +142,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.test.js b/client/src/components/History/CurrentHistory/SelectPreferredStore.test.js
index 0e9a627293e0..b5ff7967016d 100644
--- a/client/src/components/History/CurrentHistory/SelectPreferredStore.test.js
+++ b/client/src/components/History/CurrentHistory/SelectPreferredStore.test.js
@@ -60,4 +60,27 @@ describe("SelectPreferredStore.vue", () => {
const emitted = wrapper.emitted();
expect(emitted["updated"][0][0]).toEqual(null);
});
+
+ it("updates object store to on non-null selection", async () => {
+ const wrapper = mountComponent();
+ await flushPromises();
+ const els = wrapper.findAll(PREFERENCES.object_store_selection.option_buttons.selector);
+ expect(els.length).toBe(3);
+ const galaxyDefaultOption = wrapper.find(
+ PREFERENCES.object_store_selection.option_button({ object_store_id: "object_store_2" }).selector
+ );
+ expect(galaxyDefaultOption.exists()).toBeTruthy();
+ axiosMock
+ .onPut(
+ `/api/histories/${TEST_HISTORY_ID}`,
+ expect.objectContaining({ preferred_object_store_id: "object_store_2" })
+ )
+ .reply(202);
+ await galaxyDefaultOption.trigger("click");
+ await flushPromises();
+ const errorEl = wrapper.find(".object-store-selection-error");
+ expect(errorEl.exists()).toBeFalsy();
+ const emitted = wrapper.emitted();
+ expect(emitted["updated"][0][0]).toEqual("object_store_2");
+ });
});
diff --git a/client/src/components/History/CurrentHistory/SelectPreferredStore.vue b/client/src/components/History/CurrentHistory/SelectPreferredStore.vue
index 0fd3195918f4..9c15e2e63074 100644
--- a/client/src/components/History/CurrentHistory/SelectPreferredStore.vue
+++ b/client/src/components/History/CurrentHistory/SelectPreferredStore.vue
@@ -1,76 +1,69 @@
+
-
-
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 @@
+
+
+
@@ -70,108 +140,6 @@
-
-