@@ -89,8 +89,9 @@ describe('FooterWordmarkLoop', () => {
8989 expect ( html ) . toContain ( 'aria-hidden="true"' )
9090 expect ( html ) . toContain ( 'data-stage="wm" opacity="1"' )
9191 expect ( html ) . toContain ( 'data-stage="orb" opacity="0"' )
92- expect ( html ) . toContain ( 'stdDeviation="0.55"' )
93- expect ( html ) . toContain ( 'data-goo-group="" filter="none"' )
92+ expect ( html ) . toContain ( 'stdDeviation="0"' )
93+ expect ( html ) . toMatch ( / f i l t e r = " u r l \( # f w l - g o o - / )
94+ expect ( html ) . toContain ( 'values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"' )
9495 expect ( html ) . not . toContain ( '<feGaussianBlur in="goo"' )
9596 for ( const shape of SHAPES ) {
9697 expect ( html ) . toContain ( `data-stage="${ shape } " opacity="0"` )
@@ -102,14 +103,14 @@ describe('FooterWordmarkLoop', () => {
102103
103104 it ( 'plays the master timeline: wordmark, orb, the seven shapes, orb, wordmark' , ( ) => {
104105 expect ( attr ( '[data-stage="wm"]' , 'opacity' ) ) . toBe ( '1.0000' )
105- expect ( attr ( '[data-goo]' , 'stdDeviation' ) ) . toBe ( '0.550 ' )
106- expect ( attr ( '[data-goo-group ]' , 'filter ' ) ) . toBe ( 'none' )
106+ expect ( attr ( '[data-goo]' , 'stdDeviation' ) ) . toBe ( '0.000 ' )
107+ expect ( attr ( '[data-goo-matrix ]' , 'values ' ) ) . toMatch ( / 1 \. 0 0 0 - ? 0 \. 0 0 0 $ / )
107108
108109 advanceTo ( 2700 )
109110 expect ( attr ( '[data-stage="wm"]' , 'opacity' ) ) . toBe ( '0.0000' )
110111 expect ( attr ( '[data-stage="orb"]' , 'opacity' ) ) . toBe ( '1.0000' )
111112 expect ( attr ( '[data-goo]' , 'stdDeviation' ) ) . toBe ( '5.000' )
112- expect ( attr ( '[data-goo-group ]' , 'filter ' ) ) . toMatch ( / ^ u r l \( # f w l - g o o - / )
113+ expect ( attr ( '[data-goo-matrix ]' , 'values ' ) ) . toMatch ( / 4 0 \. 0 0 0 - 1 9 \. 0 0 0 $ / )
113114
114115 advanceTo ( 3900 )
115116 expect ( attr ( '[data-stage="metaballs"]' , 'opacity' ) ) . toBe ( '1.0000' )
@@ -126,25 +127,51 @@ describe('FooterWordmarkLoop', () => {
126127 advanceTo ( 16000 )
127128 expect ( attr ( '[data-stage="wm"]' , 'opacity' ) ) . toBe ( '1.0000' )
128129 expect ( attr ( '[data-stage="thinking"]' , 'opacity' ) ) . toBe ( '0.0000' )
129- expect ( attr ( '[data-goo]' , 'stdDeviation' ) ) . toBe ( '0.550 ' )
130- expect ( attr ( '[data-goo-group ]' , 'filter ' ) ) . toBe ( 'none' )
130+ expect ( attr ( '[data-goo]' , 'stdDeviation' ) ) . toBe ( '0.000 ' )
131+ expect ( attr ( '[data-goo-matrix ]' , 'values ' ) ) . toMatch ( / 1 \. 0 0 0 - ? 0 \. 0 0 0 $ / )
131132
132133 advanceTo ( CYCLE_MS + 2700 )
133134 expect ( attr ( '[data-stage="orb"]' , 'opacity' ) ) . toBe ( '1.0000' )
134135 expect ( attr ( '[data-stage="wm"]' , 'opacity' ) ) . toBe ( '0.0000' )
135136 } )
136137
137- it ( 'returns to an unfiltered wordmark when reduced motion is enabled mid-morph' , ( ) => {
138+ it ( 'returns to an identity filter when reduced motion is enabled mid-morph' , ( ) => {
138139 advanceTo ( 2700 )
139- expect ( attr ( '[data-goo-group ]' , 'filter ' ) ) . toMatch ( / ^ u r l \( # f w l - g o o - / )
140+ expect ( attr ( '[data-goo-matrix ]' , 'values ' ) ) . toMatch ( / 4 0 \. 0 0 0 - 1 9 \. 0 0 0 $ / )
140141
141142 reducedMotion = true
142143 act ( ( ) => onMotionPreference ?.( ) )
143144
144145 expect ( pending ) . toHaveLength ( 0 )
145146 expect ( attr ( '[data-stage="wm"]' , 'opacity' ) ) . toBe ( '1.0000' )
146147 expect ( attr ( '[data-stage="orb"]' , 'opacity' ) ) . toBe ( '0.0000' )
147- expect ( attr ( '[data-goo-group]' , 'filter' ) ) . toBe ( 'none' )
148+ expect ( attr ( '[data-goo-matrix]' , 'values' ) ) . toMatch ( / 1 \. 0 0 0 - ? 0 \. 0 0 0 $ / )
149+ expect ( attr ( '[data-goo]' , 'stdDeviation' ) ) . toBe ( '0.000' )
150+ } )
151+
152+ it ( 'eases the same filter to identity at both wordmark boundaries' , ( ) => {
153+ advanceTo ( 1300 )
154+ expect ( attr ( '[data-goo]' , 'stdDeviation' ) ) . toBe ( '0.000' )
155+ expect ( attr ( '[data-goo-matrix]' , 'values' ) ) . toMatch ( / 1 \. 0 0 0 - ? 0 \. 0 0 0 $ / )
156+
157+ advanceTo ( 1301 )
158+ expect ( Number ( attr ( '[data-goo]' , 'stdDeviation' ) ) ) . toBeLessThan ( 0.001 )
159+ expect ( attr ( '[data-goo-matrix]' , 'values' ) ) . toMatch ( / 1 \. 0 0 0 - ? 0 \. 0 0 0 $ / )
160+
161+ advanceTo ( 1800 )
162+ expect ( attr ( '[data-goo-matrix]' , 'values' ) ) . toMatch ( / 4 0 \. 0 0 0 - 1 9 \. 0 0 0 $ / )
163+
164+ advanceTo ( 2500 )
165+ expect ( attr ( '[data-goo]' , 'stdDeviation' ) ) . toBe ( '5.000' )
166+
167+ advanceTo ( 15199 )
168+ expect ( Number ( attr ( '[data-goo]' , 'stdDeviation' ) ) ) . toBeLessThan ( 0.001 )
169+ expect ( attr ( '[data-goo-matrix]' , 'values' ) ) . toMatch ( / 1 \. 0 0 0 - ? 0 \. 0 0 0 $ / )
170+
171+ advanceTo ( 15200 )
172+ expect ( attr ( '[data-goo]' , 'stdDeviation' ) ) . toBe ( '0.000' )
173+ expect ( attr ( '[data-goo-matrix]' , 'values' ) ) . toMatch ( / 1 \. 0 0 0 - ? 0 \. 0 0 0 $ / )
174+ expect ( host ?. querySelector ( 'feComposite' ) ) . toBeNull ( )
148175 } )
149176
150177 it ( 'stops requesting frames on unmount' , ( ) => {
0 commit comments