aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-harness/src/integrationtests/test-refund.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-05-05 19:03:44 +0200
committerFlorian Dold <florian@dold.me>2023-05-07 21:51:02 +0200
commit7f0edb6a783d9a50f94f65c815c1280baecaac89 (patch)
treeb4f3bc24fece1f651e8c2f69fc0fcf52e1d6f330 /packages/taler-harness/src/integrationtests/test-refund.ts
parenta0bf83fbb5db026389cc7d203adcff050d5a1b28 (diff)
downloadwallet-core-7f0edb6a783d9a50f94f65c815c1280baecaac89.tar.xz
wallet-core: refund DD37 refactoring
Diffstat (limited to 'packages/taler-harness/src/integrationtests/test-refund.ts')
-rw-r--r--packages/taler-harness/src/integrationtests/test-refund.ts37
1 files changed, 21 insertions, 16 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-refund.ts b/packages/taler-harness/src/integrationtests/test-refund.ts
index 4ae45b8bf..44848d88a 100644
--- a/packages/taler-harness/src/integrationtests/test-refund.ts
+++ b/packages/taler-harness/src/integrationtests/test-refund.ts
@@ -21,6 +21,7 @@ import {
Duration,
durationFromSpec,
NotificationType,
+ TransactionMajorState,
} from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js";
@@ -100,11 +101,14 @@ export async function runRefundTest(t: GlobalTestState) {
console.log(ref);
{
+ // FIXME!
const refundFinishedCond = wallet.waitForNotificationCond(
- (x) => x.type === NotificationType.RefundFinished,
+ (x) =>
+ x.type === NotificationType.TransactionStateTransition &&
+ x.newTxState.major === TransactionMajorState.Done,
);
- const r = await wallet.client.call(WalletApiOperation.ApplyRefund, {
- talerRefundUri: ref.talerRefundUri,
+ const r = await wallet.client.call(WalletApiOperation.StartRefundQuery, {
+ transactionId: r1.transactionId,
});
console.log(r);
@@ -120,19 +124,20 @@ export async function runRefundTest(t: GlobalTestState) {
console.log(JSON.stringify(r2, undefined, 2));
}
- {
- const refundQueriedCond = wallet.waitForNotificationCond(
- (x) => x.type === NotificationType.RefundQueried,
- );
- const r3 = await wallet.client.call(
- WalletApiOperation.ApplyRefundFromPurchaseId,
- {
- purchaseId: r1.proposalId,
- },
- );
- console.log(r3);
- await refundQueriedCond;
- }
+ // FIXME: Test is incomplete without this!
+ // {
+ // const refundQueriedCond = wallet.waitForNotificationCond(
+ // (x) => x.type === NotificationType.RefundQueried,
+ // );
+ // const r3 = await wallet.client.call(
+ // WalletApiOperation.ApplyRefundFromPurchaseId,
+ // {
+ // purchaseId: r1.proposalId,
+ // },
+ // );
+ // console.log(r3);
+ // await refundQueriedCond;
+ // }
}
runRefundTest.suites = ["wallet"];