Skip to content

Commit afc0623

Browse files
committed
Merge remote-tracking branch 'mainline/2.4-develop' into 2.4-develop-pr9
2 parents 3502dcf + 420a8b6 commit afc0623

File tree

5 files changed

+79
-57
lines changed

5 files changed

+79
-57
lines changed

app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleAndConfigurableProductTest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
<testCaseId value="MC-14770"/>
1818
<group value="CatalogRule"/>
1919
<group value="mtf_migrated"/>
20+
<skip>
21+
<issueId value="MC-24172"/>
22+
</skip>
2023
</annotations>
2124
<before>
2225
<!-- Login as Admin -->

app/code/Magento/Indexer/Test/Mftf/Section/AdminIndexManagementSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<element name="massActionSubmit" type="button" selector="#gridIndexer_massaction-form button"/>
1616
<element name="indexerSelect" type="select" selector="//select[contains(@class,'action-select-multiselect')]"/>
1717
<element name="indexerStatus" type="text" selector="//tr[descendant::td[contains(., '{{status}}')]]//*[contains(@class, 'col-indexer_status')]/span" parameterized="true"/>
18-
<element name="successMessage" type="text" selector="//*[@data-ui-id='messages-message-success']"/>
18+
<element name="successMessage" type="text" selector="//*[@data-ui-id='messages-message-success']" timeout="120"/>
1919
<element name="selectMassAction" type="select" selector="#gridIndexer_massaction-mass-select"/>
2020
</section>
2121
</sections>

dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/view/shipping.test.js

Lines changed: 24 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,24 @@ require.config({
1212
}
1313
});
1414

