Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c875ed90
Commit
c875ed90
authored
Oct 28, 2021
by
Scott Stern
Committed by
Kushal Pandya
Oct 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move boards_filtered_search to have an ee component
parent
e2584438
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
8 deletions
+54
-8
app/assets/javascripts/boards/components/issue_board_filtered_search.vue
...scripts/boards/components/issue_board_filtered_search.vue
+1
-1
ee/app/assets/javascripts/boards/components/board_filtered_search.vue
...s/javascripts/boards/components/board_filtered_search.vue
+17
-0
ee/app/assets/javascripts/boards/components/epic_filtered_search.vue
...ts/javascripts/boards/components/epic_filtered_search.vue
+1
-1
ee/spec/frontend/boards/components/board_filtered_search_spec.js
.../frontend/boards/components/board_filtered_search_spec.js
+27
-0
ee/spec/frontend/boards/components/epic_filtered_search_spec.js
...c/frontend/boards/components/epic_filtered_search_spec.js
+2
-2
ee/spec/frontend/boards/components/issue_board_filtered_search_spec.js
...end/boards/components/issue_board_filtered_search_spec.js
+1
-1
spec/frontend/boards/components/issue_board_filtered_search_spec.js
...end/boards/components/issue_board_filtered_search_spec.js
+5
-3
No files found.
app/assets/javascripts/boards/components/issue_board_filtered_search.vue
View file @
c875ed90
<
script
>
import
{
GlFilteredSearchToken
}
from
'
@gitlab/ui
'
;
import
{
mapActions
}
from
'
vuex
'
;
import
BoardFilteredSearch
from
'
~
/boards/components/board_filtered_search.vue
'
;
import
BoardFilteredSearch
from
'
ee_else_ce
/boards/components/board_filtered_search.vue
'
;
import
{
BoardType
}
from
'
~/boards/constants
'
;
import
issueBoardFilters
from
'
~/boards/issue_board_filters
'
;
import
{
TYPE_USER
}
from
'
~/graphql_shared/constants
'
;
...
...
ee/app/assets/javascripts/boards/components/board_filtered_search.vue
0 → 100644
View file @
c875ed90
<
script
>
import
BoardFilteredSearchCe
from
'
~/boards/components/board_filtered_search.vue
'
;
export
default
{
components
:
{
BoardFilteredSearchCe
},
props
:
{
tokens
:
{
required
:
true
,
type
:
Array
,
},
},
};
</
script
>
<
template
>
<board-filtered-search-ce
v-bind=
"
{ ...$props, ...$attrs }" />
</
template
>
ee/app/assets/javascripts/boards/components/epic_filtered_search.vue
View file @
c875ed90
<
script
>
import
BoardFilteredSearch
from
'
~
/boards/components/board_filtered_search.vue
'
;
import
BoardFilteredSearch
from
'
ee
/boards/components/board_filtered_search.vue
'
;
import
issueBoardFilter
from
'
~/boards/issue_board_filters
'
;
import
{
TYPE_USER
}
from
'
~/graphql_shared/constants
'
;
import
{
convertToGraphQLId
}
from
'
~/graphql_shared/utils
'
;
...
...
ee/spec/frontend/boards/components/board_filtered_search_spec.js
0 → 100644
View file @
c875ed90
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
BoardFilteredSearch
from
'
ee/boards/components/board_filtered_search.vue
'
;
import
BoardFilteredSearchCe
from
'
~/boards/components/board_filtered_search.vue
'
;
describe
(
'
ee/BoardFilteredSearch
'
,
()
=>
{
let
wrapper
;
const
createComponent
=
()
=>
{
wrapper
=
shallowMount
(
BoardFilteredSearch
,
{
propsData
:
{
tokens
:
[]
}
});
};
const
findFilteredSearch
=
()
=>
wrapper
.
findComponent
(
BoardFilteredSearchCe
);
afterEach
(()
=>
{
wrapper
.
destroy
();
});
describe
(
'
default
'
,
()
=>
{
beforeEach
(()
=>
{
createComponent
();
});
it
(
'
renders FilteredSearch
'
,
()
=>
{
expect
(
findFilteredSearch
().
exists
()).
toBe
(
true
);
});
});
});
ee/spec/frontend/boards/components/epic_filtered_search_spec.js
View file @
c875ed90
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
EpicFilteredSearch
from
'
ee
_component
/boards/components/epic_filtered_search.vue
'
;
import
BoardFilteredSearch
from
'
~
/boards/components/board_filtered_search.vue
'
;
import
EpicFilteredSearch
from
'
ee/boards/components/epic_filtered_search.vue
'
;
import
BoardFilteredSearch
from
'
ee
/boards/components/board_filtered_search.vue
'
;
import
issueBoardFilters
from
'
~/boards/issue_board_filters
'
;
import
{
__
}
from
'
~/locale
'
;
import
AuthorToken
from
'
~/vue_shared/components/filtered_search_bar/tokens/author_token.vue
'
;
...
...
ee/spec/frontend/boards/components/issue_board_filtered_search_spec.js
View file @
c875ed90
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
BoardFilteredSearch
from
'
~
/boards/components/board_filtered_search.vue
'
;
import
BoardFilteredSearch
from
'
ee
/boards/components/board_filtered_search.vue
'
;
import
IssueBoardFilteredSpec
from
'
ee/boards/components/issue_board_filtered_search.vue
'
;
import
issueBoardFilters
from
'
~/boards/issue_board_filters
'
;
import
{
mockTokens
}
from
'
../mock_data
'
;
...
...
spec/frontend/boards/components/issue_board_filtered_search_spec.js
View file @
c875ed90
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
BoardFilteredSearch
from
'
~
/boards/components/board_filtered_search.vue
'
;
import
BoardFilteredSearch
from
'
ee_else_ce
/boards/components/board_filtered_search.vue
'
;
import
IssueBoardFilteredSpec
from
'
~/boards/components/issue_board_filtered_search.vue
'
;
import
issueBoardFilters
from
'
~/boards/issue_board_filters
'
;
import
{
mockTokens
}
from
'
../mock_data
'
;
...
...
@@ -9,6 +9,8 @@ jest.mock('~/boards/issue_board_filters');
describe
(
'
IssueBoardFilter
'
,
()
=>
{
let
wrapper
;
const
findBoardsFilteredSearch
=
()
=>
wrapper
.
findComponent
(
BoardFilteredSearch
);
const
createComponent
=
({
epicFeatureAvailable
=
false
}
=
{})
=>
{
wrapper
=
shallowMount
(
IssueBoardFilteredSpec
,
{
propsData
:
{
fullPath
:
'
gitlab-org
'
,
boardType
:
'
group
'
},
...
...
@@ -40,13 +42,13 @@ describe('IssueBoardFilter', () => {
});
it
(
'
finds BoardFilteredSearch
'
,
()
=>
{
expect
(
wrapper
.
find
(
BoardFilteredSearch
).
exists
()).
toBe
(
true
);
expect
(
findBoardsFilteredSearch
(
).
exists
()).
toBe
(
true
);
});
it
(
'
passes the correct tokens to BoardFilteredSearch
'
,
()
=>
{
const
tokens
=
mockTokens
(
fetchLabelsSpy
,
fetchAuthorsSpy
,
wrapper
.
vm
.
fetchMilestones
);
expect
(
wrapper
.
find
(
BoardFilteredSearch
).
props
(
'
tokens
'
)).
toEqual
(
tokens
);
expect
(
findBoardsFilteredSearch
(
).
props
(
'
tokens
'
)).
toEqual
(
tokens
);
});
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment