Skip to content
New issue

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

[Task] Recording search/filter unit tests #488

Closed
Tracked by #440
jan-law opened this issue Jul 28, 2022 · 0 comments · Fixed by #503
Closed
Tracked by #440

[Task] Recording search/filter unit tests #488

jan-law opened this issue Jul 28, 2022 · 0 comments · Fixed by #503
Assignees
Labels
good first issue Good for newcomers test

Comments

@jan-law
Copy link
Contributor

jan-law commented Jul 28, 2022

Unit tests for the search/filters component in the Active and Archived recording tables are missing unit tests.

The implementation for this feature is in #414

As of #414, the <RecordingFilters/> component in the recordings table toolbar is mocked out with the following:

jest.mock('@app/Recordings/RecordingFilters', () => {
  return {
    ...jest.requireActual('@app/Recordings/RecordingFilters'),
    RecordingFilters: jest.fn(() => {
      return <div>
                RecordingFilters
             </div>
    })
  };
});

Since the filter component will only generate useful output if it's part of a recordings table, you could remove this mock and test the recording filter component by performing various userEvent.clicks in the ActiveRecordingsTable.test and ArchivedRecordingsTable.test. If you can find a way to test the component in it's own unit test file, that's good too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers test
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants