@@ -31,7 +31,7 @@ describe('form-layout auto responsive', () => {
3131 const br = document . createElement ( 'br' ) ;
3232 layout . insertBefore ( br , fields [ 2 ] ) ; // Insert before hidden Address field
3333 await nextFrame ( ) ;
34- expect ( fields [ 3 ] . style . getPropertyValue ( '--_column-start' ) ) . to . equal ( '1' ) ;
34+ expect ( getComputedStyle ( fields [ 3 ] ) . gridColumnStart ) . to . equal ( '1' ) ;
3535 } ) ;
3636
3737 it ( 'should add line break after inserted <vaadin-form-row>' , async ( ) => {
@@ -42,7 +42,7 @@ describe('form-layout auto responsive', () => {
4242 ` ;
4343 layout . insertBefore ( row , fields [ 2 ] ) ; // Insert before hidden Address field
4444 await nextFrame ( ) ;
45- expect ( fields [ 3 ] . style . getPropertyValue ( '--_column-start' ) ) . to . equal ( '1' ) ;
45+ expect ( getComputedStyle ( fields [ 3 ] ) . gridColumnStart ) . to . equal ( '1' ) ;
4646 } ) ;
4747
4848 it ( 'should remove line break after removed <br>' , async ( ) => {
@@ -51,7 +51,7 @@ describe('form-layout auto responsive', () => {
5151 await nextFrame ( ) ;
5252 layout . removeChild ( br ) ;
5353 await nextFrame ( ) ;
54- expect ( fields [ 3 ] . style . getPropertyValue ( '--_column-start' ) ) . to . be . empty ;
54+ expect ( getComputedStyle ( fields [ 3 ] ) . gridColumnStart ) . to . equal ( 'auto' ) ;
5555 } ) ;
5656
5757 it ( 'should remove line break after removed <vaadin-form-row>' , async ( ) => {
@@ -64,7 +64,7 @@ describe('form-layout auto responsive', () => {
6464 await nextFrame ( ) ;
6565 layout . removeChild ( row ) ;
6666 await nextFrame ( ) ;
67- expect ( fields [ 3 ] . style . getPropertyValue ( '--_column-start' ) ) . to . be . empty ;
67+ expect ( getComputedStyle ( fields [ 3 ] ) . gridColumnStart ) . to . equal ( 'auto' ) ;
6868 } ) ;
6969
7070 it ( 'should maintain line break after <br> when fields visibility changes' , async ( ) => {
@@ -74,13 +74,13 @@ describe('form-layout auto responsive', () => {
7474
7575 fields [ 2 ] . hidden = false ;
7676 await nextFrame ( ) ;
77- expect ( fields [ 2 ] . style . getPropertyValue ( '--_column-start' ) ) . to . equal ( '1' ) ;
78- expect ( fields [ 3 ] . style . getPropertyValue ( '--_column-start' ) ) . to . be . empty ;
77+ expect ( getComputedStyle ( fields [ 2 ] ) . gridColumnStart ) . to . equal ( '1' ) ;
78+ expect ( getComputedStyle ( fields [ 3 ] ) . gridColumnStart ) . to . equal ( 'auto' ) ;
7979
8080 fields [ 2 ] . hidden = true ;
8181 await nextFrame ( ) ;
82- expect ( fields [ 2 ] . style . getPropertyValue ( '--_column-start' ) ) . to . be . empty ;
83- expect ( fields [ 3 ] . style . getPropertyValue ( '--_column-start' ) ) . to . equal ( '1' ) ;
82+ expect ( getComputedStyle ( fields [ 2 ] ) . gridColumnStart ) . to . equal ( 'auto' ) ;
83+ expect ( getComputedStyle ( fields [ 3 ] ) . gridColumnStart ) . to . equal ( '1' ) ;
8484 } ) ;
8585
8686 it ( 'should maintain line break after <vaadin-form-row> when fields visibility changes' , async ( ) => {
@@ -94,13 +94,13 @@ describe('form-layout auto responsive', () => {
9494
9595 fields [ 2 ] . hidden = false ;
9696 await nextFrame ( ) ;
97- expect ( fields [ 2 ] . style . getPropertyValue ( '--_column-start' ) ) . to . equal ( '1' ) ;
98- expect ( fields [ 3 ] . style . getPropertyValue ( '--_column-start' ) ) . to . be . empty ;
97+ expect ( getComputedStyle ( fields [ 2 ] ) . gridColumnStart ) . to . equal ( '1' ) ;
98+ expect ( getComputedStyle ( fields [ 3 ] ) . gridColumnStart ) . to . equal ( 'auto' ) ;
9999
100100 fields [ 2 ] . hidden = true ;
101101 await nextFrame ( ) ;
102- expect ( fields [ 2 ] . style . getPropertyValue ( '--_column-start' ) ) . to . be . empty ;
103- expect ( fields [ 3 ] . style . getPropertyValue ( '--_column-start' ) ) . to . equal ( '1' ) ;
102+ expect ( getComputedStyle ( fields [ 2 ] ) . gridColumnStart ) . to . equal ( 'auto' ) ;
103+ expect ( getComputedStyle ( fields [ 3 ] ) . gridColumnStart ) . to . equal ( '1' ) ;
104104 } ) ;
105105 } ) ;
106106
0 commit comments