aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-harness/src/harness
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-02-12 19:30:59 +0100
committerFlorian Dold <florian@dold.me>2023-02-12 19:31:37 +0100
commit13f0442736479fb6ea8d1ecc7311cdac354a4de5 (patch)
treea39badc56b57a5039ec04267adb4df42b84cee7a /packages/taler-harness/src/harness
parent04ab9f37801f6a42b85581cc79667239d3fc79e5 (diff)
downloadwallet-core-13f0442736479fb6ea8d1ecc7311cdac354a4de5.tar.xz
harness: finish kyc test
We mock the KYC gateway now, use the new notification-based wallet API and the test is not experimental anymore.
Diffstat (limited to 'packages/taler-harness/src/harness')
-rw-r--r--packages/taler-harness/src/harness/harness.ts6
-rw-r--r--packages/taler-harness/src/harness/helpers.ts19
2 files changed, 22 insertions, 3 deletions
diff --git a/packages/taler-harness/src/harness/harness.ts b/packages/taler-harness/src/harness/harness.ts
index 3659ea538..275592091 100644
--- a/packages/taler-harness/src/harness/harness.ts
+++ b/packages/taler-harness/src/harness/harness.ts
@@ -2028,9 +2028,9 @@ export class WalletClient {
return getClientFromRemoteWallet(this.remoteWallet);
}
- waitForNotificationCond(
- cond: (n: WalletNotification) => boolean,
- ): Promise<void> {
+ waitForNotificationCond<T>(
+ cond: (n: WalletNotification) => T | undefined | false,
+ ): Promise<T> {
return this.waiter.waitForNotificationCond(cond);
}
}
diff --git a/packages/taler-harness/src/harness/helpers.ts b/packages/taler-harness/src/harness/helpers.ts
index 59a37e4b8..4c2ca80a7 100644
--- a/packages/taler-harness/src/harness/helpers.ts
+++ b/packages/taler-harness/src/harness/helpers.ts
@@ -53,9 +53,14 @@ import {
MerchantServiceInterface,
setupDb,
WalletCli,
+ WalletClient,
+ WalletService,
WithAuthorization,
} from "./harness.js";
+/**
+ * @deprecated
+ */
export interface SimpleTestEnvironment {
commonDb: DbInfo;
bank: BankService;
@@ -65,6 +70,20 @@ export interface SimpleTestEnvironment {
wallet: WalletCli;
}
+/**
+ * Improved version of the simple test environment,
+ * with the daemonized wallet.
+ */
+export interface SimpleTestEnvironmentNg {
+ commonDb: DbInfo;
+ bank: BankService;
+ exchange: ExchangeService;
+ exchangeBankAccount: HarnessExchangeBankAccount;
+ merchant: MerchantService;
+ walletClient: WalletClient;
+ walletService: WalletService;
+}
+
export interface EnvOptions {
/**
* If provided, enable age restrictions with the specified age mask string.