Skip to content

Commit 797e6dc

Browse files
authored
add testID prop to Drawer & FloatingButton (#1073)
1 parent 9d461dc commit 797e6dc

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed

generatedTypes/components/drawer/index.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,13 @@ interface Props {
104104
* Custom value of any type to pass on to the component and receive back in the action callbacks
105105
*/
106106
customValue?: any;
107+
/**
108+
* Used as testing identifier
109+
*/
110+
testID?: string;
107111
}
108112
export declare type DrawerProps = Props;
113+
export declare type DrawerItemProps = ItemProps;
109114
/**
110115
* @description: Drawer Component
111116
* @important: If your app works with RNN, your screen must be wrapped

generatedTypes/components/floatingButton/index.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ export interface FloatingButtonProps {
2929
* Whether to show background overlay
3030
*/
3131
hideBackgroundOverlay?: boolean;
32+
/**
33+
* Used as testing identifier
34+
*/
35+
testID?: string;
3236
}
3337
declare const _default: React.ComponentClass<FloatingButtonProps & {
3438
useCustomTheme?: boolean | undefined;

src/components/drawer/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ interface Props {
118118
* Custom value of any type to pass on to the component and receive back in the action callbacks
119119
*/
120120
customValue?: any;
121+
/**
122+
* Used as testing identifier
123+
*/
124+
testID?: string;
121125
}
122126

123127
export type DrawerProps = Props;

src/components/floatingButton/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ export interface FloatingButtonProps {
3737
* Whether to show background overlay
3838
*/
3939
hideBackgroundOverlay?: boolean;
40+
/**
41+
* Used as testing identifier
42+
*/
43+
testID?: string;
4044
}
4145

4246
const SHOW_ANIMATION_DELAY = 350;

0 commit comments

Comments
 (0)