@@ -191,10 +191,10 @@ describe('FacetSelector', () => {
191191 const component = await mountSuspended ( FacetSelector )
192192
193193 // totalDependencies is marked as comingSoon
194- const buttons = component . findAll ( 'button' )
194+ const buttons = component . findAll ( 'button[role="checkbox"] ' )
195195 const comingSoonButton = buttons . find ( b => b . text ( ) . includes ( comingSoonFacetLabel ) )
196196
197- expect ( comingSoonButton ?. attributes ( 'disabled' ) ) . toBeDefined ( )
197+ expect ( comingSoonButton ?. attributes ( 'aria- disabled' ) ) . toBe ( 'true' )
198198 } )
199199
200200 it ( 'shows coming soon text for comingSoon facets' , async ( ) => {
@@ -231,8 +231,8 @@ describe('FacetSelector', () => {
231231 it ( 'calls selectCategory when all button is clicked' , async ( ) => {
232232 const component = await mountSuspended ( FacetSelector )
233233
234- // Find the first 'all' button (for performance category)
235- const allButton = component . findAll ( 'button' ) . find ( b => b . text ( ) === 'all' )
234+ // Find the first 'all' radio (for performance category)
235+ const allButton = component . findAll ( 'button[role="radio"] ' ) . find ( b => b . text ( ) === 'all' )
236236 await allButton ! . trigger ( 'click' )
237237
238238 expect ( mockSelectCategory ) . toHaveBeenCalledWith ( 'performance' )
@@ -245,8 +245,8 @@ describe('FacetSelector', () => {
245245
246246 const component = await mountSuspended ( FacetSelector )
247247
248- // Find the first 'none' button (for performance category)
249- const noneButton = component . findAll ( 'button' ) . find ( b => b . text ( ) === 'none' )
248+ // Find the first 'none' radio (for performance category)
249+ const noneButton = component . findAll ( 'button[role="radio"] ' ) . find ( b => b . text ( ) === 'none' )
250250 await noneButton ! . trigger ( 'click' )
251251
252252 expect ( mockDeselectCategory ) . toHaveBeenCalledWith ( 'performance' )
@@ -262,9 +262,9 @@ describe('FacetSelector', () => {
262262
263263 const component = await mountSuspended ( FacetSelector )
264264
265- const allButton = component . findAll ( 'button' ) . find ( b => b . text ( ) === 'all' )
266- // First all button (performance) should be disabled
267- expect ( allButton ! . attributes ( 'disabled' ) ) . toBeDefined ( )
265+ const allButton = component . findAll ( 'button[role="radio"] ' ) . find ( b => b . text ( ) === 'all' )
266+ // First all button (performance) should be aria- disabled
267+ expect ( allButton ! . attributes ( 'aria- disabled' ) ) . toBe ( 'true' )
268268 } )
269269
270270 it ( 'disables none button when no facets in category are selected' , async ( ) => {
@@ -274,9 +274,9 @@ describe('FacetSelector', () => {
274274
275275 const component = await mountSuspended ( FacetSelector )
276276
277- const noneButton = component . findAll ( 'button' ) . find ( b => b . text ( ) === 'none' )
278- // First none button (performance) should be disabled
279- expect ( noneButton ! . attributes ( 'disabled' ) ) . toBeDefined ( )
277+ const noneButton = component . findAll ( 'button[role="radio"] ' ) . find ( b => b . text ( ) === 'none' )
278+ // First none button (performance) should be aria- disabled
279+ expect ( noneButton ! . attributes ( 'aria- disabled' ) ) . toBe ( 'true' )
280280 } )
281281 } )
282282
0 commit comments