Skip to content

Add support for pointerEvents #650

Closed
@Trancever

Description

@Trancever

Describe the Feature

Currently, when there is a wrapping View with pointerEvents="none" testing lib still allows pressing buttons that are rendered inside of that View.

Expected behaviour:

// component
<View pointerEvents="none">
  <Touchable onPress={onPress}>Click me</Touchable>
</View>

...

// test
const mockOnPress = jest.fn();
const { getByText } = render(<Component onPress={mockOnPress} />);

fireEvent.press(getByText('Click me'));

expect(mockOnPress).not.toHaveBeenCalled();

Possible Implementations

No idea, cause I am not familiar with the codebase :(

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions