diff options
Diffstat (limited to 'packages/taler-harness/src/integrationtests/test-deposit.ts')
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-deposit.ts | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-deposit.ts b/packages/taler-harness/src/integrationtests/test-deposit.ts index 6aa086107..8ea3fc12e 100644 --- a/packages/taler-harness/src/integrationtests/test-deposit.ts +++ b/packages/taler-harness/src/integrationtests/test-deposit.ts @@ -17,7 +17,11 @@ /** * Imports. */ -import { NotificationType, TransactionState } from "@gnu-taler/taler-util"; +import { + NotificationType, + TransactionMajorState, + TransactionMinorState, +} from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { GlobalTestState, getPayto } from "../harness/harness.js"; import { @@ -52,11 +56,19 @@ export async function runDepositTest(t: GlobalTestState) { const depositTxId = dgIdResp.transactionId; + const depositTrack = walletClient.waitForNotificationCond( + (n) => + n.type == NotificationType.TransactionStateTransition && + n.transactionId == depositTxId && + n.newTxState.major == TransactionMajorState.Pending && + n.newTxState.minor == TransactionMinorState.Track, + ); + const depositDone = walletClient.waitForNotificationCond( (n) => n.type == NotificationType.TransactionStateTransition && n.transactionId == depositTxId && - n.newTxState == TransactionState.Done, + n.newTxState.major == TransactionMajorState.Done, ); const depositGroupResult = await walletClient.client.call( @@ -70,6 +82,12 @@ export async function runDepositTest(t: GlobalTestState) { t.assertDeepEqual(depositGroupResult.transactionId, depositTxId); + await depositTrack; + + await exchange.runAggregatorOnceWithTimetravel({ + timetravelMicroseconds: 1000 * 1000 * 60 * 60 * 3, + }); + await depositDone; const transactions = await walletClient.client.call( |