@@ -144,6 +144,9 @@ describe("useFieldGroupRecipe", () => {
144144 } ) ;
145145
146146 describe ( "seam selectors" , ( ) => {
147+ const C = `:where(.input, .textarea, .select, .button, .dropdown)` ;
148+ const K = `:is(.input, .textarea, .select, .button, .dropdown)` ;
149+
147150 it ( "flattens horizontal seams and grows fields" , ( ) => {
148151 const s = createInstance ( ) ;
149152 useFieldGroupRecipe ( s ) ;
@@ -152,10 +155,10 @@ describe("useFieldGroupRecipe", () => {
152155 expect ( horizontal ) . toBeDefined ( ) ;
153156
154157 expect (
155- findChildRule ( horizontal , " & > *:not(:last-child)" ) ?. declarations ,
158+ findChildRule ( horizontal , ` & > ${ C } :has(~ ${ K } )` ) ?. declarations ,
156159 ) . toMatchObject ( { borderRightWidth : "0" } ) ;
157160 expect (
158- findChildRule ( horizontal , " & > *:not(:first-child)" ) ?. declarations ,
161+ findChildRule ( horizontal , ` & > ${ C } ~ ${ K } ` ) ?. declarations ,
159162 ) . toMatchObject ( { borderTopLeftRadius : "0" } ) ;
160163
161164 for ( const query of [ "& > .input" , "& > .select" , "& > .textarea" ] ) {
@@ -174,10 +177,10 @@ describe("useFieldGroupRecipe", () => {
174177 expect ( vertical ) . toBeDefined ( ) ;
175178
176179 expect (
177- findChildRule ( vertical , " & > *:not(:last-child)" ) ?. declarations ,
180+ findChildRule ( vertical , ` & > ${ C } :has(~ ${ K } )` ) ?. declarations ,
178181 ) . toMatchObject ( { borderBottomWidth : "0" } ) ;
179182 expect (
180- findChildRule ( vertical , " & > *:not(:first-child)" ) ?. declarations ,
183+ findChildRule ( vertical , ` & > ${ C } ~ ${ K } ` ) ?. declarations ,
181184 ) . toMatchObject ( { borderTopLeftRadius : "0" } ) ;
182185 } ) ;
183186
0 commit comments