summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/cta/Refund
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-09-16 16:04:41 -0300
committerSebastian <sebasjm@gmail.com>2022-09-16 16:04:41 -0300
commite14310825437c5de93c07c570639d2a09fc4826b (patch)
tree6d63ed9d62bdb21fdbf41e8c5d30fcc08bb9326f /packages/taler-wallet-webextension/src/cta/Refund
parent59d235e8d29159bc8caccf8bee6a2bca8b0b90dc (diff)
downloadwallet-core-e14310825437c5de93c07c570639d2a09fc4826b.tar.gz
wallet-core-e14310825437c5de93c07c570639d2a09fc4826b.tar.bz2
wallet-core-e14310825437c5de93c07c570639d2a09fc4826b.zip
pretty
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Refund')
-rw-r--r--packages/taler-wallet-webextension/src/cta/Refund/stories.tsx6
-rw-r--r--packages/taler-wallet-webextension/src/cta/Refund/test.ts107
2 files changed, 58 insertions, 55 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/Refund/stories.tsx b/packages/taler-wallet-webextension/src/cta/Refund/stories.tsx
index d74120dff..f95bfc693 100644
--- a/packages/taler-wallet-webextension/src/cta/Refund/stories.tsx
+++ b/packages/taler-wallet-webextension/src/cta/Refund/stories.tsx
@@ -22,11 +22,7 @@
import { Amounts } from "@gnu-taler/taler-util";
import beer from "../../../static-dev/beer.png";
import { createExample } from "../../test-utils.js";
-import {
- IgnoredView,
- InProgressView,
- ReadyView,
-} from "./views.js";
+import { IgnoredView, InProgressView, ReadyView } from "./views.js";
export default {
title: "cta/refund",
};
diff --git a/packages/taler-wallet-webextension/src/cta/Refund/test.ts b/packages/taler-wallet-webextension/src/cta/Refund/test.ts
index 09470b7f6..3111a85c6 100644
--- a/packages/taler-wallet-webextension/src/cta/Refund/test.ts
+++ b/packages/taler-wallet-webextension/src/cta/Refund/test.ts
@@ -40,7 +40,9 @@ describe("Refund CTA states", () => {
cancel: async () => {
null;
},
- onSuccess: async () => { null; },
+ onSuccess: async () => {
+ null;
+ },
},
{
prepareRefund: async () => ({}),
@@ -80,26 +82,28 @@ describe("Refund CTA states", () => {
cancel: async () => {
null;
},
- onSuccess: async () => { null; },
+ onSuccess: async () => {
+ null;
+ },
},
{
prepareRefund: async () =>
- ({
- effectivePaid: "EUR:2",
- awaiting: "EUR:2",
- gone: "EUR:0",
- granted: "EUR:0",
- pending: false,
- proposalId: "1",
- info: {
- contractTermsHash: "123",
- merchant: {
- name: "the merchant name",
+ ({
+ effectivePaid: "EUR:2",
+ awaiting: "EUR:2",
+ gone: "EUR:0",
+ granted: "EUR:0",
+ pending: false,
+ proposalId: "1",
+ info: {
+ contractTermsHash: "123",
+ merchant: {
+ name: "the merchant name",
+ },
+ orderId: "orderId1",
+ summary: "the summary",
},
- orderId: "orderId1",
- summary: "the summary",
- },
- } as PrepareRefundResult as any),
+ } as PrepareRefundResult as any),
applyRefund: async () => ({}),
onUpdateNotification: async () => ({}),
} as any,
@@ -138,26 +142,28 @@ describe("Refund CTA states", () => {
cancel: async () => {
null;
},
- onSuccess: async () => { null; },
+ onSuccess: async () => {
+ null;
+ },
},
{
prepareRefund: async () =>
- ({
- effectivePaid: "EUR:2",
- awaiting: "EUR:2",
- gone: "EUR:0",
- granted: "EUR:0",
- pending: false,
- proposalId: "1",
- info: {
- contractTermsHash: "123",
- merchant: {
- name: "the merchant name",
+ ({
+ effectivePaid: "EUR:2",
+ awaiting: "EUR:2",
+ gone: "EUR:0",
+ granted: "EUR:0",
+ pending: false,
+ proposalId: "1",
+ info: {
+ contractTermsHash: "123",
+ merchant: {
+ name: "the merchant name",
+ },
+ orderId: "orderId1",
+ summary: "the summary",
},
- orderId: "orderId1",
- summary: "the summary",
- },
- } as PrepareRefundResult as any),
+ } as PrepareRefundResult as any),
applyRefund: async () => ({}),
onUpdateNotification: async () => ({}),
} as any,
@@ -223,27 +229,28 @@ describe("Refund CTA states", () => {
cancel: async () => {
null;
},
- onSuccess: async () => { null; },
-
+ onSuccess: async () => {
+ null;
+ },
},
{
prepareRefund: async () =>
- ({
- awaiting: Amounts.stringify(awaiting),
- effectivePaid: "EUR:2",
- gone: "EUR:0",
- granted: Amounts.stringify(granted),
- pending,
- proposalId: "1",
- info: {
- contractTermsHash: "123",
- merchant: {
- name: "the merchant name",
+ ({
+ awaiting: Amounts.stringify(awaiting),
+ effectivePaid: "EUR:2",
+ gone: "EUR:0",
+ granted: Amounts.stringify(granted),
+ pending,
+ proposalId: "1",
+ info: {
+ contractTermsHash: "123",
+ merchant: {
+ name: "the merchant name",
+ },
+ orderId: "orderId1",
+ summary: "the summary",
},
- orderId: "orderId1",
- summary: "the summary",
- },
- } as PrepareRefundResult as any),
+ } as PrepareRefundResult as any),
applyRefund: async () => ({}),
onUpdateNotification: subscriptions.saveSubscription,
} as any,