Skip to content

Commit d014a67

Browse files
committed
AC-1228::Fixed Automation Failed Tests
1 parent 720b43e commit d014a67

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

app/code/Magento/Paypal/Test/Unit/Model/_files/expected_style_config.php

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@
2727
],
2828
'isVisibleOnProductPage' => false,
2929
'isGuestCheckoutAllowed' => true,
30-
'sdkUrl' => 'http://mock.url'
30+
'sdkUrl' => 'http://mock.url',
31+
'dataAttributes' => [
32+
'data-partner-attribution-id' => 'BN_CODE'
33+
]
3134
]
3235
],
3336
'checkout' => [
@@ -51,7 +54,10 @@
5154
],
5255
'isVisibleOnProductPage' => false,
5356
'isGuestCheckoutAllowed' => true,
54-
'sdkUrl' => 'http://mock.url'
57+
'sdkUrl' => 'http://mock.url',
58+
'dataAttributes' => [
59+
'data-partner-attribution-id' => 'BN_CODE'
60+
]
5561
]
5662
],
5763
'mini_cart' => [
@@ -74,7 +80,10 @@
7480
],
7581
'isVisibleOnProductPage' => false,
7682
'isGuestCheckoutAllowed' => true,
77-
'sdkUrl' => 'http://mock.url'
83+
'sdkUrl' => 'http://mock.url',
84+
'dataAttributes' => [
85+
'data-partner-attribution-id' => 'BN_CODE'
86+
]
7887
]
7988
],
8089
'product' => [
@@ -97,7 +106,10 @@
97106
],
98107
'isVisibleOnProductPage' => false,
99108
'isGuestCheckoutAllowed' => true,
100-
'sdkUrl' => 'http://mock.url'
109+
'sdkUrl' => 'http://mock.url',
110+
'dataAttributes' => [
111+
'data-partner-attribution-id' => 'BN_CODE'
112+
]
101113
]
102114
],
103115
];

app/code/Magento/Paypal/view/frontend/web/js/in-context/paypal-sdk.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ define([
1313
* Loads the PayPal SDK object
1414
* @param {String} paypalUrl - the url of the PayPal SDK
1515
*/
16-
return function loadPaypalScript(paypalUrl, dataAttributes) {
16+
return function loadPaypalScript(paypalUrl, dataAttributes)
17+
{
1718
//configuration for loaded PayPal script
1819
require.config({
1920
paths: {
@@ -24,9 +25,9 @@ define([
2425
exports: 'paypal'
2526
}
2627
},
27-
onNodeCreated: function(node, config, name, url){
28+
onNodeCreated: function (node, config, name) {
2829
$.each(dataAttributes, function (index, elem) {
29-
node.setAttribute( index, elem);
30+
node.setAttribute(index, elem);
3031
});
3132
}
3233
});

0 commit comments

Comments
 (0)