@@ -9146,7 +9146,10 @@ describe("ChatView timeline estimator parity (full app)", () => {
91469146 } ) ;
91479147
91489148 const footer = await waitForElement (
9149- ( ) => document . querySelector < HTMLElement > ( '[data-chat-composer-footer="true"]' ) ,
9149+ ( ) =>
9150+ Array . from (
9151+ document . querySelectorAll < HTMLElement > ( '[data-chat-composer-footer="true"]' ) ,
9152+ ) . find ( ( candidate ) => candidate . getBoundingClientRect ( ) . width > 0 ) ?? null ,
91509153 "Unable to find composer footer." ,
91519154 ) ;
91529155 const leftActions = await waitForElement (
@@ -9194,7 +9197,7 @@ describe("ChatView timeline estimator parity (full app)", () => {
91949197 }
91959198 } ) ;
91969199
9197- it ( "protects model and reasoning labels before shrinking interaction and access " , async ( ) => {
9200+ it ( "keeps model and reasoning labels in the icon-only footer " , async ( ) => {
91989201 const mounted = await mountChatView ( {
91999202 viewport : WIDE_FOOTER_VIEWPORT ,
92009203 snapshot : fixture . snapshot ,
@@ -9235,28 +9238,30 @@ describe("ChatView timeline estimator parity (full app)", () => {
92359238
92369239 try {
92379240 await waitForServerConfigToApply ( ) ;
9238- await mounted . setContainerSize ( {
9239- width : 900 ,
9240- height : WIDE_FOOTER_VIEWPORT . height ,
9241+ await mounted . setViewport ( {
9242+ ... WIDE_FOOTER_VIEWPORT ,
9243+ width : 560 ,
92419244 } ) ;
92429245
92439246 const footer = await waitForElement (
92449247 ( ) => document . querySelector < HTMLElement > ( '[data-chat-composer-footer="true"]' ) ,
92459248 "Unable to find composer footer." ,
92469249 ) ;
9250+ await vi . waitFor ( ( ) => {
9251+ expect ( footer . dataset . chatComposerFooterIconOnly ) . toBe ( "true" ) ;
9252+ expect ( footer . dataset . chatComposerFooterCompact ) . toBe ( "false" ) ;
9253+ } ) ;
92479254 const modelButton = await waitForElement (
9248- findComposerProviderModelPicker ,
9255+ ( ) => footer . querySelector < HTMLButtonElement > ( '[data-chat-provider-model-picker="true"]' ) ,
92499256 "Unable to find provider model picker." ,
92509257 ) ;
92519258 const reasoningButton = await waitForButtonByTextWithin ( footer , "Medium" ) ;
9252- const interactionButton = await waitForButtonByTextWithin ( footer , "Build ") ;
9253- const accessButton = await waitForButtonByTextWithin ( footer , "Full access ") ;
9254-
9255- expect ( footer . dataset . chatComposerFooterIconOnly ) . toBe ( "false" ) ;
9259+ expect ( modelButton . textContent ) . toContain ( "GPT-5 ") ;
9260+ expect ( reasoningButton . textContent ) . toBe ( "Medium ") ;
9261+ expect ( modelButton . getBoundingClientRect ( ) . width ) . toBeGreaterThan ( 32 ) ;
9262+ expect ( reasoningButton . getBoundingClientRect ( ) . width ) . toBeGreaterThan ( 32 ) ;
92569263 expect ( getComputedStyle ( modelButton ) . flexShrink ) . toBe ( "0" ) ;
92579264 expect ( getComputedStyle ( reasoningButton ) . flexShrink ) . toBe ( "0" ) ;
9258- expect ( getComputedStyle ( interactionButton ) . flexShrink ) . toBe ( "1" ) ;
9259- expect ( getComputedStyle ( accessButton ) . flexShrink ) . toBe ( "1" ) ;
92609265 } finally {
92619266 await mounted . cleanup ( ) ;
92629267 }
0 commit comments