@@ -43,28 +43,32 @@ const PREVIOUS = [
4343] as const
4444
4545describe ( 'OverlayActionButton' , ( ) => {
46- it . each ( PREVIOUS ) ( 'preserves the previous $name markup' , ( { props, variant, className } ) => {
47- const view = mount (
48- < >
49- < Button variant = { variant } aria-label = 'Copy' className = { `${ className } shrink-0` } >
50- < svg className = 'size-[10px]' aria-hidden = 'true' />
51- </ Button >
52- < OverlayActionButton { ...props } aria-label = 'Copy' className = 'shrink-0' >
53- < svg className = 'size-[10px]' aria-hidden = 'true' />
54- </ OverlayActionButton >
55- </ >
56- )
57- const [ previous , current ] = view . querySelectorAll ( 'button' )
58- /** The old border-1 token aliases border; class order changes when recipes are composed. */
59- for ( const button of [ previous , current ] ) {
60- button . className = button . className
61- . replaceAll ( '--border-1' , '--border' )
62- . split ( / \s + / )
63- . sort ( )
64- . join ( ' ' )
46+ it . each ( PREVIOUS ) (
47+ 'preserves the previous $name visual treatment' ,
48+ ( { props, variant, className } ) => {
49+ const view = mount (
50+ < >
51+ < Button variant = { variant } aria-label = 'Copy' className = { `${ className } shrink-0` } >
52+ < svg className = 'size-[10px]' aria-hidden = 'true' />
53+ </ Button >
54+ < OverlayActionButton { ...props } aria-label = 'Copy' className = 'shrink-0' >
55+ < svg className = 'size-[10px]' aria-hidden = 'true' />
56+ </ OverlayActionButton >
57+ </ >
58+ )
59+ const [ previous , current ] = view . querySelectorAll ( 'button' )
60+ /** The old border-1 token aliases border; its hover border repeats the resting border. */
61+ for ( const button of [ previous , current ] ) {
62+ button . className = button . className
63+ . replaceAll ( '--border-1' , '--border' )
64+ . split ( / \s + / )
65+ . filter ( ( token ) => token !== 'hover-hover:border-[var(--border)]' )
66+ . sort ( )
67+ . join ( ' ' )
68+ }
69+ expect ( current . outerHTML ) . toBe ( previous . outerHTML )
6570 }
66- expect ( current . outerHTML ) . toBe ( previous . outerHTML )
67- } )
71+ )
6872
6973 it ( 'forwards refs and native props through a tooltip and suppresses disabled clicks' , ( ) => {
7074 vi . useFakeTimers ( )
0 commit comments