Commit c1ff62cf authored by Phil Hughes's avatar Phil Hughes

Merge branch 'kp-hide-preload-token-values-during-search' into 'master'

Hide preloaded token values while searching

See merge request gitlab-org/gitlab!64188
parents c6c54806 879a8fea
......@@ -184,7 +184,7 @@ export default {
<gl-dropdown-divider />
</template>
<slot
v-if="preloadedTokenValues.length"
v-if="preloadedTokenValues.length && !searchKey"
name="token-values-list"
:token-values="preloadedTokenValues"
></slot>
......
......@@ -290,6 +290,14 @@ describe('AuthorToken', () => {
expect(firstSuggestion).toContain('Administrator');
expect(firstSuggestion).toContain('@root');
});
it('does not show current user while searching', async () => {
wrapper.findComponent(BaseToken).vm.handleInput({ data: 'foo' });
await wrapper.vm.$nextTick();
expect(wrapper.findComponent(GlFilteredSearchSuggestion).exists()).toBe(false);
});
});
});
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment