mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 00:12:08 +08:00
Merge pull request #14516 from ElectronicBlueberry/admin-toolshed-progress
Fix toolshed installation progress overview shows no status
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { createLocalVue, mount } from "@vue/test-utils";
|
||||
import { mount } from "@vue/test-utils";
|
||||
import { getLocalVue } from "jest/helpers";
|
||||
import Monitor from "./Monitor";
|
||||
|
||||
jest.mock("app");
|
||||
@@ -33,16 +34,19 @@ Services.mockImplementation(() => {
|
||||
|
||||
describe("Monitor", () => {
|
||||
it("test monitor", async () => {
|
||||
const localVue = createLocalVue();
|
||||
const wrapper = mount(Monitor, localVue);
|
||||
const localVue = getLocalVue();
|
||||
const wrapper = mount(Monitor, { localVue });
|
||||
await localVue.nextTick();
|
||||
const headers = wrapper.findAll("th");
|
||||
expect(headers.length).toBe(2);
|
||||
expect(headers.length).toBe(3);
|
||||
expect(headers.at(0).text()).toBe("Name");
|
||||
expect(headers.at(1).text()).toBe("Status");
|
||||
|
||||
const cells = wrapper.findAll("td");
|
||||
expect(cells.length).toBe(4);
|
||||
expect(cells.length).toBe(6);
|
||||
expect(cells.at(0).text()).toBe("name_0 (owner_0)");
|
||||
expect(cells.at(2).text()).toBe("name_1 (owner_1)");
|
||||
expect(cells.at(1).text()).toContain("status_0_0");
|
||||
expect(cells.at(3).text()).toBe("name_1 (owner_1)");
|
||||
expect(cells.at(4).text()).toContain("status_1");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
<b-link @click="onQuery(row.item.name)"> {{ row.item.name }} ({{ row.item.owner }}) </b-link>
|
||||
</template>
|
||||
<template v-slot:cell(status)="row">
|
||||
<b>Status: </b><span>{{ row.item.status }}</span>
|
||||
</template>
|
||||
<template v-slot:cell(actions)="row">
|
||||
<InstallationActions
|
||||
class="float-right"
|
||||
:status="row.item.status"
|
||||
@@ -43,7 +46,7 @@ export default {
|
||||
loading: true,
|
||||
error: null,
|
||||
items: [],
|
||||
fields: ["name", "status"],
|
||||
fields: ["name", "status", "actions"],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
||||
Reference in New Issue
Block a user