Skip to content

Commit c97d8e2

Browse files
Add the stub for tippy to the Throughput report tests (#3061)
* Add the stub for tippy to the Throughputreport tests * Tippy warnings suggestions (#3064) * Remove tippy directive warnings globally * Missed some duplicate tippy stubs * Revert "Add the stub for tippy to the Throughputreport tests" This reverts commit 58beaa2. * Linter doesn't like the comment --------- Co-authored-by: Nick Gallegos <nick.gallegos@particular.net>
1 parent 33518c4 commit c97d8e2

12 files changed

Lines changed: 8 additions & 31 deletions

src/Frontend/src/components/PermissionGate.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ function mountGate(allowed: boolean) {
66
return render(PermissionGate, {
77
props: { allowed, reason: "You don't have permission" },
88
slots: { default: '<button class="btn">Do it</button>' },
9-
global: { directives: { tippy: () => {} } },
109
});
1110
}
1211

src/Frontend/src/components/configuration/EndpointConnection.spec.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,6 @@ async function renderComponent({ initialState = {} }: { initialState?: Record<st
119119
stubActions: true,
120120
}),
121121
],
122-
directives: {
123-
tippy: () => {},
124-
},
125122
stubs: {
126123
RouterLink: true,
127124
},

src/Frontend/src/components/configuration/HealthCheckNotifications.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,10 +313,6 @@ function renderComponent({ initialState = {} }: { initialState?: Record<string,
313313
stubActions: true,
314314
}),
315315
],
316-
directives: {
317-
// v-tippy is used by ActionButton; stub it in unit tests
318-
tippy: () => {},
319-
},
320316
stubs: {
321317
// RouterLink is used deep inside ServiceControlAvailable; stub it to
322318
// avoid "Failed to resolve component" warnings in unit tests

src/Frontend/src/components/failedmessages/messageGroupButtonPermissions.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ async function renderGroupList(allowedRouteKeys: string[]) {
6060
},
6161
}),
6262
],
63-
directives: { tippy: () => {} },
6463
},
6564
});
6665

src/Frontend/src/components/messages/SagaDiagram.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,6 @@ function rendercomponent({ initialState = {} }: { initialState?: { MessageStore?
197197
CodeEditor: true,
198198
CopyToClipboard: true,
199199
},
200-
directives: {
201-
// Add stub for tippy directive
202-
tippy: () => {},
203-
},
204200
},
205201
});
206202

src/Frontend/src/components/messages/messageButtonPermissions.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ function renderButton(component: Component, allowedRouteKeys: string[], archived
4949
},
5050
}),
5151
],
52-
directives: { tippy: () => {} },
5352
},
5453
});
5554
}

src/Frontend/src/views/ThroughputReportView.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ describe("EndpointsView tests", () => {
4040
RouterLink: RouterLinkStub,
4141
},
4242
plugins: [makeRouter(), Toast],
43-
directives: {
44-
// Add stub for tippy directive
45-
tippy: () => {},
46-
},
4743
},
4844
});
4945
await flushPromises();

src/Frontend/src/views/throughputreport/EndpointsView.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ describe("EndpointsView tests", () => {
3434
RouterLink: RouterLinkStub,
3535
},
3636
plugins: [makeRouter()],
37-
directives: {
38-
// Add stub for tippy directive
39-
tippy: () => {},
40-
},
4137
},
4238
});
4339
await flushPromises();

src/Frontend/src/views/throughputreport/SetupView.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ describe("SetupView tests", () => {
5555
RouterLink: RouterLinkStub,
5656
},
5757
plugins: [makeRouter()],
58-
directives: {
59-
// Add stub for tippy directive
60-
tippy: () => {},
61-
},
6258
},
6359
});
6460
await flushPromises();

src/Frontend/src/views/throughputreport/setup/DiagnosticsView.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ describe("DiagnosticsView tests", () => {
5151
const { debug } = render(DiagnosticsView, {
5252
global: {
5353
plugins: [],
54-
directives: {
55-
// Add stub for tippy directive
56-
tippy: () => {},
57-
},
5854
},
5955
});
6056

0 commit comments

Comments
 (0)