Commit 9c1ff636 authored by Olena Horal-Koretska's avatar Olena Horal-Koretska

Merge branch 'nicolasdular/hide-pipelines-filter-on-empty-state' into 'master'

Hide pipeline filter when no pipeline exists

See merge request gitlab-org/gitlab!57881
parents 7ee6266e e4fb1f57
......@@ -313,6 +313,7 @@ export default {
</div>
<pipelines-filtered-search
v-if="stateToRender !== $options.stateMap.emptyState"
:project-id="projectId"
:params="validatedParams"
@filterPipelines="filterPipelines"
......
---
title: Hide pipeline filtered search when no pipeline exists
merge_request: 57881
author:
type: changed
......@@ -515,6 +515,10 @@ describe('Pipelines', () => {
expect(findEmptyState().text()).toBe('There are currently no pipelines.');
});
it('renders filtered search', () => {
expect(findFilteredSearch().exists()).toBe(true);
});
it('renders tab empty state finished scope', async () => {
mock.onGet(mockPipelinesEndpoint, { params: { scope: 'finished', page: '1' } }).reply(200, {
pipelines: [],
......@@ -547,6 +551,10 @@ describe('Pipelines', () => {
);
});
it('does not render filtered search', () => {
expect(findFilteredSearch().exists()).toBe(false);
});
it('does not render tabs nor buttons', () => {
expect(findNavigationTabs().exists()).toBe(false);
expect(findTab('all').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