We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
const { getByTestId } = testingHelpers.renderWithProviders( <ProductDetailScreen {...testProps} />, { preloadedState: preloadedState, } ); const productSpecificationsTitleView = getByTestId( TestIds.PRODUCT_DETAIL.PRODUCT_SPECIFICATION_TITLE ); expect(productSpecificationsTitleView).toBeDefined(); await act(async () => { await fireEvent.press(productSpecificationsTitleView); }); const productSpecificationsContentView = getByTestId( TestIds.PRODUCT_DETAIL.PRODUCT_SPECIFICATION_CONTENT ); expect(productSpecificationsContentView).toBeDefined(); });
Whether or not i press the title the content is still present in the dom
Used & tested:
toBeDefined toBeOnScreen toBeNull toBeVisible
but above all fails i used queryByTestId, getByTestId, queryByText
The text was updated successfully, but these errors were encountered:
I tested on this way
const firstItemCollapsable = screen.getByTestId( `${LongformContentNavigationTestIDs.outlineListItemContainer}.${mockedRoutes[0].id}`, ).children[1]; /// is hidden expect(firstItemCollapsable.instance.props.collapsed).toBe(true); fireEvent.press(firstItemIcon); /// is collapsed expect(firstItemCollapsable.instance.props.collapsed).toBe(false); fireEvent.press(firstItemIcon); /// is hidden again expect(firstItemCollapsable.instance.props.collapsed).toBe(true);
Sorry, something went wrong.
No branches or pull requests
Whether or not i press the title the content is still present in the dom
Used & tested:
toBeDefined
toBeOnScreen
toBeNull
toBeVisible
but above all fails
i used queryByTestId, getByTestId, queryByText
The text was updated successfully, but these errors were encountered: