File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
packages/main/cypress/specs Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -461,6 +461,44 @@ describe("Select - Popover", () => {
461
461
. should ( "be.visible" )
462
462
. should ( "have.text" , "Custom message" ) ;
463
463
} ) ;
464
+
465
+ it ( "Value state message popover can extend beyond select width" , ( ) => {
466
+ cy . mount (
467
+ < Select valueState = "Critical" >
468
+ < Option > Short</ Option >
469
+ < Option > Long</ Option >
470
+ < div slot = "valueStateMessage" >
471
+ This is a very long value state message that should extend beyond the narrow select component width and not be constrained by it.
472
+ </ div >
473
+ </ Select >
474
+ ) ;
475
+
476
+ // Trigger the value state popover by clicking and then pressing Escape
477
+ cy . get ( "[ui5-select]" )
478
+ . realClick ( )
479
+ . realPress ( "Escape" ) ;
480
+
481
+ // Get the select width for comparison
482
+ cy . get ( "[ui5-select]" )
483
+ . invoke ( "outerWidth" )
484
+ . as ( "selectWidth" ) ;
485
+
486
+ // Find the standalone value state popover
487
+ cy . get ( "[ui5-select]" )
488
+ . shadow ( )
489
+ . find ( ".ui5-valuestatemessage-popover" )
490
+ . should ( "exist" )
491
+ . as ( "valueStatePopover" ) ;
492
+
493
+ // Verify the popover width is greater than the select width
494
+ cy . get ( "@valueStatePopover" )
495
+ . invoke ( "outerWidth" )
496
+ . then ( ( popoverWidth ) => {
497
+ cy . get ( "@selectWidth" ) . then ( ( selectWidth ) => {
498
+ expect ( popoverWidth ) . to . be . greaterThan ( Number ( selectWidth ) ) ;
499
+ } ) ;
500
+ } ) ;
501
+ } ) ;
464
502
} ) ;
465
503
466
504
describe ( "Select - Properties" , ( ) => {
You can’t perform that action at this time.
0 commit comments