@@ -1915,7 +1915,7 @@ describe("Select general interaction", () => {
19151915} ) ;
19161916
19171917describe ( "Select - active/down state" , ( ) => {
1918- it ( "sets active attribute on ui5-option while mouse is pressed" , ( ) => {
1918+ it ( "applies active background on ui5-option while mouse is pressed" , ( ) => {
19191919 cy . mount (
19201920 < Select >
19211921 < Option > Option 1</ Option >
@@ -1930,16 +1930,19 @@ describe("Select - active/down state", () => {
19301930 . find ( "[ui5-option]" )
19311931 . eq ( 0 )
19321932 . realMouseDown ( )
1933- . should ( "have.attr" , "active" ) ;
1933+ . then ( $option => {
1934+ const bg = window . getComputedStyle ( $option [ 0 ] ) . backgroundColor ;
1935+ expect ( bg ) . not . to . equal ( "rgba(0, 0, 0, 0)" ) ;
1936+ expect ( bg ) . not . to . equal ( "transparent" ) ;
1937+ } ) ;
19341938
19351939 cy . get ( "[ui5-select]" )
19361940 . find ( "[ui5-option]" )
19371941 . eq ( 0 )
1938- . realMouseUp ( )
1939- . should ( "not.have.attr" , "active" ) ;
1942+ . realMouseUp ( ) ;
19401943 } ) ;
19411944
1942- it ( "sets active attribute on ui5-option-custom while mouse is pressed" , ( ) => {
1945+ it ( "applies active background on ui5-option-custom while mouse is pressed" , ( ) => {
19431946 cy . mount (
19441947 < Select >
19451948 < OptionCustom > Option 1</ OptionCustom >
@@ -1954,12 +1957,15 @@ describe("Select - active/down state", () => {
19541957 . find ( "[ui5-option-custom]" )
19551958 . eq ( 0 )
19561959 . realMouseDown ( )
1957- . should ( "have.attr" , "active" ) ;
1960+ . then ( $option => {
1961+ const bg = window . getComputedStyle ( $option [ 0 ] ) . backgroundColor ;
1962+ expect ( bg ) . not . to . equal ( "rgba(0, 0, 0, 0)" ) ;
1963+ expect ( bg ) . not . to . equal ( "transparent" ) ;
1964+ } ) ;
19581965
19591966 cy . get ( "[ui5-select]" )
19601967 . find ( "[ui5-option-custom]" )
19611968 . eq ( 0 )
1962- . realMouseUp ( )
1963- . should ( "not.have.attr" , "active" ) ;
1969+ . realMouseUp ( ) ;
19641970 } ) ;
19651971} ) ;
0 commit comments