the challenge am having is explained below Am trying to set a draft_id value after the submit-recipients data-testid is clicked. The beforementioned value is pa
I have this component, which uses react-chartjs-2 to render a Doughnut chart: const CompliancyChart = ({data}): JSX.Element => { ... return ( <Cha
I understand that React Testing Library has an example of testing with react router, but I couldn't get it to work (I think because I am using react router V6).
My test passes but has a console refrenceError: You are trying to access a property or method of the Jest environment after it has been torn down. Test: import
I have an ag-grid that contains different columns and column groups, as well as row groups. I am trying to test the DOM elements displayed in the row group usin
I'm using the Select component from patternfly and attempting to do a test that involves making changes to the selection. I feel like I'm in a catch 22 as I can
After updating to React 18 or creating a new React 18 app from create-react-app, when I run the yarn test command, it gives a console.error as a Warning for eac
I started a project in react and I implemented some tests (first time I ever did test) using jasmine and react-testing-library (they are not useful for the mome
I have several tests written with Jest and React Testing Library. They all mock fetch and use a userEvent.click call to fire a submit button which makes a fetch
I just can't figure out, how I'm supposed to mock / get data from scrollHeight, scrollWidth, clientHeight and clientWidth in test. For better introduction, my t
I'm trying to upgrade my project to React 18, everything works in dev and production mode in the browser. But after upgrading to the latest version of @testing-
I am using act function from library https://testing-library.com/docs/react-testing-library/intro/. At this point I have something like this: await act(async (
I'm quite newbie for the testing library. I already find out how to test the span appearance with the element but seems there's no answer of it. I have an examp
I am trying to unit test my function that call useQuery from @apollo/client. Here's what I have done getPixelID.ts import { useQuery } from '@apollo/client'; im
I have an svg inside a React component that renders conditionally. <div className='avatar'> {gender === true ? <MaleAvatar /> : <FemaleAvat
I have below listener added for which I am trying to write test using Jest. However, it seems as though the event I'm dispatching doesn't reach my code. window.
I have a TextArea component that takes JSON {"someKey": "someValue"}. When I inspect the dom, {"someKey": "someValue"} shows up just fine in the inspector. Howe
I have a small problem with act() error in react-testing-library. In useEffect I try to call an function that is a promise. Promise returns some data and displa
I'm trying to test an Info HOC on my react app : const InfoHOC = (HocComponent) => ({ message }) => ( <> <Tooltip title={message}>
I am trying to write a few simple tests that the headers and data I want to render are showing up as expected. I created a repo - https://github.com/olore/ag-gr