Fix test cases impacted by new changes on v2 blockchain

This commit is contained in:
RcleydsonR 2023-02-01 23:53:39 -03:00
parent 3340155a3d
commit 980c0cab76
2 changed files with 6 additions and 27 deletions

View File

@ -33,7 +33,7 @@ describe("addresses.ts functions", () => {
const etherStore = useEtherStore(); const etherStore = useEtherStore();
etherStore.setNetworkName(NetworkEnum.ethereum); etherStore.setNetworkName(NetworkEnum.ethereum);
expect(getTokenAddress()).toBe( expect(getTokenAddress()).toBe(
"0x294003F602c321627152c6b7DED3EAb5bEa853Ee" "0x4A2886EAEc931e04297ed336Cc55c4eb7C75BA00"
); );
}); });
@ -41,13 +41,13 @@ describe("addresses.ts functions", () => {
const etherStore = useEtherStore(); const etherStore = useEtherStore();
etherStore.setNetworkName(NetworkEnum.polygon); etherStore.setNetworkName(NetworkEnum.polygon);
expect(getTokenAddress()).toBe( expect(getTokenAddress()).toBe(
"0x294003F602c321627152c6b7DED3EAb5bEa853Ee" "0xC86042E9F2977C62Da8c9dDF7F9c40fde4796A29"
); );
}); });
it("getTokenAddress Default", () => { it("getTokenAddress Default", () => {
expect(getTokenAddress()).toBe( expect(getTokenAddress()).toBe(
"0x294003F602c321627152c6b7DED3EAb5bEa853Ee" "0x4A2886EAEc931e04297ed336Cc55c4eb7C75BA00"
); );
}); });
@ -55,7 +55,7 @@ describe("addresses.ts functions", () => {
const etherStore = useEtherStore(); const etherStore = useEtherStore();
etherStore.setNetworkName(NetworkEnum.ethereum); etherStore.setNetworkName(NetworkEnum.ethereum);
expect(getP2PixAddress()).toBe( expect(getP2PixAddress()).toBe(
"0x5f3EFA9A90532914545CEf527C530658af87e196" "0xefa5cE4351cda51192509cf8De7d8881ADAE95DD"
); );
}); });
@ -63,13 +63,13 @@ describe("addresses.ts functions", () => {
const etherStore = useEtherStore(); const etherStore = useEtherStore();
etherStore.setNetworkName(NetworkEnum.polygon); etherStore.setNetworkName(NetworkEnum.polygon);
expect(getP2PixAddress()).toBe( expect(getP2PixAddress()).toBe(
"0x5f3EFA9A90532914545CEf527C530658af87e196" "0xA9258eBb157E4cf5e756b77FDD0DF09C2F73240b"
); );
}); });
it("getP2PixAddress Default", () => { it("getP2PixAddress Default", () => {
expect(getP2PixAddress()).toBe( expect(getP2PixAddress()).toBe(
"0x5f3EFA9A90532914545CEf527C530658af87e196" "0xefa5cE4351cda51192509cf8De7d8881ADAE95DD"
); );
}); });
@ -102,9 +102,3 @@ describe("addresses.ts functions", () => {
expect(isPossibleNetwork("0x55")).toBe(false); expect(isPossibleNetwork("0x55")).toBe(false);
}); });
}); });
describe("addresses.ts Unset Store", () => {
it("getProviderUrl Unset", () => {
expect(getProviderUrl()).toBe(undefined);
});
});

View File

@ -20,7 +20,6 @@ describe("ListingComponent.vue", () => {
expect(wrapper.html()).toContain("Valor"); expect(wrapper.html()).toContain("Valor");
expect(wrapper.html()).toContain("Data"); expect(wrapper.html()).toContain("Data");
expect(wrapper.html()).toContain("Cancelar oferta");
expect(wrapper.html()).toContain("Retirar tokens"); expect(wrapper.html()).toContain("Retirar tokens");
}); });
@ -70,20 +69,6 @@ describe("ListingComponent.vue", () => {
expect(elements).toHaveLength(5); expect(elements).toHaveLength(5);
}); });
test("Test cancel offer button emit", async () => {
const wrapper = mount(ListingComponent, {
props: {
walletTransactions: MockValidDeposits,
isManageMode: true,
},
});
wrapper.vm.$emit("cancelDeposit");
await wrapper.vm.$nextTick();
expect(wrapper.emitted("cancelDeposit")).toBeTruthy();
});
test("Test withdraw offer button emit", async () => { test("Test withdraw offer button emit", async () => {
const wrapper = mount(ListingComponent, { const wrapper = mount(ListingComponent, {
props: { props: {