test swish payment account over grpc api

This commit is contained in:
woodser 2025-06-19 16:05:49 -04:00
parent 8293dc34b6
commit 8976ebe28e
No known key found for this signature in database
GPG key ID: 55A10DD48ADEE5EF

View file

@ -4734,6 +4734,12 @@ function testPaymentAccount(account: PaymentAccount, form: PaymentAccountForm) {
expect(account.getPaymentAccountPayload()!.getAliPayAccountPayload()!.getAccountNr()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.ACCOUNT_NR).getValue()); expect(account.getPaymentAccountPayload()!.getAliPayAccountPayload()!.getAccountNr()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.ACCOUNT_NR).getValue());
expect(account.getTradeCurrenciesList().map(currency => currency.getCode()).join(",")).toEqual(getFormField(form, PaymentAccountFormField.FieldId.TRADE_CURRENCIES).getValue()); expect(account.getTradeCurrenciesList().map(currency => currency.getCode()).join(",")).toEqual(getFormField(form, PaymentAccountFormField.FieldId.TRADE_CURRENCIES).getValue());
break; break;
case PaymentAccountForm.FormId.SWISH:
expect(account.getPaymentAccountPayload()!.getSwishAccountPayload()!.getHolderName()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.HOLDER_NAME).getValue());
expect(account.getPaymentAccountPayload()!.getSwishAccountPayload()!.getMobileNr()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.MOBILE_NR).getValue());
expect(account.getTradeCurrenciesList().length).toEqual(1);
expect(account.getTradeCurrenciesList()[0].getCode()).toEqual("SEK");
break;
default: default:
throw new Error("Unhandled payment method type: " + form.getId()); throw new Error("Unhandled payment method type: " + form.getId());
} }