@@ -142,7 +142,7 @@ describe('Button (next)', () => {
142142 expect ( span ) . toHaveTextContent ( 'Text Content' )
143143 } )
144144
145- it ( 'preserves child order and adds icon position attributes ' , ( ) => {
145+ it ( 'preserves child order' , ( ) => {
146146 render (
147147 < Button >
148148 < MockIcon />
@@ -159,8 +159,6 @@ describe('Button (next)', () => {
159159 // Get all icons using data-testid
160160 const icons = screen . getAllByTestId ( 'mock-icon' )
161161 expect ( icons ) . toHaveLength ( 2 )
162- expect ( icons [ 0 ] ) . toHaveAttribute ( 'data-icon-position' , 'left' )
163- expect ( icons [ 1 ] ) . toHaveAttribute ( 'data-icon-position' , 'right' )
164162 } )
165163 } )
166164
@@ -388,38 +386,34 @@ describe('Button (next)', () => {
388386 expect ( button ) . toHaveAttribute ( 'data-icon-only' , 'true' )
389387 } )
390388
391- it ( 'uses generic space tokens for icon-only (default size)' , ( ) => {
389+ it ( 'uses selectable space tokens for icon-only (default size)' , ( ) => {
392390 render (
393391 < Button icon aria-label = "Add" >
394392 < MockIcon />
395393 </ Button > ,
396394 )
397395 const button = screen . getByRole ( 'button' )
398- expect ( button ) . toHaveAttribute ( 'data-horizontal-space' , '2xs' )
399- expect ( button ) . toHaveAttribute ( 'data-vertical-space' , '2xs' )
400- expect ( button ) . not . toHaveAttribute ( 'data-selectable-space' )
396+ expect ( button ) . toHaveAttribute ( 'data-selectable-space' , 'md' )
401397 } )
402398
403- it ( 'uses generic space tokens for icon-only (small size)' , ( ) => {
399+ it ( 'uses selectable space tokens for icon-only (small size)' , ( ) => {
404400 render (
405401 < Button icon aria-label = "Add" size = "small" >
406402 < MockIcon />
407403 </ Button > ,
408404 )
409405 const button = screen . getByRole ( 'button' )
410- expect ( button ) . toHaveAttribute ( 'data-horizontal-space' , '3xs' )
411- expect ( button ) . toHaveAttribute ( 'data-vertical-space' , '3xs' )
406+ expect ( button ) . toHaveAttribute ( 'data-selectable-space' , 'sm' )
412407 } )
413408
414- it ( 'uses generic space tokens for icon-only (large size)' , ( ) => {
409+ it ( 'uses selectable space tokens for icon-only (large size)' , ( ) => {
415410 render (
416411 < Button icon aria-label = "Add" size = "large" >
417412 < MockIcon />
418413 </ Button > ,
419414 )
420415 const button = screen . getByRole ( 'button' )
421- expect ( button ) . toHaveAttribute ( 'data-horizontal-space' , 'xs' )
422- expect ( button ) . toHaveAttribute ( 'data-vertical-space' , 'xs' )
416+ expect ( button ) . toHaveAttribute ( 'data-selectable-space' , 'lg' )
423417 } )
424418
425419 it ( 'uses selectable space tokens for regular button' , ( ) => {
@@ -431,8 +425,6 @@ describe('Button (next)', () => {
431425 )
432426 const button = screen . getByRole ( 'button' )
433427 expect ( button ) . toHaveAttribute ( 'data-selectable-space' , 'md' )
434- expect ( button ) . not . toHaveAttribute ( 'data-horizontal-space' )
435- expect ( button ) . not . toHaveAttribute ( 'data-vertical-space' )
436428 } )
437429
438430 it ( 'renders icon child in icon-only mode' , ( ) => {
0 commit comments