Skip to content

Commit c7d2560

Browse files
luannmoreirahenrybarreto
authored andcommitted
chore(ui): changed path to VBtn vuetify component on tests
This commit changes the path related to the vuetify components index, which was causing errors on build.
1 parent d5d0fdd commit c7d2560

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

ui/tests/components/Containers/Container.spec.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { mount, VueWrapper } from "@vue/test-utils";
22
import { createVuetify } from "vuetify";
33
import MockAdapter from "axios-mock-adapter";
44
import { expect, describe, it, beforeEach, vi } from "vitest";
5+
import { VBtn } from "vuetify/lib/components/index";
56
import { store, key } from "@/store";
67
import Containers from "@/components/Containers/Container.vue";
78
import { router } from "@/router";
@@ -160,12 +161,16 @@ describe("Device", () => {
160161
expect(wrapper.html()).toMatchSnapshot();
161162
});
162163

164+
it("Data is defined", () => {
165+
expect(wrapper.vm.$data).toBeDefined();
166+
});
167+
163168
it("Renders correctly", () => {
164169
expect(wrapper.html()).toMatchSnapshot();
165170
});
166171

167172
it("Contains the correct tabs", () => {
168-
const tabs = wrapper.findAllComponents({ name: "VBtn" });
173+
const tabs = wrapper.findAllComponents(VBtn);
169174
expect(tabs).toHaveLength(3); // Three tabs expected
170175
expect(tabs[0].text()).toBe("Accepted");
171176
expect(tabs[1].text()).toBe("Pending");

ui/tests/components/Devices/Device.spec.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { mount, VueWrapper } from "@vue/test-utils";
22
import { createVuetify } from "vuetify";
33
import MockAdapter from "axios-mock-adapter";
44
import { expect, describe, it, beforeEach, vi } from "vitest";
5+
import { VBtn } from "vuetify/lib/components/index";
56
import { store, key } from "@/store";
67
import Device from "@/components/Devices/Device.vue";
78
import { router } from "@/router";
@@ -159,12 +160,16 @@ describe("Device", () => {
159160
expect(wrapper.html()).toMatchSnapshot();
160161
});
161162

163+
it("Data is defined", () => {
164+
expect(wrapper.vm.$data).toBeDefined();
165+
});
166+
162167
it("Renders correctly", () => {
163168
expect(wrapper.html()).toMatchSnapshot();
164169
});
165170

166171
it("Contains the correct tabs", () => {
167-
const tabs = wrapper.findAllComponents({ name: "VBtn" });
172+
const tabs = wrapper.findAllComponents(VBtn);
168173
expect(tabs).toHaveLength(3); // Three tabs expected
169174
expect(tabs[0].text()).toBe("Accepted");
170175
expect(tabs[1].text()).toBe("Pending");

0 commit comments

Comments
 (0)