Update all to useUSer composabe. Still some bugs to resolve.

This commit is contained in:
Filipe Soccol
2025-04-01 12:04:24 -03:00
parent e93cac6086
commit 9fa2b34a5d
26 changed files with 495 additions and 454 deletions

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, vi, beforeEach } from "vitest";
import { mount } from "@vue/test-utils";
import TopBar from "../TopBar.vue";
import { useViemStore } from "@/store/viem";
import { useUser } from "@/composables/useUser";
import { createPinia, setActivePinia } from "pinia";
@@ -21,8 +21,8 @@ describe("TopBar.vue", () => {
});
it("should render button to change to seller view when in buyer screen", () => {
const viemStore = useViemStore();
viemStore.setSellerView(true);
const user = useUser();
user.setSellerView(true);
const wrapper = mount(TopBar);
expect(wrapper.html()).toContain("Quero comprar");
});