File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
dev/tests/js/jasmine/tests/app/code/Magento/Theme/view/frontend/web/js Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -25,13 +25,25 @@ define([
25
25
window . navigator = navigator ;
26
26
} ) ;
27
27
28
- it ( 'verify cookie-status initialization' , function ( ) {
28
+ it ( 'verify initialization cookieStatus widget' , function ( ) {
29
+ expect ( $ . fn . cookieStatus ) . toBeDefined ( ) ;
30
+ } ) ;
31
+
32
+ it ( 'verify that modal does not shows when cookies are supported' , function ( ) {
33
+ expect ( $ . fn . cookieStatus ) . toBeDefined ( ) ;
34
+ window . navigator = {
35
+ cookieEnabled : true
36
+ } ;
37
+ widget . _init ( ) ;
38
+ expect ( $ ( document . body ) . html ( ) ) . not . toContain ( '<aside role="dialog" class="modal-popup' ) ;
39
+ } ) ;
40
+
41
+ it ( 'shows the modal when cookies are not supported' , function ( ) {
29
42
expect ( $ . fn . cookieStatus ) . toBeDefined ( ) ;
30
43
window . navigator = {
31
44
cookieEnabled : false
32
45
} ;
33
46
widget . _init ( ) ;
34
- expect ( $ ( '.cookie-status' ) . length ) . toBe ( 1 ) ;
35
47
expect ( $ ( document . body ) . html ( ) ) . toContain ( '<aside role="dialog" class="modal-popup' ) ;
36
48
} ) ;
37
49
You can’t perform that action at this time.
0 commit comments