15-
define(['squire', 'ko', 'jquery', 'uiRegistry', 'jquery/validate'], function (Squire, ko, $, registry) {
15+
define(['squire', 'ko', 'jquery', 'jquery/validate'], function (Squire, ko, $) {
1616
'use strict';
1717

1818
var injector = new Squire(),
1919
modalStub = {
2020
openModal: jasmine.createSpy(),
2121
closeModal: jasmine.createSpy()
2222
},
23+
country = {
24+
/** Stub */
25+
on: function () {},
26+
27+
/** Stub */
28+
get: function () {},
29+
30+
/** Stub */
31+
set: function () {}
32+
},
2333
mocks = {
2434
'Magento_Customer/js/model/customer': {
2535
isLoggedIn: ko.observable()
@@ -28,17 +38,7 @@ define(['squire', 'ko', 'jquery', 'uiRegistry', 'jquery/validate'], function (Sq
2838
'Magento_Checkout/js/model/address-converter': jasmine.createSpy(),
2939
'Magento_Checkout/js/model/quote': {
3040
isVirtual: jasmine.createSpy(),
31-
shippingMethod: ko.observable(),
32-
33-
/**
34-
* Stub
35-
*/
36-
shippingAddress: function () {
37-
38-
return {
39-
'countryId': 'AD'
40-
};
41-
}
41+
shippingMethod: ko.observable()
4242
},
4343
'Magento_Checkout/js/action/create-shipping-address': jasmine.createSpy().and.returnValue(
4444
jasmine.createSpyObj('newShippingAddress', ['getKey'])
@@ -62,7 +62,18 @@ define(['squire', 'ko', 'jquery', 'uiRegistry', 'jquery/validate'], function (Sq
6262
'checkoutData',
6363
['setSelectedShippingAddress', 'setNewCustomerShippingAddress', 'setSelectedShippingRate']
6464
),
65-
'Magento_Ui/js/lib/registry/registry': registry,
65+
'Magento_Ui/js/lib/registry/registry': {
66+
async: jasmine.createSpy().and.returnValue(function () {}),
67+
create: jasmine.createSpy(),
68+
set: jasmine.createSpy(),
69+
get: jasmine.createSpy().and.callFake(function (query) {
70+
if (query === 'test.shippingAddress.shipping-address-fieldset.country_id') {
71+
return country;
72+
} else if (query === 'checkout.errors') {
73+
return {};
74+
}
75+
})
76+
},
6677
'Magento_Checkout/js/model/shipping-rate-service': jasmine.createSpy()
6778
},
6879
obj;
@@ -73,7 +84,6 @@ define(['squire', 'ko', 'jquery', 'uiRegistry', 'jquery/validate'], function (Sq
7384
obj = new Constr({
7485
provider: 'provName',
7586
name: '',
76-
parentName: 'test',
7787
index: '',
7888
popUpForm: {
7989
options: {
@@ -174,16 +184,6 @@ define(['squire', 'ko', 'jquery', 'uiRegistry', 'jquery/validate'], function (Sq
174184

175185
describe('"validateShippingInformation" method', function () {
176186
it('Check method call on negative cases.', function () {
177-
/* jscs:disable */
178-
var country = {
179-
on: function () {},
180-
get: function () {},
181-
set: function () {}
182-
};
183-
/* jscs:enable */
184-
185-
registry.set('test.shippingAddress.shipping-address-fieldset.country_id', country);
186-
registry.set('checkout.errors', {});
187187
obj.source = {
188188
get: jasmine.createSpy().and.returnValue(true),
189189
set: jasmine.createSpy(),
@@ -199,20 +199,10 @@ define(['squire', 'ko', 'jquery', 'uiRegistry', 'jquery/validate'], function (Sq
199199
expect(obj.validateShippingInformation()).toBeFalsy();
200200
});
201201
it('Check method call on positive case.', function () {
202-
/* jscs:disable */
203-
var country = {
204-
on: function () {},
205-
get: function () {},
206-
set: function () {}
207-
};
208-
/* jscs:enable */
209-
210202
$('body').append('<form data-role="email-with-possible-login">' +
211203
'<input type="text" name="username" />' +
212204
'</form>');
213205

214-
registry.set('test.shippingAddress.shipping-address-fieldset.country_id', country);
215-
registry.set('checkout.errors', {});
216206
obj.source = {
217207
get: jasmine.createSpy().and.returnValue(true),
218208
set: jasmine.createSpy(),

dev/tests/js/jasmine/tests/app/code/Magento/Signifyd/frontend/js/Fingerprint.test.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ define([
1010

1111
/*eslint max-nested-callbacks: ["error", 5]*/
1212
describe('Signifyd device fingerprint client script', function () {
13+
var originalTimeout;
14+
15+
beforeEach(function () {
16+
originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
17+
jasmine.DEFAULT_TIMEOUT_INTERVAL = 12000;
18+
});
19+
20+
afterEach(function () {
21+
jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
22+
});
1323

1424
it('SIGNIFYD_GLOBAL object initialization check', function (done) {
1525
var script = document.createElement('script');
@@ -32,7 +42,6 @@ define([
3242
expect(signifyd.scriptTagHasLoaded()).toBe(true);
3343
done();
3444
}, 10000);
35-
36-
}, 12000);
45+
});
3746
});
3847
});

dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/form/form.test.js

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,50 @@
33
* See COPYING.txt for license details.
44
*/
55

6+
/**
7+
* Copyright © Magento, Inc. All rights reserved.
8+
* See COPYING.txt for license details.
9+
*/
10+
611
define([
7-
'underscore',
8-
'uiRegistry',
9-
'Magento_Ui/js/form/form'
10-
], function (_, registry, Constr) {
12+
'squire'
13+
], function (Squire) {
1114
'use strict';
1215

1316
describe('Magento_Ui/js/form/form', function () {
14-
15-
var obj = new Constr({
16-
provider: 'provName',
17-
name: '',
18-
index: ''
19-
});
20-
21-
registry.set('provName', {
22-
/** Stub */
23-
on: function () {},
24-
25-
/** Stub */
26-
get: function () {},
27-
28-
/** Stub */
29-
set: function () {}
17+
var injector = new Squire(),
18+
mocks = {
19+
'Magento_Ui/js/lib/registry/registry': {
20+
/** Method stub. */
21+
get: function () {
22+
return {
23+
get: jasmine.createSpy(),
24+
set: jasmine.createSpy()
25+
};
26+
},
27+
options: jasmine.createSpy(),
28+
create: jasmine.createSpy(),
29+
set: jasmine.createSpy(),
30+
async: jasmine.createSpy()
31+
}
32+
},
33+
obj,
34+
dataScope = 'dataScope';
35+
36+
beforeEach(function (done) {
37+
injector.mock(mocks);
38+
injector.require([
39+
'Magento_Ui/js/form/form'
40+
], function (Constr) {
41+
obj = new Constr({
42+
provider: 'provName',
43+
name: '',
44+
index: '',
45+
dataScope: dataScope
46+
});
47+
48+
done();
49+
});
3050
});
3151

3252
describe('"initAdapter" method', function () {

0 commit comments

Comments
 (0)