mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-11-03 21:34:30 +08:00
fix failing jests and move heading to header slot
This commit is contained in:
@@ -29,10 +29,7 @@ function testActivity(id, newOptions = {}) {
|
||||
}
|
||||
|
||||
async function testSearch(wrapper, query, result) {
|
||||
const searchField = wrapper.find("input");
|
||||
searchField.element.value = query;
|
||||
searchField.trigger("change");
|
||||
await wrapper.vm.$nextTick();
|
||||
await wrapper.setProps({ query });
|
||||
const filtered = wrapper.findAll(activityItemSelector);
|
||||
expect(filtered.length).toBe(result);
|
||||
}
|
||||
@@ -48,6 +45,9 @@ describe("ActivitySettings", () => {
|
||||
wrapper = mount(mountTarget, {
|
||||
localVue,
|
||||
pinia,
|
||||
props: {
|
||||
query: "",
|
||||
},
|
||||
stubs: {
|
||||
icon: { template: "<div></div>" },
|
||||
},
|
||||
|
||||
@@ -23,7 +23,7 @@ const activityStore = useActivityStore();
|
||||
const { activities } = storeToRefs(activityStore);
|
||||
|
||||
const filteredActivities = computed(() => {
|
||||
if (props.query.length > 0) {
|
||||
if (props.query?.length > 0) {
|
||||
const queryLower = props.query.toLowerCase();
|
||||
const results = activities.value.filter((a: Activity) => {
|
||||
const attributeValues = [a.title, a.description];
|
||||
|
||||
@@ -14,6 +14,10 @@ jest.mock("@/composables/config", () => ({
|
||||
})),
|
||||
}));
|
||||
|
||||
jest.mock("vue-router/composables", () => ({
|
||||
useRoute: jest.fn(() => ({})),
|
||||
}));
|
||||
|
||||
function createTarget(propsData = {}) {
|
||||
return mount(MountTarget, {
|
||||
localVue,
|
||||
|
||||
@@ -125,7 +125,9 @@ const sections = computed(() => {
|
||||
|
||||
<template>
|
||||
<ActivityPanel v-if="isConfigLoaded" title="Administration" go-to-all-title="Admin Home" href="/admin">
|
||||
<h3>Galaxy Version {{ adminProperties.versionMajor }}</h3>
|
||||
<template v-slot:header>
|
||||
<h3>Galaxy Version {{ adminProperties.versionMajor }}</h3>
|
||||
</template>
|
||||
<div class="unified-panel-body">
|
||||
<div class="toolMenuContainer">
|
||||
<div class="toolSectionWrapper">
|
||||
|
||||
Reference in New Issue
Block a user