diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontForthLevelCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontForthLevelCategoryTest.xml index 74264149cf1cb..9731b66209df0 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontForthLevelCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontForthLevelCategoryTest.xml @@ -34,6 +34,9 @@ + + + + + + diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml index 3fd5f44d5a4b6..a4d99ecbf7e61 100644 --- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml @@ -16,6 +16,9 @@ + + + diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/grid/masonry.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/grid/masonry.test.js index 2c2cdab2d46da..7f7d0c5f9dd2a 100644 --- a/dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/grid/masonry.test.js +++ b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/grid/masonry.test.js @@ -6,79 +6,78 @@ /*eslint max-nested-callbacks: 0*/ define([ 'jquery', - 'ko', 'Magento_Ui/js/grid/masonry' -], function ($, ko, Masonry) { +], function ($, Masonry) { 'use strict'; - var Component, - rows, - container = '
'; + describe('Magento_Ui/js/grid/masonry', function () { + var Component, + rows, + container = '
'; - beforeEach(function () { - rows = [ - { - _rowIndex: 0, - category: {}, - 'category_id': 695, - 'category_name': 'People', - 'comp_url': 'https://stock.adobe.com/Rest/Libraries/Watermarked/Download/327515738/2', - 'content_type': 'image/jpeg', - 'country_name': 'Malaysia', - 'creation_date': '2020-03-02 10:41:51', - 'creator_id': 208217780, - 'creator_name': 'NajmiArif', - height: 3264, - id: 327515738, - 'id_field_name': 'id', - 'is_downloaded': 0, - 'is_licensed_locally': 0, - keywords: [], - 'media_type_id': 1, - overlay: '', - path: '', - 'premium_level_id': 0, - 'thumbnail_240_url': 'https://t4.ftcdn.net/jpg/03/27/51/57/240_F_327515738_n.jpg', - 'thumbnail_500_ur': 'https://as2.ftcdn.net/jpg/03/27/51/57/500_F_327515738_n.jpg', - title: 'Neon effect picture of man wearing medical mask for viral or pandemic disease', - width: 4896 - } + beforeEach(function () { + rows = [ + { + _rowIndex: 0, + category: {}, + 'category_id': 695, + 'category_name': 'People', + 'comp_url': 'url', + 'content_type': 'image/jpeg', + 'country_name': 'Malaysia', + 'creation_date': '2020-03-02 10:41:51', + 'creator_id': 208217780, + 'creator_name': 'NajmiArif', + height: 3264, + id: 327515738, + 'id_field_name': 'id', + 'is_downloaded': 0, + 'is_licensed_locally': 0, + keywords: [], + 'media_type_id': 1, + overlay: '', + path: '', + 'premium_level_id': 0, + 'thumbnail_240_url': 'url', + 'thumbnail_500_ur': 'url', + title: 'Neon effect picture of man wearing medical mask for viral or pandemic disease', + width: 4896 + } + ]; - ]; - - $(container).appendTo('body'); - - Component = new Masonry({ - defaults: { - rows: ko.observable() - } + $(document.body).append(container); + Component = new Masonry({ + defaults: { + containerId: '#masonry_grid' + } + }); }); - }); - - afterEach(function () { - $('#masonry_grid').remove(); - }); + afterEach(function () { + Component.clear(); + $('#masonry_grid').remove(); + }); - describe('check initComponent', function () { - it('verify setLayoutstyles called and grid iniztilized', function () { - var setlayoutStyles = spyOn(Component, 'setLayoutStyles'); + describe('check initComponent', function () { + it('verify setLayoutstyles called and grid iniztilized', function () { + var setlayoutStyles = spyOn(Component, 'setLayoutStyles'); - expect(Component).toBeDefined(); - Component.containerId = 'masonry_grid'; - Component.initComponent(rows); - Component.rows().forEach(function (image) { - expect(image.styles).toBeDefined(); - expect(image.css).toBeDefined(); + expect(Component).toBeDefined(); + Component.containerId = 'masonry_grid'; + Component.initComponent(rows); + Component.rows().forEach(function (image) { + expect(image.styles).toBeDefined(); + expect(image.css).toBeDefined(); + }); + expect(setlayoutStyles).toHaveBeenCalled(); }); - expect(setlayoutStyles).toHaveBeenCalled(); - }); - it('verify events triggered', function () { - var setLayoutStyles = spyOn(Component, 'setLayoutStyles'); + it('verify events triggered', function () { + var setLayoutStyles = spyOn(Component, 'setLayoutStyles'); - Component.initComponent(rows); - window.dispatchEvent(new Event('resize')); - expect(setLayoutStyles).toHaveBeenCalled(); + Component.initComponent(rows); + window.dispatchEvent(new Event('resize')); + expect(setLayoutStyles).toHaveBeenCalled(); + }); }); }); }); diff --git a/package.json.sample b/package.json.sample index 4dea6d7b945f5..93fe72afbd24a 100644 --- a/package.json.sample +++ b/package.json.sample @@ -18,7 +18,7 @@ "grunt-contrib-connect": "~1.0.2", "grunt-contrib-cssmin": "~2.2.1", "grunt-contrib-imagemin": "~2.0.1", - "grunt-contrib-jasmine": "~1.1.0", + "grunt-contrib-jasmine": "~1.2.0", "grunt-contrib-less": "~1.4.1", "grunt-contrib-watch": "~1.0.0", "grunt-eslint": "~20.1.0", @@ -39,4 +39,4 @@ "time-grunt": "~1.4.0", "underscore": "~1.8.0" } -} \ No newline at end of file +}