@@ -30,18 +30,11 @@ function createDatabase(name: string): DatabaseProps {
30
30
inferred_from_privileges : false ,
31
31
// dbStats
32
32
document_count : 10 ,
33
- storage_size : 2500 ,
34
- free_storage_size : 1000 ,
33
+ storage_size : 1500 ,
35
34
data_size : 1000 ,
36
35
index_count : 25 ,
37
36
index_size : 100 ,
38
- calculated_storage_size : undefined ,
39
37
} ;
40
-
41
- if ( db . storage_size !== undefined && db . free_storage_size !== undefined ) {
42
- db . calculated_storage_size = db . storage_size - db . free_storage_size ;
43
- }
44
-
45
38
return db ;
46
39
}
47
40
@@ -174,10 +167,8 @@ describe('databases and collections list', function () {
174
167
expect ( screen . getAllByTestId ( 'database-grid-item' ) ) . to . have . lengthOf ( 1 ) ;
175
168
expect ( screen . getByText ( 'foo' ) ) . to . exist ;
176
169
177
- expect ( screen . getByText ( / S t o r a g e / ) ) . to . exist ;
170
+ expect ( screen . getByText ( / S t o r a g e s i z e / ) ) . to . exist ;
178
171
expect ( screen . getByText ( '1.50 kB' ) ) . to . exist ;
179
- expect ( screen . getByText ( / U n c o m p r e s s e d d a t a / ) ) . to . exist ;
180
- expect ( screen . getByText ( '1.00 kB' ) ) . to . exist ;
181
172
expect ( screen . getByText ( / C o l l e c t i o n s / ) ) . to . exist ;
182
173
expect ( screen . getByText ( '35' ) ) . to . exist ;
183
174
expect ( screen . getByText ( / I n d e x e s / ) ) . to . exist ;
@@ -281,7 +272,7 @@ describe('databases and collections list', function () {
281
272
] ) ;
282
273
} ) ;
283
274
284
- it ( 'should not display statistics (except storage and uncompressed data size) on timeseries collection card' , function ( ) {
275
+ it ( 'should not display statistics (except storage size) on timeseries collection card' , function ( ) {
285
276
renderCollectionsList ( {
286
277
namespace : 'db' ,
287
278
collections : colls ,
@@ -292,8 +283,7 @@ describe('databases and collections list', function () {
292
283
. getByText ( 'bat.bat' )
293
284
. closest ( '[data-testid="collection-grid-item"]' ) ;
294
285
expect ( timeseriesCard ) . to . exist ;
295
- expect ( timeseriesCard ) . to . contain . text ( 'Storage:' ) ;
296
- expect ( timeseriesCard ) . to . contain . text ( 'Uncompressed data:' ) ;
286
+ expect ( timeseriesCard ) . to . contain . text ( 'Storage size:' ) ;
297
287
expect ( timeseriesCard ) . to . not . contain . text ( 'Documents:' ) ;
298
288
expect ( timeseriesCard ) . to . not . contain . text ( 'Avg. document size::' ) ;
299
289
expect ( timeseriesCard ) . to . not . contain . text ( 'Indexes:' ) ;
@@ -311,10 +301,8 @@ describe('databases and collections list', function () {
311
301
onCollectionClick : ( ) => { } ,
312
302
} ) ;
313
303
314
- expect ( screen . getByText ( / S t o r a g e / ) ) . to . exist ;
304
+ expect ( screen . getByText ( / S t o r a g e s i z e / ) ) . to . exist ;
315
305
expect ( screen . getByText ( '1.50 kB' ) ) . to . exist ;
316
- expect ( screen . getByText ( / U n c o m p r e s s e d d a t a / ) ) . to . exist ;
317
- expect ( screen . getByText ( '11.00 B' ) ) . to . exist ;
318
306
expect ( screen . getByText ( / D o c u m e n t s / ) ) . to . exist ;
319
307
expect ( screen . getByText ( '10' ) ) . to . exist ;
320
308
expect ( screen . getByText ( / A v g . d o c u m e n t s i z e / ) ) . to . exist ;
0 commit comments