Improve and fix Buy Confirmed Component test
This commit is contained in:
parent
8fa16a22c0
commit
49834745a9
@ -1,13 +1,20 @@
|
|||||||
import { mount } from "@vue/test-utils";
|
import { shallowMount } from "@vue/test-utils";
|
||||||
import BuyConfirmedComponent from "../BuyConfirmedComponent.vue";
|
import BuyConfirmedComponent from "../BuyConfirmedComponent.vue";
|
||||||
|
import { createPinia, setActivePinia } from "pinia";
|
||||||
|
import { MockEvents } from "@/model/mock/EventMock";
|
||||||
|
|
||||||
describe("BuyConfirmedComponent.vue", () => {
|
describe("BuyConfirmedComponent.vue", () => {
|
||||||
const wrapper = mount(BuyConfirmedComponent, {
|
beforeEach(() => {
|
||||||
|
setActivePinia(createPinia());
|
||||||
|
});
|
||||||
|
|
||||||
|
const wrapper = shallowMount(BuyConfirmedComponent, {
|
||||||
props: {
|
props: {
|
||||||
lastWalletReleaseTransactions: [],
|
lastWalletReleaseTransactions: MockEvents,
|
||||||
tokenAmount: 1,
|
tokenAmount: 1,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
test("Test component Header Text", () => {
|
test("Test component Header Text", () => {
|
||||||
expect(wrapper.html()).toContain("Os tokens já foram transferidos");
|
expect(wrapper.html()).toContain("Os tokens já foram transferidos");
|
||||||
expect(wrapper.html()).toContain("para a sua carteira!");
|
expect(wrapper.html()).toContain("para a sua carteira!");
|
Loading…
x
Reference in New Issue
Block a user