We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c29061 commit 7390abfCopy full SHA for 7390abf
src/matchers/__tests__/to-be-disabled.test.tsx
@@ -69,6 +69,23 @@ describe('.toBeDisabled', () => {
69
});
70
71
72
+ Object.entries(ALL_COMPONENTS).forEach(([name, Component]) => {
73
+ test(`handle when parent element is disabled for element ${name}`, () => {
74
+ const { queryByTestId } = render(
75
+ <View aria-disabled={true}>
76
+ <View>
77
+ {/* @ts-expect-error JSX element type 'Component' does not have any construct or call signatures.ts(2604) */}
78
+ <Component testID={name}>
79
+ <TextInput />
80
+ </Component>
81
+ </View>
82
83
+ );
84
+
85
+ expect(queryByTestId(name)).toBeDisabled();
86
+ });
87
88
89
test('handle editable prop for TextInput', () => {
90
const { getByTestId, getByPlaceholderText } = render(
91
<View>
0 commit comments