Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Frontend/src/components/PermissionGate.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ function mountGate(allowed: boolean) {
return render(PermissionGate, {
props: { allowed, reason: "You don't have permission" },
slots: { default: '<button class="btn">Do it</button>' },
global: { directives: { tippy: () => {} } },
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,6 @@ async function renderComponent({ initialState = {} }: { initialState?: Record<st
stubActions: true,
}),
],
directives: {
tippy: () => {},
},
stubs: {
RouterLink: true,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,6 @@ function renderComponent({ initialState = {} }: { initialState?: Record<string,
stubActions: true,
}),
],
directives: {
// v-tippy is used by ActionButton; stub it in unit tests
tippy: () => {},
},
stubs: {
// RouterLink is used deep inside ServiceControlAvailable; stub it to
// avoid "Failed to resolve component" warnings in unit tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ async function renderGroupList(allowedRouteKeys: string[]) {
},
}),
],
directives: { tippy: () => {} },
},
});

Expand Down
4 changes: 0 additions & 4 deletions src/Frontend/src/components/messages/SagaDiagram.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,6 @@ function rendercomponent({ initialState = {} }: { initialState?: { MessageStore?
CodeEditor: true,
CopyToClipboard: true,
},
directives: {
// Add stub for tippy directive
tippy: () => {},
},
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ function renderButton(component: Component, allowedRouteKeys: string[], archived
},
}),
],
directives: { tippy: () => {} },
},
});
}
Expand Down
4 changes: 0 additions & 4 deletions src/Frontend/src/views/ThroughputReportView.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ describe("EndpointsView tests", () => {
RouterLink: RouterLinkStub,
},
plugins: [makeRouter(), Toast],
directives: {
// Add stub for tippy directive
tippy: () => {},
},
},
});
await flushPromises();
Expand Down
4 changes: 0 additions & 4 deletions src/Frontend/src/views/throughputreport/EndpointsView.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ describe("EndpointsView tests", () => {
RouterLink: RouterLinkStub,
},
plugins: [makeRouter()],
directives: {
// Add stub for tippy directive
tippy: () => {},
},
},
});
await flushPromises();
Expand Down
4 changes: 0 additions & 4 deletions src/Frontend/src/views/throughputreport/SetupView.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ describe("SetupView tests", () => {
RouterLink: RouterLinkStub,
},
plugins: [makeRouter()],
directives: {
// Add stub for tippy directive
tippy: () => {},
},
},
});
await flushPromises();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ describe("DiagnosticsView tests", () => {
const { debug } = render(DiagnosticsView, {
global: {
plugins: [],
directives: {
// Add stub for tippy directive
tippy: () => {},
},
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe("MaskView tests", () => {
driver.mockEndpoint(`${window.defaultConfig.service_control_url}licensing/settings/masks`, { body });
setActivePinia(createTestingPinia({ stubActions: false }));

const { debug } = render(MasksView, { global: { plugins: [Toast], directives: { tippy: () => {} } } });
const { debug } = render(MasksView, { global: { plugins: [Toast] } });
await flushPromises();

return { debug, driver };
Expand Down
7 changes: 7 additions & 0 deletions src/Frontend/test/drivers/vitest/setup.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
import { afterAll, beforeAll, beforeEach, vi } from "vitest";
import { config } from "@vue/test-utils";
import { mockServer } from "../../mock-server";
import "@testing-library/jest-dom/vitest";
import monitoringClient from "@/components/monitoring/monitoringClient";
import serviceControlClient from "@/components/serviceControlClient";
import VueTippy from "vue-tippy";

// Removes test warning noise failing to resolve tippy
if (!config.global.plugins.includes(VueTippy)) {
config.global.plugins.push(VueTippy);
}

const defaultConfig = {
default_route: "/dashboard",
Expand Down