menu

Testing Library

Simple and complete DOM testing utilities that encourage good testing practices.

Channels
Chat
view-forward
# All channels
view-forward
# General
view-forward
# General Help
view-forward
# Angular Help
view-forward
# Cypress Help
view-forward
# DOM Help
view-forward
# React Help
view-forward
# TestCafe Help
view-forward
# Vue Help
view-forward
Team
Posts
Members
Info

Found multiple elements with the testID of XYZ

Hello, I am new to Testing Library and React in general so I apologize if I am missing something simple. I have searched this error and came up with a Twitter post by Kent but it did not have any hints in to 'how' to fix this. I am trying to test that when a link/button is…

thumbsup
0
message-simple
1

Testing a disabled button

I'm using react-native-testing-library to test my RN app. I want to test that use is not able click on button which is disabled. I can confirm in UI that button is disabled but when I do fireEvent.press(getByType('button')) is doesn't recognize button is disabled and actually…

thumbsup
0
message-simple
4

How do you test an Alert?

Hi, I'm learning how to you use testing-library on a react native app and I have come across an issue, I have this alert: …

thumbsup
0
message-simple
1

React Native Slider component unit testing

Hi Everyone! I have been trying to test the slider component provided by https://react-native-elements.github.io/react-native-elements/docs/slider.html using https://www.native-testing-library.com ... …

thumbsup
0
message-simple
3

Trying to get Snackbar in render output.

Hey, I am trying to access Snackbar action within the test render object, I am using react-native-testing-library. I cannot get the object, it results in "No instances found" whatever I try, getByText, getByt A11Label, nothing seems to work. Did anyone have a similia problem? Am…

thumbsup
1
message-simple
22

Attempting to mock Opentok

Has anyone mocked opentok-react-native before?

thumbsup
0
message-simple
0

Need help mocking opentok-react-native

thumbsup
0
message-simple
0

fireEvent.press, fireEvent arguments -> undefined

does testing-library not dispatch "real" events, or something like that? jest, react-native expo, react-router-native leads to TypeError: Cannot read property 'defaultPrevented' of undefined (this is a react-router error) …

thumbsup
0
message-simple
0

You must wrap your Subscribe component with a Provider

Hi all I have the following component that I'm trying to test. loading-screen.js loading-screen.test.js …

thumbsup
0
message-simple
0

Code Review of a Test: Testing a TextInput component

I have the following component: I would like to test the onChangeText which right now is not specifically passed to the component except than under ...props, however I see it being used on its parent component. In my test, I'm getting confused on how best to test both that the…

thumbsup
0
message-simple
3