commit 780a08233351b1ecb108289b919fae4772f49de8 parent cbf261e2b81b4db6a0e55620a8e85b70f21bb52e Author: Florian Dold <florian@dold.me> Date: Thu, 12 Jun 2025 22:11:01 +0200 harness: use GANA names Diffstat:
7 files changed, 34 insertions(+), 14 deletions(-)
diff --git a/packages/taler-harness/src/integrationtests/test-kyc-challenger.ts b/packages/taler-harness/src/integrationtests/test-kyc-challenger.ts @@ -108,7 +108,7 @@ async function runTestfakeKycService(): Promise<TestfakeKycService> { status: "success", data: { id: "Foobar", - first_name: "Alice", + full_name: "Alice", last_name: "Abc", birthdate: "2000-01-01", }, @@ -155,7 +155,7 @@ export async function runKycChallengerTest(t: GlobalTestState) { config.setString("KYC-CHECK-C1", "provider_id", "MYPROV"); config.setString("KYC-CHECK-C1", "description", "my check!"); config.setString("KYC-CHECK-C1", "description_i18n", "{}"); - config.setString("KYC-CHECK-C1", "outputs", "full_name birthdate"); + config.setString("KYC-CHECK-C1", "outputs", "FULL_NAME DATE_OF_BIRTH"); config.setString("KYC-CHECK-C1", "fallback", "FREEZE"); config.setString( @@ -167,7 +167,7 @@ export async function runKycChallengerTest(t: GlobalTestState) { config.setString( "AML-PROGRAM-P1", "description", - "test for full_name and birthdate", + "test for FULL_NAME and DATE_OF_BIRTH", ); config.setString("AML-PROGRAM-P1", "description_i18n", "{}"); config.setString("AML-PROGRAM-P1", "fallback", "FREEZE"); diff --git a/packages/taler-harness/src/integrationtests/test-kyc-form-withdrawal.ts b/packages/taler-harness/src/integrationtests/test-kyc-form-withdrawal.ts @@ -66,7 +66,7 @@ function adjustExchangeConfig(config: Configuration) { config.setString( "AML-PROGRAM-P1", "description", - "test for full_name and birthdate", + "test for FULL_NAME and DATE_OF_BIRTH", ); config.setString("AML-PROGRAM-P1", "description_i18n", "{}"); config.setString("AML-PROGRAM-P1", "fallback", "FREEZE"); @@ -75,7 +75,7 @@ function adjustExchangeConfig(config: Configuration) { config.setString("KYC-CHECK-C1", "form_name", "myform"); config.setString("KYC-CHECK-C1", "description", "my check!"); config.setString("KYC-CHECK-C1", "description_i18n", "{}"); - config.setString("KYC-CHECK-C1", "outputs", "full_name birthdate"); + config.setString("KYC-CHECK-C1", "outputs", "FULL_NAME DATE_OF_BIRTH"); config.setString("KYC-CHECK-C1", "fallback", "FREEZE"); config.setString("KYC-CHECK-C2", "type", "INFO"); @@ -140,8 +140,8 @@ export async function runKycFormWithdrawalTest(t: GlobalTestState) { "Content-Type": "application/json", }, body: { - full_name: "Alice Abc", - birthdate: "2000-01-01", + FULL_NAME: "Alice Abc", + DATE_OF_BIRTH: "2000-01-01", }, }, ); diff --git a/packages/taler-harness/src/integrationtests/test-kyc-new-measure.ts b/packages/taler-harness/src/integrationtests/test-kyc-new-measure.ts @@ -94,7 +94,7 @@ export async function runKycNewMeasureTest(t: GlobalTestState) { config.setString("KYC-CHECK-C1", "form_name", "myform"); config.setString("KYC-CHECK-C1", "description", "my check!"); config.setString("KYC-CHECK-C1", "description_i18n", "{}"); - config.setString("KYC-CHECK-C1", "outputs", "full_name birthdate"); + config.setString("KYC-CHECK-C1", "outputs", "FULL_NAME DATE_OF_BIRTH"); config.setString("KYC-CHECK-C1", "fallback", "FREEZE"); config.setString("KYC-CHECK-C2", "type", "INFO"); @@ -167,8 +167,8 @@ export async function runKycNewMeasureTest(t: GlobalTestState) { "Content-Type": "application/json", }, body: { - full_name: "Alice Abc", - birthdate: "2020-01-01", + FULL_NAME: "Alice Abc", + DATE_OF_BIRTH: "2020-01-01", }, }, ); diff --git a/packages/taler-harness/src/integrationtests/test-merchant-exchange-confusion.ts b/packages/taler-harness/src/integrationtests/test-merchant-exchange-confusion.ts @@ -186,7 +186,7 @@ export async function runMerchantExchangeConfusionTest(t: GlobalTestState) { await wres.withdrawalFinishedCond; - /** + /* * ========================================================================= * Create an order and let the wallet pay under a session ID * diff --git a/packages/taler-harness/src/integrationtests/test-merchant-longpolling.ts b/packages/taler-harness/src/integrationtests/test-merchant-longpolling.ts @@ -55,7 +55,7 @@ export async function runMerchantLongpollingTest(t: GlobalTestState) { merchant.makeInstanceBaseUrl(), ); - /** + /* * ========================================================================= * Create an order and let the wallet pay under a session ID * diff --git a/packages/taler-harness/src/integrationtests/test-pay-paid.ts b/packages/taler-harness/src/integrationtests/test-pay-paid.ts @@ -61,7 +61,7 @@ export async function runPayPaidTest(t: GlobalTestState) { await wres.withdrawalFinishedCond; - /** + /* * ========================================================================= * Create an order and let the wallet pay under a session ID * diff --git a/packages/taler-harness/src/integrationtests/test-paywall-flow.ts b/packages/taler-harness/src/integrationtests/test-paywall-flow.ts @@ -21,8 +21,10 @@ import { ConfirmPayResultType, PreparePayResultType, TalerMerchantInstanceHttpClient, + TransactionMajorState, URL, codecForMerchantOrderStatusUnpaid, + j2s, succeedOrThrow, } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; @@ -56,7 +58,7 @@ export async function runPaywallFlowTest(t: GlobalTestState) { await wres.withdrawalFinishedCond; - /** + /* * ========================================================================= * Create an order and let the wallet pay under a session ID * @@ -175,6 +177,13 @@ export async function runPaywallFlowTest(t: GlobalTestState) { t.assertTrue(preparePayResp.status === PreparePayResultType.AlreadyConfirmed); t.assertTrue(preparePayResp.paid); + await walletClient.call(WalletApiOperation.TestingWaitTransactionState, { + transactionId: preparePayResp.transactionId, + txState: { + major: TransactionMajorState.Done, + }, + }); + /** * ========================================================================= * Now we test re-purchase detection. @@ -219,6 +228,13 @@ export async function runPaywallFlowTest(t: GlobalTestState) { t.assertTrue(preparePayResp.status === PreparePayResultType.AlreadyConfirmed); t.assertTrue(preparePayResp.paid); + await walletClient.call(WalletApiOperation.TestingWaitTransactionState, { + transactionId: preparePayResp.transactionId, + txState: { + major: TransactionMajorState.Done, + }, + }); + // The first order should now be paid under "mysession-three", // as the wallet did re-purchase detection orderStatus = succeedOrThrow( @@ -227,6 +243,8 @@ export async function runPaywallFlowTest(t: GlobalTestState) { }), ); + console.log(`order status (mysession-three)`, j2s(orderStatus)); + t.assertTrue(orderStatus.order_status === "paid"); // Check that with a completely new session ID, the status would NOT @@ -237,6 +255,8 @@ export async function runPaywallFlowTest(t: GlobalTestState) { }), ); + console.log(`order status (mysession-four)`, j2s(orderStatus)); + t.assertTrue(orderStatus.order_status === "claimed"); // Now check if the public status of the new order is correct.