summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/cta/Tip/test.ts
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-11-16 16:04:52 -0300
committerSebastian <sebasjm@gmail.com>2022-11-16 16:05:13 -0300
commit1a63d56bfdd091cc7aefdf1e25f3a074bfdf5e0e (patch)
tree7255cf4a5b51af4807e2a01a370497413a78968f /packages/taler-wallet-webextension/src/cta/Tip/test.ts
parent53164dc47b1138235a0c797affaa6fb37ea43239 (diff)
downloadwallet-core-1a63d56bfdd091cc7aefdf1e25f3a074bfdf5e0e.tar.gz
wallet-core-1a63d56bfdd091cc7aefdf1e25f3a074bfdf5e0e.tar.bz2
wallet-core-1a63d56bfdd091cc7aefdf1e25f3a074bfdf5e0e.zip
fix #7411, also making the backup payment visible
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Tip/test.ts')
-rw-r--r--packages/taler-wallet-webextension/src/cta/Tip/test.ts23
1 files changed, 11 insertions, 12 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/Tip/test.ts b/packages/taler-wallet-webextension/src/cta/Tip/test.ts
index 69badbede..e57b9ec4d 100644
--- a/packages/taler-wallet-webextension/src/cta/Tip/test.ts
+++ b/packages/taler-wallet-webextension/src/cta/Tip/test.ts
@@ -65,11 +65,10 @@ describe("Tip CTA states", () => {
}
await assertNoPendingUpdate();
- expect(handler.getCallingQueueState()).eq("empty")
+ expect(handler.getCallingQueueState()).eq("empty");
});
it("should be ready for accepting the tip", async () => {
-
const { handler, mock } = createWalletApiMock();
handler.addWalletCallResponse(WalletApiOperation.PrepareTip, undefined, {
@@ -79,9 +78,9 @@ describe("Tip CTA states", () => {
tipAmountEffective: "EUR:1",
walletTipId: "tip_id",
expirationTimestamp: {
- t_s: 1
+ t_s: 1,
},
- tipAmountRaw: ""
+ tipAmountRaw: "",
});
const { pullLastResultOrThrow, waitForStateUpdate, assertNoPendingUpdate } =
@@ -112,7 +111,7 @@ describe("Tip CTA states", () => {
const state = pullLastResultOrThrow();
if (state.status !== "ready") {
- expect(state).eq({ status: "ready" })
+ expect(state).eq({ status: "ready" });
return;
}
if (state.error) expect.fail();
@@ -132,9 +131,9 @@ describe("Tip CTA states", () => {
tipAmountEffective: "EUR:1",
walletTipId: "tip_id",
expirationTimestamp: {
- t_s: 1
+ t_s: 1,
},
- tipAmountRaw: ""
+ tipAmountRaw: "",
});
expect(await waitForStateUpdate()).true;
@@ -142,7 +141,7 @@ describe("Tip CTA states", () => {
const state = pullLastResultOrThrow();
if (state.status !== "accepted") {
- expect(state).eq({ status: "accepted" })
+ expect(state).eq({ status: "accepted" });
return;
}
if (state.error) expect.fail();
@@ -151,7 +150,7 @@ describe("Tip CTA states", () => {
expect(state.exchangeBaseUrl).eq("exchange url");
}
await assertNoPendingUpdate();
- expect(handler.getCallingQueueState()).eq("empty")
+ expect(handler.getCallingQueueState()).eq("empty");
});
it("should be ignored after clicking the ignore button", async () => {
@@ -165,7 +164,7 @@ describe("Tip CTA states", () => {
expirationTimestamp: {
t_s: 1,
},
- tipAmountRaw: ""
+ tipAmountRaw: "",
});
const { pullLastResultOrThrow, waitForStateUpdate, assertNoPendingUpdate } =
@@ -203,7 +202,7 @@ describe("Tip CTA states", () => {
}
await assertNoPendingUpdate();
- expect(handler.getCallingQueueState()).eq("empty")
+ expect(handler.getCallingQueueState()).eq("empty");
});
it("should render accepted if the tip has been used previously", async () => {
@@ -255,6 +254,6 @@ describe("Tip CTA states", () => {
expect(state.exchangeBaseUrl).eq("exchange url");
}
await assertNoPendingUpdate();
- expect(handler.getCallingQueueState()).eq("empty")
+ expect(handler.getCallingQueueState()).eq("empty");
});
});