@@ -361,6 +361,31 @@ describe('Tests the Extension Requests Screen', () => {
361
361
expect ( extensionCardsList . length ) . toBe ( 4 ) ;
362
362
expect ( extensionRequestsElement ) . toBeTruthy ( ) ;
363
363
} ) ;
364
+ it ( 'Should contain all dates elements' , async ( ) => {
365
+ const checkContainer = async ( containerId ) => {
366
+ const textExists = await page . $eval (
367
+ `${ containerId } .card-row-text` ,
368
+ ( el ) => ! ! el ,
369
+ ) ;
370
+ const valueExists = await page . $eval (
371
+ `${ containerId } .tooltip-container` ,
372
+ ( el ) => ! ! el ,
373
+ ) ;
374
+ const tooltipExists = await page . $eval (
375
+ `${ containerId } .tooltip` ,
376
+ ( el ) => ! ! el ,
377
+ ) ;
378
+
379
+ expect ( textExists ) . toBeTruthy ( ) ;
380
+ expect ( valueExists ) . toBeTruthy ( ) ;
381
+ expect ( tooltipExists ) . toBeTruthy ( ) ;
382
+ } ;
383
+
384
+ await checkContainer ( '#deadline-container' ) ;
385
+ await checkContainer ( '#requested-time-container' ) ;
386
+ await checkContainer ( '#new-deadline-container' ) ;
387
+ await checkContainer ( '#extension-container' ) ;
388
+ } ) ;
364
389
365
390
it ( 'checks the search functionality' , async ( ) => {
366
391
await page . type ( '#assignee-search' , 'sunny' ) ;
@@ -511,14 +536,14 @@ describe('Tests the Extension Requests Screen', () => {
511
536
'.extension-card:first-child .panel' ,
512
537
) ;
513
538
const firstAccordionIsVisible = await firstAccordionContent . evaluate (
514
- ( el ) => el . style . display === 'block ',
539
+ ( el ) => el . style . maxHeight !== ' ',
515
540
) ;
516
541
expect ( firstAccordionIsVisible ) . toBe ( true ) ;
517
542
518
543
await firstAccordionButton . click ( ) ;
519
544
520
545
const firstAccordionIsHidden = await firstAccordionContent . evaluate (
521
- ( el ) => el . style . display !== 'block ',
546
+ ( el ) => el . style . maxHeight === ' ',
522
547
) ;
523
548
expect ( firstAccordionIsHidden ) . toBe ( true ) ;
524
549
} ) ;
@@ -630,7 +655,7 @@ describe('Tests the Extension Requests Screen', () => {
630
655
await page . $eval ( '.title-text-input' , ( el ) => ( el . value = '' ) ) ;
631
656
await page . type ( '.title-text-input' , newTitle ) ;
632
657
633
- const newDate = '2023-09-19T22:20 ' ;
658
+ const newDate = '2023-09-19 ' ;
634
659
await page . evaluate ( ( newDate ) => {
635
660
document . querySelector ( '.date-input' ) . value = newDate ;
636
661
} , newDate ) ;
@@ -668,7 +693,7 @@ describe('Tests the Extension Requests Screen', () => {
668
693
const newTitle = 'New Title Text' ;
669
694
await page . type ( '.title-text-input' , newTitle ) ;
670
695
671
- const newDate = '2023-09-19T22:20 ' ;
696
+ const newDate = '2023-09-19 ' ;
672
697
await page . evaluate ( ( newDate ) => {
673
698
document . querySelector ( '.date-input' ) . value = newDate ;
674
699
} , newDate ) ;
@@ -823,7 +848,7 @@ describe('Tests the Extension Requests Screen', () => {
823
848
// Click the first element with class '.edit-button'
824
849
await page . $$eval ( '.edit-button' , ( buttons ) => buttons [ 0 ] . click ( ) ) ;
825
850
const newTitle = 'This is a new title test case' ;
826
- const newDate = '2024-09-19T22:20 ' ;
851
+ const newDate = '2024-09-19 ' ;
827
852
const newReason = 'This is the new reason' ;
828
853
829
854
// Updating all the input fields
0 commit comments