diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/taler-wallet-cli/src/integrationtests/libeufin.ts | 18 | ||||
-rw-r--r-- | packages/taler-wallet-cli/src/integrationtests/test-libeufin-facade-anastasis.ts | 13 |
2 files changed, 31 insertions, 0 deletions
diff --git a/packages/taler-wallet-cli/src/integrationtests/libeufin.ts b/packages/taler-wallet-cli/src/integrationtests/libeufin.ts index 71c7aad64..f9266a39d 100644 --- a/packages/taler-wallet-cli/src/integrationtests/libeufin.ts +++ b/packages/taler-wallet-cli/src/integrationtests/libeufin.ts @@ -1157,6 +1157,24 @@ export namespace LibeufinNexusApi { let response = await axios.get(url.href); } + // Uses the Anastasis API to get a list of transactions. + export async function getAnastasisTransactions( + libeufinNexusService: LibeufinNexusService, + anastasisBaseUrl: string, + params: {}, // of the request: {delta: 5, ..} + username: string = "admin", + password: string = "test", + ): Promise<any> { + let url = new URL("/history/incoming", anastasisBaseUrl); + let response = await axios.get(url.href, { params: params, + auth: { + username: username, + password: password, + }, + }); + return response; + } + // FIXME: this function should return some structured // object that represents a history. export async function getAccountTransactions( diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-facade-anastasis.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-facade-anastasis.ts index f412ab8e4..528d398ac 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-facade-anastasis.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-facade-anastasis.ts @@ -23,6 +23,7 @@ import { NexusUserBundle, launchLibeufinServices, LibeufinNexusApi, + LibeufinSandboxApi, } from "./libeufin"; /** @@ -58,6 +59,18 @@ export async function runLibeufinApiFacadeTest(t: GlobalTestState) { t.assertTrue(anastasisBaseUrl.startsWith("http://")); t.assertTrue(anastasisBaseUrl.endsWith("/")); + LibeufinSandboxApi.simulateIncomingTransaction( + libeufinServices.libeufinSandbox, + user01nexus.localAccountName, + { + debtorIban: "ES3314655813489414469157", + debtorBic: "BCMAESM1XXX", + debtorName: "Mock Donor", + subject: "Anastasis donation", + amount: "EUR:3", + }, + ) + //***************************************// // Here payments need to be generated // // and checked via the Anastasis facade. // |