taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit d1acc36414d251d92b2669acfe7d62ff614caeec
parent e065472c97723c1c07e87a7371fb2e91470e53d9
Author: Florian Dold <florian@dold.me>
Date:   Mon, 13 Nov 2023 12:22:12 +0100

harness: fix denom-unoffered test

Diffstat:
Mpackages/taler-harness/src/integrationtests/test-denom-unoffered.ts | 23++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/packages/taler-harness/src/integrationtests/test-denom-unoffered.ts b/packages/taler-harness/src/integrationtests/test-denom-unoffered.ts @@ -100,16 +100,33 @@ export async function runDenomUnofferedTest(t: GlobalTestState) { transactionId: confirmResp.transactionId, }); + t.assertTrue(tx.error != null); t.assertTrue( - tx.error?.code === TalerErrorCode.WALLET_UNEXPECTED_REQUEST_ERROR, + tx.error.code === TalerErrorCode.WALLET_PAY_MERCHANT_SERVER_ERROR, ); - const merchantErrorCode = ((tx.error as any).errorResponse as any).code; + const merchantErrorCode = (tx.error as any).requestError.errorResponse.code; + t.assertDeepEqual( merchantErrorCode, - TalerErrorCode.MERCHANT_POST_ORDERS_ID_PAY_DENOMINATION_KEY_NOT_FOUND, + TalerErrorCode.MERCHANT_GENERIC_EXCHANGE_UNEXPECTED_STATUS, + ); + + const exchangeErrorCode = (tx.error as any).requestError.errorResponse + .exchange_ec; + + t.assertDeepEqual( + exchangeErrorCode, + TalerErrorCode.EXCHANGE_GENERIC_DENOMINATION_KEY_UNKNOWN, ); + // Depending on whether the merchant has seen the new denominations or not, + // the error code might be different here. + // t.assertDeepEqual( + // merchantErrorCode, + // TalerErrorCode.MERCHANT_POST_ORDERS_ID_PAY_DENOMINATION_KEY_NOT_FOUND, + // ); + await walletClient.call(WalletApiOperation.AddExchange, { exchangeBaseUrl: exchange.baseUrl, forceUpdate: true,