File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -401,4 +401,52 @@ describe("Datasets general", () => {
401401 } ) ;
402402 } ) ;
403403 } ) ;
404+
405+ describe ( "Scientific notation in condition panel test" , ( ) => {
406+ beforeEach ( ( ) => {
407+ cy . login ( Cypress . env ( "username" ) , Cypress . env ( "password" ) ) ;
408+ cy . createDataset ( {
409+ type : "raw" ,
410+ dataFileSize : "small" ,
411+ scientificMetadata : {
412+ extra_entry_end_time : { type : "number" , value : 310000 , unit : "" } ,
413+ } ,
414+ isPublished : true ,
415+ } ) ;
416+
417+ cy . visit ( "/datasets" ) ;
418+ } ) ;
419+ it ( "should be able to add condition with scientific notation value" , ( ) => {
420+
421+ cy . get ( '[data-cy="scientific-condition-filter-list"]' ) . within ( ( ) => {
422+ cy . get ( '[data-cy="add-condition-button"]' ) . click ( ) ;
423+ } ) ;
424+
425+ cy . get ( 'input[name="lhs"]' ) . type ( "extra_entry_end_time" ) ;
426+
427+ cy . get ( "mat-dialog-container" ) . find ( 'button[type="submit"]' ) . click ( ) ;
428+
429+ cy . get ( ".condition-panel" ) . first ( ) . click ( ) ;
430+
431+ cy . get ( ".condition-panel" )
432+ . first ( )
433+ . within ( ( ) => {
434+ cy . get ( "mat-select" ) . click ( ) ;
435+ } ) ;
436+
437+ cy . get ( "mat-option" ) . contains ( "=" ) . click ( ) ;
438+
439+ cy . get ( ".condition-panel" )
440+ . first ( )
441+ . within ( ( ) => {
442+ cy . get ( "input[matInput]" ) . eq ( 0 ) . clear ( ) . type ( "3.1e4" ) ;
443+ } ) ;
444+
445+ cy . get ( '[data-cy="search-button"]' ) . click ( ) ;
446+
447+ cy . get ( ".dataset-table mat-table" ) . should ( "exist" ) ;
448+
449+ cy . get ( '[data-cy="remove-condition-button"]' ) . click ( ) ;
450+ } ) ;
451+ } )
404452} ) ;
You can’t perform that action at this time.
0 commit comments