@@ -69,27 +69,27 @@ const theme: ChatTheme = {
6969describe ( 'SegmentedControl - processSegments' , ( ) => {
7070 test ( 'computes width from label using string-width' , ( ) => {
7171 const segments : Segment [ ] = [
72- { id : 'FAST ' , label : 'FAST ' } ,
72+ { id : 'DEFAULT ' , label : 'DEFAULT ' } ,
7373 { id : 'MAX' , label : 'MAX' } ,
7474 { id : 'PLAN' , label : 'PLAN' } ,
7575 ]
7676
7777 const processed = processSegments ( segments , null , false , theme )
7878 const widths = processed . map ( ( s ) => s . width )
7979 expect ( widths ) . toEqual ( [
80- stringWidth ( ' FAST ' ) ,
80+ stringWidth ( ' DEFAULT ' ) ,
8181 stringWidth ( ' MAX ' ) ,
8282 stringWidth ( ' PLAN ' ) ,
8383 ] )
8484 } )
8585
8686 test ( 'applies defaultHighlighted when nothing hovered' , ( ) => {
8787 const segments : Segment [ ] = [
88- { id : 'FAST ' , label : 'FAST ' } ,
88+ { id : 'DEFAULT ' , label : 'DEFAULT ' } ,
8989 { id : 'MAX' , label : 'MAX' } ,
9090 {
91- id : 'active-FAST ' ,
92- label : '> FAST ' ,
91+ id : 'active-DEFAULT ' ,
92+ label : '> DEFAULT ' ,
9393 isSelected : true ,
9494 defaultHighlighted : true ,
9595 } ,
@@ -100,13 +100,13 @@ describe('SegmentedControl - processSegments', () => {
100100 processed . map ( ( p ) => [ p . id , p ] ) ,
101101 )
102102
103- expect ( map [ 'active-FAST ' ] . leftBorderColor ) . toBe ( theme . foreground )
104- expect ( map [ 'FAST ' ] . leftBorderColor ) . toBe ( theme . border )
103+ expect ( map [ 'active-DEFAULT ' ] . leftBorderColor ) . toBe ( theme . foreground )
104+ expect ( map [ 'DEFAULT ' ] . leftBorderColor ) . toBe ( theme . border )
105105 } )
106106
107107 test ( 'hovering a segment highlights it' , ( ) => {
108108 const segments : Segment [ ] = [
109- { id : 'FAST ' , label : 'FAST ' } ,
109+ { id : 'DEFAULT ' , label : 'DEFAULT ' } ,
110110 { id : 'MAX' , label : 'MAX' } ,
111111 { id : 'PLAN' , label : 'PLAN' } ,
112112 ]
@@ -117,12 +117,12 @@ describe('SegmentedControl - processSegments', () => {
117117
118118 expect ( map . MAX . isHovered ) . toBe ( true )
119119 expect ( map . MAX . leftBorderColor ) . toBe ( theme . foreground )
120- expect ( map . FAST . leftBorderColor ) . toBe ( theme . border )
120+ expect ( map . DEFAULT . leftBorderColor ) . toBe ( theme . border )
121121 } )
122122
123123 test ( 'disabled segments use muted text and border colors' , ( ) => {
124124 const segments : Segment [ ] = [
125- { id : 'FAST ' , label : 'FAST ' , disabled : true } ,
125+ { id : 'DEFAULT ' , label : 'DEFAULT ' , disabled : true } ,
126126 { id : 'MAX' , label : 'MAX' } ,
127127 ]
128128 const [ fast , max ] = processSegments ( segments , null , false , theme )
0 commit comments