Skip to content

Commit 0e9c5cb

Browse files
committed
fix tests
1 parent b9646a0 commit 0e9c5cb

File tree

2 files changed

+19
-55
lines changed

2 files changed

+19
-55
lines changed

packages/module/src/components/CatalogTile/CatalogTile.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,6 @@ test('CatalogTile onClick behaves properly', async () => {
121121
);
122122

123123
// await user.click(screen.getByText('Patternfly'));
124-
await user.click(screen.getByRole('radio'));
124+
await user.click(screen.getByRole('button'));
125125
expect(onClickMock).toHaveBeenCalled();
126126
});

packages/module/src/components/CatalogTile/__snapshots__/CatalogTile.test.tsx.snap

Lines changed: 18 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,12 @@ exports[`CatalogTile href renders properly 1`] = `
1818
<div
1919
class="pf-v6-c-card__selectable-actions"
2020
>
21-
<div
22-
class="pf-v6-c-radio pf-m-standalone"
23-
>
24-
<input
25-
aria-invalid="false"
26-
aria-labelledby="test-href"
27-
class="pf-v6-c-radio__input pf-v6-screen-reader"
28-
data-ouia-component-id="OUIA-Generated-Radio-3"
29-
data-ouia-component-type="PF6/Radio"
30-
data-ouia-safe="true"
31-
id="test-href-input"
32-
type="radio"
33-
/>
34-
<label
35-
class="pf-v6-c-radio__label"
36-
for="test-href-input"
37-
/>
38-
</div>
21+
<button
22+
aria-labelledby="test-href"
23+
class="pf-v6-c-card__clickable-action"
24+
id="test-href-input"
25+
type="button"
26+
/>
3927
</div>
4028
</div>
4129
<div
@@ -436,24 +424,12 @@ exports[`CatalogTile renders properly 1`] = `
436424
<div
437425
class="pf-v6-c-card__selectable-actions"
438426
>
439-
<div
440-
class="pf-v6-c-radio pf-m-standalone"
441-
>
442-
<input
443-
aria-invalid="false"
444-
aria-labelledby="tile-footer-test"
445-
class="pf-v6-c-radio__input pf-v6-screen-reader"
446-
data-ouia-component-id="OUIA-Generated-Radio-1"
447-
data-ouia-component-type="PF6/Radio"
448-
data-ouia-safe="true"
449-
id="tile-footer-test-input"
450-
type="radio"
451-
/>
452-
<label
453-
class="pf-v6-c-radio__label"
454-
for="tile-footer-test-input"
455-
/>
456-
</div>
427+
<button
428+
aria-labelledby="tile-footer-test"
429+
class="pf-v6-c-card__clickable-action"
430+
id="tile-footer-test-input"
431+
type="button"
432+
/>
457433
</div>
458434
</div>
459435
<div
@@ -529,24 +505,12 @@ exports[`CatalogTile renders properly 1`] = `
529505
<div
530506
class="pf-v6-c-card__selectable-actions"
531507
>
532-
<div
533-
class="pf-v6-c-radio pf-m-standalone"
534-
>
535-
<input
536-
aria-invalid="false"
537-
aria-labelledby="custom-icon-svg-test"
538-
class="pf-v6-c-radio__input pf-v6-screen-reader"
539-
data-ouia-component-id="OUIA-Generated-Radio-2"
540-
data-ouia-component-type="PF6/Radio"
541-
data-ouia-safe="true"
542-
id="custom-icon-svg-test-input"
543-
type="radio"
544-
/>
545-
<label
546-
class="pf-v6-c-radio__label"
547-
for="custom-icon-svg-test-input"
548-
/>
549-
</div>
508+
<button
509+
aria-labelledby="custom-icon-svg-test"
510+
class="pf-v6-c-card__clickable-action"
511+
id="custom-icon-svg-test-input"
512+
type="button"
513+
/>
550514
</div>
551515
</div>
552516
<div

0 commit comments

Comments
 (0)