diff --git a/packages/taler-wallet-cli/src/integrationtests/libeufin.ts b/packages/taler-wallet-cli/src/integrationtests/libeufin.ts index 7a6f3ee17..a30ce97ab 100644 --- a/packages/taler-wallet-cli/src/integrationtests/libeufin.ts +++ b/packages/taler-wallet-cli/src/integrationtests/libeufin.ts @@ -696,6 +696,46 @@ export class LibeufinCli { ); console.log(stdout); } + + async newTalerWireGatewayFacade(req: NewTalerWireGatewayReq): Promise { + const stdout = await sh( + this.globalTestState, + "libeufin-cli-new-taler-wire-gateway-facade", + `libeufin-cli facades new-taler-wire-gateway-facade` + + ` --currency ${req.currency}` + + ` --facade-name ${req.facadeName}` + + ` ${req.connectionName} ${req.accountName}`, + { + ...process.env, + LIBEUFIN_NEXUS_URL: this.cliDetails.nexusUrl, + LIBEUFIN_NEXUS_USERNAME: this.cliDetails.user.username, + LIBEUFIN_NEXUS_PASSWORD: this.cliDetails.user.password, + }, + ); + console.log(stdout); + } + + async listFacades(): Promise { + const stdout = await sh( + this.globalTestState, + "libeufin-cli-facades-list", + `libeufin-cli facades list`, + { + ...process.env, + LIBEUFIN_NEXUS_URL: this.cliDetails.nexusUrl, + LIBEUFIN_NEXUS_USERNAME: this.cliDetails.user.username, + LIBEUFIN_NEXUS_PASSWORD: this.cliDetails.user.password, + }, + ); + console.log(stdout); + } +} + +interface NewTalerWireGatewayReq { + facadeName: string; + connectionName: string; + accountName: string; + currency: string; } export namespace LibeufinSandboxApi { diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts index 31fb7465f..59c9b28ad 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts @@ -117,5 +117,14 @@ export async function runLibeufinTutorialTest(t: GlobalTestState) { }; await libeufinCli.preparePayment(paymentDetails); await libeufinCli.submitPayment(paymentDetails, "1"); + + await libeufinCli.newTalerWireGatewayFacade({ + accountName: bankAccountImportDetails.nexusBankAccountName, + connectionName: "my-ebics-conn", + currency: "EUR", + facadeName: "my-twg", + }); + + await libeufinCli.listFacades(); } runLibeufinTutorialTest.suites = ["libeufin"];