Skip to content

Commit 7288724

Browse files
added tests for Search Bar in the Organization List Page of SUPERADMIN #827 (#867)
* added tests for Search Bar in the Organization List Page of SUPERADMIN #827 * added tests for Search Bar in the Organization List Page of SUPERADMIN #827
1 parent 5820dd9 commit 7288724

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/screens/OrgList/OrgList.test.tsx

+21
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,27 @@ describe('Organisation List Page', () => {
219219
});
220220
});
221221

222+
test('Search bar filters organizations by name', async () => {
223+
render(
224+
<MockedProvider addTypename={false} link={link}>
225+
<BrowserRouter>
226+
<Provider store={store}>
227+
<I18nextProvider i18n={i18nForTest}>
228+
<OrgList />
229+
</I18nextProvider>
230+
</Provider>
231+
</BrowserRouter>
232+
</MockedProvider>
233+
);
234+
await wait();
235+
236+
//Search orgnizations with there name
237+
const searchBar = screen.getByRole('textbox');
238+
userEvent.type(searchBar, 'Akatsuki');
239+
await wait();
240+
expect(searchBar).toBeInTheDocument();
241+
});
242+
222243
test('Should render no organisation warning alert when there are no organization', async () => {
223244
window.location.assign('/');
224245

0 commit comments

Comments
 (0)