aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-harness/src/integrationtests/test-wallet-refresh-blocked.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-harness/src/integrationtests/test-wallet-refresh-blocked.ts')
-rw-r--r--packages/taler-harness/src/integrationtests/test-wallet-refresh-blocked.ts50
1 files changed, 48 insertions, 2 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-wallet-refresh-blocked.ts b/packages/taler-harness/src/integrationtests/test-wallet-refresh-blocked.ts
index 806802612..8c568d190 100644
--- a/packages/taler-harness/src/integrationtests/test-wallet-refresh-blocked.ts
+++ b/packages/taler-harness/src/integrationtests/test-wallet-refresh-blocked.ts
@@ -17,22 +17,50 @@
/**
* Imports.
*/
+import { j2s } from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
+import { CoinConfig } from "../harness/denomStructures.js";
import { GlobalTestState } from "../harness/harness.js";
import {
createSimpleTestkudosEnvironmentV2,
createWalletDaemonWithClient,
+ makeTestPaymentV2,
withdrawViaBankV2,
} from "../harness/helpers.js";
+const coinCommon = {
+ cipher: "RSA" as const,
+ durationLegal: "3 years",
+ durationSpend: "2 years",
+ durationWithdraw: "7 days",
+ feeDeposit: "TESTKUDOS:0",
+ feeRefresh: "TESTKUDOS:0",
+ feeRefund: "TESTKUDOS:0",
+ feeWithdraw: "TESTKUDOS:0",
+ rsaKeySize: 1024,
+};
+
/**
* Run test for refreshe after a payment.
*/
export async function runWalletRefreshBlockedTest(t: GlobalTestState) {
// Set up test environment
+ const coinConfigList: CoinConfig[] = [
+ {
+ ...coinCommon,
+ name: "n1",
+ value: "TESTKUDOS:1",
+ },
+ {
+ ...coinCommon,
+ name: "n5",
+ value: "TESTKUDOS:5",
+ },
+ ];
+
const { walletClient, bank, exchange, merchant } =
- await createSimpleTestkudosEnvironmentV2(t);
+ await createSimpleTestkudosEnvironmentV2(t, coinConfigList);
// Withdraw digital cash into the wallet.
@@ -60,7 +88,25 @@ export async function runWalletRefreshBlockedTest(t: GlobalTestState) {
devExperimentUri: "taler://dev-experiment/start-block-refresh",
});
- // FIXME: Now force a refresh, check balance
+ await makeTestPaymentV2(t, {
+ merchant,
+ walletClient: w1,
+ order: {
+ summary: "test",
+ amount: "TESTKUDOS:2",
+ },
+ });
+
+ const bal = await w1.call(WalletApiOperation.GetBalances, {});
+ console.log(`balance: ${j2s(bal)}`);
+
+ const balDet = await w1.call(WalletApiOperation.GetBalanceDetail, {
+ currency: "TESTKUDOS",
+ });
+ console.log(`balance details: ${j2s(balDet)}`);
+
+ // FIXME: Now check deposit/p2p/pay
+ t.assertTrue(false);
}
runWalletRefreshBlockedTest.suites = ["wallet"];