File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
dev/tests/js/jasmine/tests/app/code/Magento/ConfigurableProduct/view/frontend/js Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * Copyright © Magento, Inc. All rights reserved.
3
+ * See COPYING.txt for license details.
4
+ */
5
+
6
+ define ( [
7
+ 'jquery' ,
8
+ 'Magento_ConfigurableProduct/js/configurable'
9
+ ] , function ( $ , Configurable ) {
10
+ 'use strict' ;
11
+
12
+ var widget ;
13
+
14
+ beforeEach ( function ( ) {
15
+ widget = new Configurable ( ) ;
16
+ widget . options = {
17
+ spConfig : {
18
+ attributes :
19
+ {
20
+ 'size' : {
21
+ options : $ ( '<div><p class="2"></p></div>' )
22
+ }
23
+ }
24
+ } ,
25
+ values : {
26
+ }
27
+ } ;
28
+ } ) ;
29
+
30
+ describe ( 'Magento_ConfigurableProduct/js/configurable' , function ( ) {
31
+
32
+ it ( 'check if attribute value is possible to be set as configurable option' , function ( ) {
33
+ expect ( $ . mage . configurable ) . toBeDefined ( ) ;
34
+ widget . _parseQueryParams ( 'http://magento.com/product?color=red&size=2' ) ;
35
+ expect ( widget . options . values . size ) . toBe ( '2' ) ;
36
+ } ) ;
37
+ } ) ;
38
+ } ) ;
You can’t perform that action at this time.
0 commit comments