Fix issues with locking and solicitation.

This commit is contained in:
Filipe Soccol
2025-06-27 15:59:34 -03:00
parent 73ba77ca4f
commit cf61f5ecfd
16 changed files with 202 additions and 189 deletions

View File

@@ -1,15 +1,8 @@
import { describe, it, expect, beforeEach } from "vitest";
import { describe, it, expect } from "vitest";
import { mount } from "@vue/test-utils";
import TopBar from "../TopBar.vue";
import { useUser } from "@/composables/useUser";
import { createPinia, setActivePinia } from "pinia";
describe("TopBar.vue", () => {
beforeEach(() => {
setActivePinia(createPinia());
});
it("should render connect wallet button", () => {
const wrapper = mount(TopBar);
expect(wrapper.html()).toContain("Conectar carteira");
@@ -20,13 +13,6 @@ describe("TopBar.vue", () => {
expect(wrapper.html()).toContain("Quero vender");
});
it("should render button to change to seller view when in buyer screen", () => {
const user = useUser();
user.setSellerView(true);
const wrapper = mount(TopBar);
expect(wrapper.html()).toContain("Quero comprar");
});
it("should render the P2Pix logo correctly", () => {
const wrapper = mount(TopBar);
const img = wrapper.findAll(".logo");