Skip to content

Commit f48dedf

Browse files
luizhf42gustavosbarreto
authored andcommitted
fix(ui): stub premium content cards request in AppLayout
1 parent 689648a commit f48dedf

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

ui/tests/layouts/AppLayout.spec.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,34 @@ import useSpinnerStore from "@/store/modules/spinner";
1616
let mockDevices: MockAdapter;
1717
let mockContainers: MockAdapter;
1818

19+
const cards = [
20+
{
21+
title: "ShellHub Cloud",
22+
features: [
23+
"Protection Against DDoS Attacks",
24+
"Session record and playback",
25+
"Managing Firewall Rules",
26+
"Secure remote communication",
27+
],
28+
button: {
29+
link: "https://www.shellhub.io/pricing",
30+
label: "Pricing",
31+
},
32+
},
33+
{
34+
title: "ShellHub Enterprise",
35+
features: [
36+
"Dedicated server for each customer",
37+
"Supports up to thousands of devices",
38+
"Reduced maintenance cost",
39+
],
40+
button: {
41+
link: "https://www.shellhub.io/pricing",
42+
label: "Get a quote",
43+
},
44+
},
45+
];
46+
1947
describe("App Layout Component", () => {
2048
let wrapper;
2149
setActivePinia(createPinia());
@@ -25,6 +53,9 @@ describe("App Layout Component", () => {
2553
directives,
2654
});
2755

56+
vi.stubGlobal("fetch", vi.fn(async () => Promise.resolve({
57+
json: async () => (cards),
58+
})));
2859
const AppWrapperComponent = defineComponent({
2960
components: { AppLayout },
3061
template: `

0 commit comments

Comments
 (0)