Skip to content

Instantly share code, notes, and snippets.

@dannon
Created October 25, 2023 15:35
Show Gist options
  • Save dannon/e90f4e4e99a65259108e01d023177225 to your computer and use it in GitHub Desktop.
Save dannon/e90f4e4e99a65259108e01d023177225 to your computer and use it in GitHub Desktop.
diff --git a/client/src/components/History/Content/ContentItem.test.js b/client/src/components/History/Content/ContentItem.test.js
index 8526789a84..01d4dffbae 100644
--- a/client/src/components/History/Content/ContentItem.test.js
+++ b/client/src/components/History/Content/ContentItem.test.js
@@ -46,12 +46,12 @@ describe("ContentItem", () => {
DatasetDetails: true,
vueTagsInput: false,
},
- provide: {
- store: {
- dispatch: jest.fn,
- getters: {},
- },
- },
+ // provide: {
+ // store: {
+ // dispatch: jest.fn,
+ // getters: {},
+ // },
+ // },
pinia: createTestingPinia(),
});
});
@@ -108,5 +108,7 @@ describe("ContentItem", () => {
expect(wrapper.emitted()["update:selected"][1][0]).toBe(false);
expect(wrapper.classes()).toEqual(expect.arrayContaining(["alert-info"]));
expect(selector.attributes("data-icon")).toBe("check-square");
+
+ console.debug(wrapper.find("#findme").html());
});
});
diff --git a/client/src/components/History/Content/ContentItem.vue b/client/src/components/History/Content/ContentItem.vue
index 01453eb7d6..f9151a0b84 100644
--- a/client/src/components/History/Content/ContentItem.vue
+++ b/client/src/components/History/Content/ContentItem.vue
@@ -78,6 +78,13 @@ const jobState = computed(() => new JobStateSummary(props.item));

const contentId = computed(() => `dataset-${props.item.id}`);

+const itemId = computed(() => {
+ console.debug("props.item.id is", props.item.id);
+ return props.item.id;
+});
+
+defineExpose({ itemId });
+
const state: ComputedRef<State> = computed(() => {
if (props.isPlaceholder) {
return "placeholder";
@@ -303,14 +310,19 @@ function toggleHighlights() {
@tag-click="onTagClick" />
<!-- collections are not expandable, so we only need the DatasetDetails component here -->
<b-collapse :visible="expandDataset">
- <DatasetDetails
+ <div id="findme">
+ id: {{ item.id }}
+ item: {{ item }}
+ itemId: {{ itemId }}
+ </div>
+ <!-- <DatasetDetails
v-if="expandDataset"
:id="item.id"
:writable="writable"
:show-highlight="(isHistoryItem && filterable) || addHighlightBtn"
:item-urls="itemUrls"
@edit="onEdit"
- @toggleHighlights="toggleHighlights" />
+ @toggleHighlights="toggleHighlights" /> -->
</b-collapse>
</div>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment