From fe6683f4076cb93b23abe807ca097e5a6e31d293 Mon Sep 17 00:00:00 2001
From: adamviktora <84135613+adamviktora@users.noreply.github.com>
Date: Fri, 3 May 2024 20:44:25 +0200
Subject: [PATCH] feat(Button): change behaviour of isDisabled prop (#10255)
* feat(Button): isDisabled won't set aria-disabled and pf-m-disabled class on
);
- expect(screen.getByText('Disabled Anchor Button')).toHaveAttribute('tabindex', '-1');
+ const anchor = screen.getByText('Disabled Anchor Button');
+ expect(anchor).toHaveAttribute('tabindex', '-1');
+ expect(anchor).toHaveAttribute('aria-disabled', 'true');
});
test('setting tab index through props', () => {
diff --git a/packages/react-core/src/components/Button/__tests__/__snapshots__/Button.test.tsx.snap b/packages/react-core/src/components/Button/__tests__/__snapshots__/Button.test.tsx.snap
index 0818c970d3f..c17d7386cc1 100644
--- a/packages/react-core/src/components/Button/__tests__/__snapshots__/Button.test.tsx.snap
+++ b/packages/react-core/src/components/Button/__tests__/__snapshots__/Button.test.tsx.snap
@@ -6,7 +6,7 @@ exports[`Renders basic button 1`] = `
aria-disabled="false"
aria-label="basic button"
class="pf-v6-c-button pf-m-primary"
- data-ouia-component-id="OUIA-Generated-Button-primary-28"
+ data-ouia-component-id="OUIA-Generated-Button-primary-30"
data-ouia-component-type="PF6/Button"
data-ouia-safe="true"
type="button"
diff --git a/packages/react-core/src/components/DualListSelector/__tests__/__snapshots__/DualListSelector.test.tsx.snap b/packages/react-core/src/components/DualListSelector/__tests__/__snapshots__/DualListSelector.test.tsx.snap
index 2f713966de5..7c28575d55c 100644
--- a/packages/react-core/src/components/DualListSelector/__tests__/__snapshots__/DualListSelector.test.tsx.snap
+++ b/packages/react-core/src/components/DualListSelector/__tests__/__snapshots__/DualListSelector.test.tsx.snap
@@ -106,9 +106,9 @@ exports[`DualListSelector basic 1`] = `
class="pf-v6-c-dual-list-selector__controls-item"
>