diff options
Diffstat (limited to 'spec/frontend/members')
-rw-r--r-- | spec/frontend/members/components/members_tabs_spec.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/frontend/members/components/members_tabs_spec.js b/spec/frontend/members/components/members_tabs_spec.js index 1d882e5ef09..1354b938d77 100644 --- a/spec/frontend/members/components/members_tabs_spec.js +++ b/spec/frontend/members/components/members_tabs_spec.js @@ -9,6 +9,7 @@ import { MEMBER_TYPES, TAB_QUERY_PARAM_VALUES, ACTIVE_TAB_QUERY_PARAM_NAME, + FILTERED_SEARCH_TOKEN_GROUPS_WITH_INHERITED_PERMISSIONS, } from '~/members/constants'; import { pagination } from '../mock_data'; @@ -42,6 +43,7 @@ describe('MembersTabs', () => { }, filteredSearchBar: { searchParam: 'search_groups', + tokens: [FILTERED_SEARCH_TOKEN_GROUPS_WITH_INHERITED_PERMISSIONS.type], }, }, }, @@ -163,6 +165,18 @@ describe('MembersTabs', () => { expect(findTabByText('Groups')).not.toBeUndefined(); }); }); + + describe('when url param matches `filteredSearchBar.tokens`', () => { + beforeEach(() => { + setWindowLocation('?groups_with_inherited_permissions=exclude'); + }); + + it('shows tab that corresponds to filtered search token', async () => { + await createComponent({ totalItems: 0 }); + + expect(findTabByText('Groups')).not.toBeUndefined(); + }); + }); }); describe('when `canManageMembers` is `false`', () => { |