Create tests to BuyConfirmedComponent
This commit is contained in:
parent
411966f727
commit
2c78a203b0
@ -0,0 +1,31 @@
|
||||
import { mount } from "@vue/test-utils";
|
||||
import BuyConfirmedComponent from "../BuyConfirmedComponent.vue";
|
||||
|
||||
describe("BuyConfirmedComponent.vue", () => {
|
||||
const wrapper = mount(BuyConfirmedComponent, {
|
||||
props: {
|
||||
lastWalletReleaseTransactions: [],
|
||||
tokenAmount: 1,
|
||||
},
|
||||
});
|
||||
test("Test component Header Text", () => {
|
||||
expect(wrapper.html()).toContain("Os tokens já foram transferidos");
|
||||
expect(wrapper.html()).toContain("para a sua carteira!");
|
||||
});
|
||||
|
||||
test("Test component Container Text", () => {
|
||||
expect(wrapper.html()).toContain("Tokens recebidos");
|
||||
expect(wrapper.html()).toContain("BRZ");
|
||||
expect(wrapper.html()).toContain("Não encontrou os tokens?");
|
||||
expect(wrapper.html()).toContain("Clique no botão abaixo para");
|
||||
expect(wrapper.html()).toContain("cadastrar o BRZ em sua carteira.");
|
||||
});
|
||||
|
||||
test("Test makeAnotherTransactionEmit", async () => {
|
||||
wrapper.vm.$emit("makeAnotherTransaction");
|
||||
|
||||
await wrapper.vm.$nextTick();
|
||||
|
||||
expect(wrapper.emitted("makeAnotherTransaction")).toBeTruthy();
|
||||
});
|
||||
});
|
@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import SearchComponent from "../components/SearchComponent.vue";
|
||||
import ValidationComponent from "../components/LoadingComponent.vue";
|
||||
import BuyConfirmedComponent from "@/components/BuyConfirmedComponent.vue";
|
||||
import BuyConfirmedComponent from "@/components/BuyConfirmedComponent/BuyConfirmedComponent.vue";
|
||||
import blockchain from "../utils/blockchain";
|
||||
import { ref } from "vue";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user