File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
dev/tests/js/jasmine/tests/lib/mage/backend Expand file tree Collapse file tree 1 file changed +34
-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
+ /* global jQuery */
6
+ /* eslint-disable max-nested-callbacks */
7
+ define ( [
8
+ 'jquery' ,
9
+ 'squire' ,
10
+ 'mage/backend/notification'
11
+ ] , function ( $ , Squire ) {
12
+ 'use strict' ;
13
+
14
+ var injector = new Squire ( ) ;
15
+
16
+ describe ( 'mage/backend/bootstrap' , function ( ) {
17
+ beforeEach ( function ( done ) {
18
+ injector . require ( [ 'mage/backend/bootstrap' ] , function ( ) {
19
+ done ( ) ;
20
+ } ) ;
21
+ } ) ;
22
+ describe ( '"sendPostponeRequest" method' , function ( ) {
23
+ it ( 'should insert "Error" notification if request failed' , function ( ) {
24
+ jQuery ( '<div class="page-main-actions"></div>' ) . appendTo ( 'body' ) ;
25
+ jQuery ( 'body' ) . notification ( ) ;
26
+
27
+ jQuery . ajax ( ) . abort ( ) ;
28
+
29
+ expect ( jQuery ( '.message-error' ) . length ) . toBe ( 1 ) ;
30
+ expect ( jQuery ( 'body:contains("A technical problem with the server created an error")' ) . length ) . toBe ( 1 ) ;
31
+ } ) ;
32
+ } ) ;
33
+ } ) ;
34
+ } ) ;
You can’t perform that action at this time.
0 commit comments