Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/base/src/ListItem/ListItem.Swipeable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export const ListItemSwipeable: RneFunctionComponent<
onSwipeBegin,
onSwipeEnd,
animation = { type: 'spring', duration: 200 },
testID,
...rest
}) => {
const translateX = React.useRef(new Animated.Value(0));
Expand Down Expand Up @@ -144,7 +145,7 @@ export const ListItemSwipeable: RneFunctionComponent<
);

return (
<View style={styles.container}>
<View style={styles.container} testID={testID}>
<View style={styles.actions}>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also add the testID to the other sub-components, just like below
testID={testID ? ${testID}-actions : undefined}

<View
style={[
Expand Down
5 changes: 5 additions & 0 deletions packages/base/src/SpeedDial/SpeedDial.Action.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import { RneFunctionComponent } from '../helpers';
export interface SpeedDialActionProps extends Omit<FABProps, 'size'> {
/** onPress on Label Press */
labelPressable?: boolean;

/** testID for testing */
testID?: string;
}

/** Adds Action to the SpeedDial.
Expand All @@ -16,10 +19,12 @@ export const SpeedDialAction: RneFunctionComponent<SpeedDialActionProps> = ({
placement,
labelPressable,
onPress,
testID,
...actionProps
}) => {
return (
<Pressable
testID={testID}
onPress={labelPressable ? onPress : undefined}
style={[
styles.action,
Expand Down