File tree Expand file tree Collapse file tree
frontend/taskdeck-web/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,10 +107,13 @@ function scheduleSequence(): void {
107107
108108function applyReducedPhase(next : InkBleedPhase ): void {
109109 clearTimers ()
110- if (next === ' auto' || next === ' dried' ) {
111- const wasDried = currentPhase .value === ' dried'
110+ if (next === ' auto' ) {
111+ setPhase (' dried' )
112+ if (currentPhase .value === ' dried' ) emit (' done' )
113+ return
114+ }
115+ if (next === ' dried' ) {
112116 setPhase (' dried' )
113- if (wasDried ) emit (' done' )
114117 return
115118 }
116119 setPhase (next )
Original file line number Diff line number Diff line change @@ -118,6 +118,15 @@ describe('InkBleed', () => {
118118 expect ( wrapper . emitted ( 'done' ) ) . toHaveLength ( 1 )
119119 } )
120120
121+ it ( 'does not emit done for an idempotent reduced-motion dried phase' , async ( ) => {
122+ installMatchMedia ( true )
123+ const wrapper = mount ( InkBleed , { props : { phase : 'dried' } } )
124+ await wrapper . vm . $nextTick ( )
125+
126+ expect ( wrapper . classes ( ) ) . toContain ( 'ink-bleed--dried' )
127+ expect ( wrapper . emitted ( 'done' ) ) . toBeUndefined ( )
128+ } )
129+
121130 it ( 'honors controlled phase changes under reduced motion' , async ( ) => {
122131 installMatchMedia ( true )
123132 const wrapper = mount ( InkBleed , { props : { phase : 'drop' } } )
You can’t perform that action at this time.
0 commit comments