@@ -169,82 +169,6 @@ describe('FacetRow', () => {
169169 } )
170170 } )
171171
172- describe ( 'diff indicators' , ( ) => {
173- it ( 'renders diff with increase direction' , async ( ) => {
174- const component = await mountSuspended ( FacetRow , {
175- props : {
176- ...baseProps ,
177- values : [
178- { raw : 100 , display : '100' , status : 'neutral' } ,
179- { raw : 200 , display : '200' , status : 'neutral' } ,
180- ] ,
181- diffs : [ null , { direction : 'increase' , display : '+100%' , favorable : true } ] ,
182- } ,
183- } )
184- expect ( component . find ( '.i-carbon\\:arrow-up' ) . exists ( ) ) . toBe ( true )
185- expect ( component . text ( ) ) . toContain ( '+100%' )
186- } )
187-
188- it ( 'renders diff with decrease direction' , async ( ) => {
189- const component = await mountSuspended ( FacetRow , {
190- props : {
191- ...baseProps ,
192- values : [
193- { raw : 200 , display : '200' , status : 'neutral' } ,
194- { raw : 100 , display : '100' , status : 'neutral' } ,
195- ] ,
196- diffs : [ null , { direction : 'decrease' , display : '-50%' , favorable : false } ] ,
197- } ,
198- } )
199- expect ( component . find ( '.i-carbon\\:arrow-down' ) . exists ( ) ) . toBe ( true )
200- } )
201-
202- it ( 'applies favorable diff styling (green)' , async ( ) => {
203- const component = await mountSuspended ( FacetRow , {
204- props : {
205- ...baseProps ,
206- values : [
207- { raw : 100 , display : '100' , status : 'neutral' } ,
208- { raw : 50 , display : '50' , status : 'neutral' } ,
209- ] ,
210- diffs : [ null , { direction : 'decrease' , display : '-50%' , favorable : true } ] ,
211- } ,
212- } )
213- expect ( component . find ( '.text-emerald-400' ) . exists ( ) ) . toBe ( true )
214- } )
215-
216- it ( 'applies unfavorable diff styling (red)' , async ( ) => {
217- const component = await mountSuspended ( FacetRow , {
218- props : {
219- ...baseProps ,
220- values : [
221- { raw : 100 , display : '100' , status : 'neutral' } ,
222- { raw : 200 , display : '200' , status : 'neutral' } ,
223- ] ,
224- diffs : [ null , { direction : 'increase' , display : '+100%' , favorable : false } ] ,
225- } ,
226- } )
227- // Find the diff section with red styling
228- const diffElements = component . findAll ( '.text-red-400' )
229- expect ( diffElements . length ) . toBeGreaterThan ( 0 )
230- } )
231-
232- it ( 'does not render diff indicator for same direction' , async ( ) => {
233- const component = await mountSuspended ( FacetRow , {
234- props : {
235- ...baseProps ,
236- values : [
237- { raw : 100 , display : '100' , status : 'neutral' } ,
238- { raw : 100 , display : '100' , status : 'neutral' } ,
239- ] ,
240- diffs : [ null , { direction : 'same' , display : '0%' , favorable : undefined } ] ,
241- } ,
242- } )
243- expect ( component . find ( '.i-carbon\\:arrow-up' ) . exists ( ) ) . toBe ( false )
244- expect ( component . find ( '.i-carbon\\:arrow-down' ) . exists ( ) ) . toBe ( false )
245- } )
246- } )
247-
248172 describe ( 'date values' , ( ) => {
249173 it ( 'renders DateTime component for date type values' , async ( ) => {
250174 const component = await mountSuspended ( FacetRow , {
0 commit comments