mirror of
https://git.quad4.io/RNS-Things/MeshChatX.git
synced 2026-10-23 15:32:27 +00:00
feat(tests): add VTooltip stub for NomadNetworkPage tests
This commit is contained in:
2 files changed
+13
No files matched your search
@@ -1,6 +1,15 @@
|
||||
import { mount } from "@vue/test-utils";
|
||||
import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
|
||||
import MicronParser from "@/js/MicronParser.js";
|
||||
|
||||
// Mock vuetify components before importing the component under test
|
||||
vi.mock("vuetify/components/VTooltip", () => ({
|
||||
VTooltip: {
|
||||
name: "VTooltip",
|
||||
template: "<div class=\"v-tooltip-stub\"><slot /></div>",
|
||||
},
|
||||
}));
|
||||
|
||||
import NomadNetworkPage from "@/components/nomadnetwork/NomadNetworkPage.vue";
|
||||
|
||||
vi.mock("@/js/WebSocketConnection", () => ({
|
||||
@@ -53,6 +62,9 @@ describe("NomadNetworkPage.vue", () => {
|
||||
template: '<div class="sidebar-stub"></div>',
|
||||
props: ["nodes", "selectedDestinationHash"],
|
||||
},
|
||||
VTooltip: {
|
||||
template: '<div class="v-tooltip-stub"><slot /></div>',
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -128,6 +128,7 @@ config.global.stubs = {
|
||||
"v-toolbar": true,
|
||||
"v-toolbar-title": true,
|
||||
"v-tooltip": true,
|
||||
VTooltip: true,
|
||||
"v-alert": true,
|
||||
"v-snackbar": true,
|
||||
"v-badge": true,
|
||||
|
||||
Reference in new issue
Block a user