Skip to content

Commit

Permalink
Remove erroneous parameter for debounce (mattermost#4408)
Browse files Browse the repository at this point in the history
* Remove erroneous parameter for debounce

* Fixing system_user tests
  • Loading branch information
jespino committed Dec 3, 2019
1 parent c344cc1 commit 91da11a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/admin_console/system_users/system_users.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export default class SystemUsers extends React.Component {
}

this.setState({loading: false});
}, Constants.SEARCH_TIMEOUT_MILLISECONDS, true);
}, Constants.SEARCH_TIMEOUT_MILLISECONDS);

getUserById = async (id) => {
if (this.props.users[id]) {
Expand Down
2 changes: 2 additions & 0 deletions components/admin_console/system_users/system_users.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ describe('components/admin_console/system_users', () => {

await wrapper.instance().doSearch('searchterm', '', '');

jest.runAllTimers();
expect(searchProfiles).toHaveBeenCalled();
expect(searchProfiles).toHaveBeenCalledWith('searchterm', {allow_inactive: true});
});
Expand All @@ -138,6 +139,7 @@ describe('components/admin_console/system_users', () => {

await wrapper.instance().doSearch('searchterm', '', 'system_admin');

jest.runAllTimers();
expect(searchProfiles).toHaveBeenCalled();
expect(searchProfiles).toHaveBeenCalledWith('searchterm', {allow_inactive: true, role: 'system_admin'});
});
Expand Down

0 comments on commit 91da11a

Please sign in to comment.