Skip to content

Commit

Permalink
Merge branch 'develop' into hotfix/safari-modal-focus
Browse files Browse the repository at this point in the history
  • Loading branch information
jadutter committed Oct 11, 2023
2 parents f2b7b2d + 4ac100f commit 8baa35d
Show file tree
Hide file tree
Showing 38 changed files with 26 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/modal/v2/parts/Calculator.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ const Calculator = ({ setExpandedState, calculator, aprDisclaimer }) => {
}`}
>
<div>
{error ? <Icon name="warning" /> : null}
{error && hasUsedInputField ? <Icon name="warning" /> : null}
<div>{error}</div>
</div>
</div>
Expand Down
6 changes: 6 additions & 0 deletions src/components/modal/v2/styles/components/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@
transform: translate(0, 0);
}
}

.pp-logo {
pointer-events: none;
}
}
}

Expand Down Expand Up @@ -158,6 +162,7 @@
svg {
height: 48px;
width: 48px;
pointer-events: none;

@include desktop {
margin: 0px;
Expand Down Expand Up @@ -190,6 +195,7 @@
position: absolute;
right: 0;
bottom: 36px;
pointer-events: none;

@include desktop {
&.background-mobile {
Expand Down
7 changes: 4 additions & 3 deletions src/library/zoid/message/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,14 @@ export default {
if (typeof merchantId !== 'undefined') {
if (!validateType(Types.STRING, merchantId)) {
logInvalidType('merchantId', Types.STRING, merchantId);
} else if (merchantId.length !== 13 && merchantId.length !== 10) {
logInvalid('merchantId', 'Ensure the correct Merchant ID has been entered.');
} else {
const isInvalid = merchantId.split(',').some(id => id.length !== 13 && id.length !== 10);
if (isInvalid) {
logInvalid('merchantId', 'Ensure the correct Merchant ID has been entered.');
}
return merchantId;
}
}

return undefined;
},
customerId: ({ props: { customerId } }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/sdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function getMerchantConfig() {
export function getAccount() {
if (__MESSAGES__.__TARGET__ === 'SDK') {
// TODO: Should we pass both up if they exist so that nodeweb can create a partner context?
return getMerchantID()[0] || `client-id:${getClientID()}`;
return getMerchantID().join(',') || `client-id:${getClientID()}`;
} else {
return undefined;
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 14 additions & 1 deletion tests/unit/spec/src/zoid/message/validation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,22 @@ describe('validate', () => {
expect(merchantId).toEqual(merchantId);
expect(console.warn).not.toHaveBeenCalled();

merchantId = validate.merchantId({ props: { merchantId: 'DEV00000000NI,DEV00000001NI' } });
expect(merchantId).toEqual(merchantId);
expect(console.warn).not.toHaveBeenCalled();

merchantId = validate.merchantId({ props: { merchantId: 'DEV00000000,DEV00000001NI' } });

expect(merchantId).toEqual(merchantId);
expect(console.warn).toHaveBeenCalledTimes(1);
expect(console.warn).toHaveBeenLastCalledWith(
expect.stringContaining('invalid_option_value'),
expect.objectContaining({ location: 'merchantId' })
);

merchantId = validate.merchantId({ props: { merchantId: 'client-id:test_client_id' } });

expect(merchantId).toBeUndefined();
expect(merchantId).toEqual(merchantId);
expect(console.warn).toHaveBeenCalledTimes(1);
expect(console.warn).toHaveBeenLastCalledWith(
expect.stringContaining('invalid_option_value'),
Expand Down

0 comments on commit 8baa35d

Please sign in to comment.