@@ -41,7 +41,7 @@ function getConnection() {
41
41
} ;
42
42
}
43
43
44
- describe ( 'AggregationsQueriesList ' , function ( ) {
44
+ describe ( 'AggregationsAndQueriesAndUpdatemanyList ' , function ( ) {
45
45
const sandbox = Sinon . createSandbox ( ) ;
46
46
const query = {
47
47
_id : '123' ,
@@ -51,6 +51,14 @@ describe('AggregationsQueriesList', function () {
51
51
filter : { foo : 'bar' } ,
52
52
sort : { bar : - 1 } ,
53
53
} as any ;
54
+ const updatemany = {
55
+ _id : '5667' ,
56
+ _name : 'Updatemany' ,
57
+ _ns : 'bar.baz' ,
58
+ _dateSaved : new Date ( ) ,
59
+ filter : { foo : 'baz' } ,
60
+ sort : { baz : - 1 } ,
61
+ } as any ;
54
62
const aggregation = {
55
63
id : '123' ,
56
64
name : 'Aggregation' ,
@@ -153,7 +161,7 @@ describe('AggregationsQueriesList', function () {
153
161
} ) ;
154
162
155
163
it ( 'should load queries and display them in the list' , async function ( ) {
156
- sandbox . stub ( queryStorage , 'loadAll' ) . resolves ( [ query ] ) ;
164
+ sandbox . stub ( queryStorage , 'loadAll' ) . resolves ( [ query , updatemany ] ) ;
157
165
renderPlugin ( ) ;
158
166
expect ( await screen . findByText ( 'Query' ) ) . to . exist ;
159
167
await waitFor ( ( ) => expect ( screen . findByText ( query . _name ) ) . to . exist ) ;
@@ -168,7 +176,7 @@ describe('AggregationsQueriesList', function () {
168
176
169
177
describe ( 'copy to clipboard' , function ( ) {
170
178
it ( 'should copy query to the clipboard' , async function ( ) {
171
- sandbox . stub ( queryStorage , 'loadAll' ) . resolves ( [ query ] ) ;
179
+ sandbox . stub ( queryStorage , 'loadAll' ) . resolves ( [ query , updatemany ] ) ;
172
180
renderPlugin ( ) ;
173
181
expect ( await screen . findByText ( query . _name ) ) . to . exist ;
174
182
@@ -386,7 +394,7 @@ describe('AggregationsQueriesList', function () {
386
394
} ;
387
395
388
396
beforeEach ( function ( ) {
389
- sandbox . stub ( queryStorage , 'loadAll' ) . resolves ( [ query ] ) ;
397
+ sandbox . stub ( queryStorage , 'loadAll' ) . resolves ( [ query , updatemany ] ) ;
390
398
} ) ;
391
399
392
400
context ( 'when not connected to any connection' , function ( ) {
0 commit comments