Dmitry

Results 23 comments of Dmitry

@johnny-mcfadden-dailypay as I can see `dimensions.height` changes inside [onLayout](https://github.com/ammarahm-ed/react-native-actions-sheet/blob/master/src/index.tsx#L859) event, but test environment renders components in nodejs environment which doesn't have any dimensions, that's why `dimensions.height` always will be 0....

@johnny-mcfadden-dailypay I've created reproducible [example](https://github.com/dkulakov/rn-sheet-test/blob/main/__tests__/Select.test.tsx). Can you check it? It fails with the latest version, but if you install version `0.8.3`, test works well. Thanks in advance!

@johnny-mcfadden-dailypay [here is](https://github.com/dkulakov/rn-sheet-test/blob/main/__tests__/Select.test.tsx#L41) I call the [action sheet open](https://github.com/dkulakov/rn-sheet-test/blob/main/components/Select/Select.tsx#L23)

@Taloqq try to add `waitFor` like in this [example](https://github.com/dkulakov/rn-sheet-test/blob/main/__tests__/Select.test.tsx#L43) your test should like like, but don't forget to add `async` ` await waitFor(() => { component.findByText('Muokkaa tietoja'); }); `

@Taloqq I'm using version `0.8.3` and my tests work fine, but on the latest version it doesn't, so try to downgrade your version to `0.8.3` and check your tests again.

@Taloqq Look how I do it in my [example](https://github.com/dkulakov/rn-sheet-test/blob/main/__tests__/Select.test.tsx#L44)

@Taloqq Can you share your whole test case?

@Taloqq Is it also inside ActionSheet? If so, does it work? `await waitFor(() => fireEvent.press(component.getByTestId('nextPageButton')));`

@Taloqq Try to remove `waitFor` for `fireEvent.press(component.getByTestId('nextPageButton'))`

@Taloqq Can you reproduce this issue using my demo project?