summaryrefslogtreecommitdiff
path: root/packages/taler-harness/src/integrationtests/test-denom-unoffered.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-harness/src/integrationtests/test-denom-unoffered.ts')
-rw-r--r--packages/taler-harness/src/integrationtests/test-denom-unoffered.ts14
1 files changed, 12 insertions, 2 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-denom-unoffered.ts b/packages/taler-harness/src/integrationtests/test-denom-unoffered.ts
index 1a62a6065..6a82d586c 100644
--- a/packages/taler-harness/src/integrationtests/test-denom-unoffered.ts
+++ b/packages/taler-harness/src/integrationtests/test-denom-unoffered.ts
@@ -21,6 +21,7 @@ import {
MerchantApiClient,
PreparePayResultType,
TalerErrorCode,
+ TransactionType,
} from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { GlobalTestState } from "../harness/harness.js";
@@ -93,7 +94,7 @@ export async function runDenomUnofferedTest(t: GlobalTestState) {
);
const confirmResp = await walletClient.call(WalletApiOperation.ConfirmPay, {
- proposalId: preparePayResult.proposalId,
+ transactionId: preparePayResult.transactionId,
});
const tx = await walletClient.call(WalletApiOperation.GetTransactionById, {
@@ -130,6 +131,7 @@ export async function runDenomUnofferedTest(t: GlobalTestState) {
// Force updating the exchange entry so that the wallet knows about the new denominations.
await walletClient.call(WalletApiOperation.UpdateExchangeEntry, {
exchangeBaseUrl: exchange.baseUrl,
+ force: true,
});
await walletClient.call(WalletApiOperation.DeleteTransaction, {
@@ -146,8 +148,16 @@ export async function runDenomUnofferedTest(t: GlobalTestState) {
await walletClient.call(WalletApiOperation.TestingWaitTransactionsFinal, {});
- const txs = await walletClient.call(WalletApiOperation.GetTransactions, {});
+ const txs = await walletClient.call(WalletApiOperation.GetTransactions, {
+ sort: "stable-ascending",
+ includeRefreshes: true,
+ });
console.log(JSON.stringify(txs, undefined, 2));
+
+ t.assertDeepEqual(txs.transactions[0].type, TransactionType.Withdrawal);
+ t.assertDeepEqual(txs.transactions[1].type, TransactionType.Refresh);
+ t.assertDeepEqual(txs.transactions[2].type, TransactionType.DenomLoss);
+ t.assertDeepEqual(txs.transactions[3].type, TransactionType.Withdrawal);
}
runDenomUnofferedTest.suites = ["wallet"];