Skip to content

Commit

Permalink
added missing test
Browse files Browse the repository at this point in the history
  • Loading branch information
chandel-aman committed Nov 29, 2023
1 parent f5f51a8 commit a1d2fdb
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions src/screens/Requests/Requests.test.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
import React from 'react';
import { MockedProvider } from '@apollo/react-testing';
import {
act,
render,
screen,
fireEvent,
waitFor,
} from '@testing-library/react';
import { act, render, screen, fireEvent } from '@testing-library/react';
import 'jest-localstorage-mock';
import 'jest-location-mock';
import { I18nextProvider } from 'react-i18next';
Expand Down Expand Up @@ -223,28 +217,6 @@ describe('Testing Request screen', () => {
userEvent.type(screen.getByTestId(/searchByName/i), '');
});

// test('Testing User data is not present', async () => {
// render(
// <MockedProvider addTypename={false} link={link}>
// <BrowserRouter>
// <Provider store={store}>
// <I18nextProvider i18n={i18nForTest}>
// <Requests />
// </I18nextProvider>
// </Provider>
// </BrowserRouter>
// </MockedProvider>
// );

// await wait();

// const inputBox = screen.getByTestId(`searchByName`);
// expect(inputBox).toBeInTheDocument();

// fireEvent.change(inputBox, { target: { value: 'Nonexistent User' } });
// expect(screen.getByText(/No results found for/i)).toBeTruthy();
// });

test('Does not display loading state when isLoading is false and usersData is present', async () => {
// Mock the scenario where isLoading is false and there is some data in usersData
render(
Expand Down

0 comments on commit a1d2fdb

Please sign in to comment.