@@ -30,18 +30,11 @@ function createDatabase(name: string): DatabaseProps {
3030 inferred_from_privileges : false ,
3131 // dbStats
3232 document_count : 10 ,
33- storage_size : 2500 ,
34- free_storage_size : 1000 ,
33+ storage_size : 1500 ,
3534 data_size : 1000 ,
3635 index_count : 25 ,
3736 index_size : 100 ,
38- calculated_storage_size : undefined ,
3937 } ;
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-
4538 return db ;
4639}
4740
@@ -174,10 +167,8 @@ describe('databases and collections list', function () {
174167 expect ( screen . getAllByTestId ( 'database-grid-item' ) ) . to . have . lengthOf ( 1 ) ;
175168 expect ( screen . getByText ( 'foo' ) ) . to . exist ;
176169
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 ;
178171 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 ;
181172 expect ( screen . getByText ( / C o l l e c t i o n s / ) ) . to . exist ;
182173 expect ( screen . getByText ( '35' ) ) . to . exist ;
183174 expect ( screen . getByText ( / I n d e x e s / ) ) . to . exist ;
@@ -281,7 +272,7 @@ describe('databases and collections list', function () {
281272 ] ) ;
282273 } ) ;
283274
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 ( ) {
285276 renderCollectionsList ( {
286277 namespace : 'db' ,
287278 collections : colls ,
@@ -292,8 +283,7 @@ describe('databases and collections list', function () {
292283 . getByText ( 'bat.bat' )
293284 . closest ( '[data-testid="collection-grid-item"]' ) ;
294285 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:' ) ;
297287 expect ( timeseriesCard ) . to . not . contain . text ( 'Documents:' ) ;
298288 expect ( timeseriesCard ) . to . not . contain . text ( 'Avg. document size::' ) ;
299289 expect ( timeseriesCard ) . to . not . contain . text ( 'Indexes:' ) ;
@@ -311,10 +301,8 @@ describe('databases and collections list', function () {
311301 onCollectionClick : ( ) => { } ,
312302 } ) ;
313303
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 ;
315305 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 ;
318306 expect ( screen . getByText ( / D o c u m e n t s / ) ) . to . exist ;
319307 expect ( screen . getByText ( '10' ) ) . to . exist ;
320308 expect ( screen . getByText ( / A v g . d o c u m e n t s i z e / ) ) . to . exist ;
0 commit comments