@@ -29,9 +29,10 @@ describe('Shell for notebooks', () => {
29
29
} ) ;
30
30
31
31
it ( 'should make all areas empty initially' , ( ) => {
32
- [ 'main' , 'top' , 'left' , 'right' , 'menu' ] . forEach ( area =>
33
- expect ( shell . isEmpty ( area as Shell . Area ) ) . toBe ( true )
34
- ) ;
32
+ [ 'main' , 'top' , 'left' , 'right' , 'menu' ] . forEach ( area => {
33
+ const widgets = Array . from ( shell . widgets ( area as Shell . Area ) ) ;
34
+ expect ( widgets . length ) . toEqual ( 0 ) ;
35
+ } ) ;
35
36
} ) ;
36
37
} ) ;
37
38
@@ -98,7 +99,8 @@ describe('Shell for notebooks', () => {
98
99
const widget = new Widget ( ) ;
99
100
widget . id = 'foo' ;
100
101
shell . add ( widget , 'left' ) ;
101
- expect ( shell . isEmpty ( 'left' ) ) . toBe ( false ) ;
102
+ const widgets = Array . from ( shell . widgets ( 'left' ) ) ;
103
+ expect ( widgets . length ) . toBeGreaterThan ( 0 ) ;
102
104
} ) ;
103
105
} ) ;
104
106
@@ -107,7 +109,8 @@ describe('Shell for notebooks', () => {
107
109
const widget = new Widget ( ) ;
108
110
widget . id = 'foo' ;
109
111
shell . add ( widget , 'right' ) ;
110
- expect ( shell . isEmpty ( 'right' ) ) . toBe ( false ) ;
112
+ const widgets = Array . from ( shell . widgets ( 'right' ) ) ;
113
+ expect ( widgets . length ) . toBeGreaterThan ( 0 ) ;
111
114
} ) ;
112
115
} ) ;
113
116
} ) ;
@@ -130,9 +133,10 @@ describe('Shell for tree view', () => {
130
133
} ) ;
131
134
132
135
it ( 'should make all areas empty initially' , ( ) => {
133
- [ 'main' , 'top' , 'left' , 'right' , 'menu' ] . forEach ( area =>
134
- expect ( shell . isEmpty ( area as Shell . Area ) ) . toBe ( true )
135
- ) ;
136
+ [ 'main' , 'top' , 'left' , 'right' , 'menu' ] . forEach ( area => {
137
+ const widgets = Array . from ( shell . widgets ( area as Shell . Area ) ) ;
138
+ expect ( widgets . length ) . toEqual ( 0 ) ;
139
+ } ) ;
136
140
} ) ;
137
141
} ) ;
138
142
@@ -157,7 +161,8 @@ describe('Shell for tree view', () => {
157
161
const widget = new Widget ( ) ;
158
162
widget . id = 'foo' ;
159
163
shell . add ( widget , 'left' ) ;
160
- expect ( shell . isEmpty ( 'left' ) ) . toBe ( false ) ;
164
+ const widgets = Array . from ( shell . widgets ( 'left' ) ) ;
165
+ expect ( widgets . length ) . toBeGreaterThan ( 0 ) ;
161
166
} ) ;
162
167
} ) ;
163
168
@@ -166,7 +171,8 @@ describe('Shell for tree view', () => {
166
171
const widget = new Widget ( ) ;
167
172
widget . id = 'foo' ;
168
173
shell . add ( widget , 'right' ) ;
169
- expect ( shell . isEmpty ( 'right' ) ) . toBe ( false ) ;
174
+ const widgets = Array . from ( shell . widgets ( 'right' ) ) ;
175
+ expect ( widgets . length ) . toBeGreaterThan ( 0 ) ;
170
176
} ) ;
171
177
} ) ;
172
178
} ) ;
0 commit comments