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
8e5ab875
Commit
8e5ab875
authored
Jul 13, 2021
by
sstern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix epic list rendering when user is logged out
parent
18a218b4
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
56 additions
and
27 deletions
+56
-27
ee/app/assets/javascripts/epics_list/components/epics_list_root.vue
...ets/javascripts/epics_list/components/epics_list_root.vue
+2
-0
ee/app/assets/javascripts/epics_list/epics_list_bundle.js
ee/app/assets/javascripts/epics_list/epics_list_bundle.js
+2
-0
ee/app/assets/javascripts/epics_list/queries/group_epics.query.graphql
.../javascripts/epics_list/queries/group_epics.query.graphql
+2
-1
ee/app/views/groups/epics/index.html.haml
ee/app/views/groups/epics/index.html.haml
+3
-1
ee/spec/features/epics/epics_list_spec.rb
ee/spec/features/epics/epics_list_spec.rb
+46
-25
ee/spec/frontend/epics_list/components/epics_list_root_spec.js
...ec/frontend/epics_list/components/epics_list_root_spec.js
+1
-0
No files found.
ee/app/assets/javascripts/epics_list/components/epics_list_root.vue
View file @
8e5ab875
...
...
@@ -42,6 +42,7 @@ export default {
'
groupLabelsPath
'
,
'
groupMilestonesPath
'
,
'
emptyStatePath
'
,
'
isSignedIn
'
,
],
apollo
:
{
epics
:
{
...
...
@@ -50,6 +51,7 @@ export default {
const
queryVariables
=
{
groupPath
:
this
.
groupFullPath
,
state
:
this
.
currentState
,
isSignedIn
:
this
.
isSignedIn
,
};
if
(
this
.
prevPageCursor
)
{
...
...
ee/app/assets/javascripts/epics_list/epics_list_bundle.js
View file @
8e5ab875
...
...
@@ -39,6 +39,7 @@ export default function initEpicsList({ mountPointSelector }) {
groupLabelsPath
,
groupMilestonesPath
,
emptyStatePath
,
isSignedIn
,
}
=
mountPointEl
.
dataset
;
// eslint-disable-next-line import/no-deprecated
...
...
@@ -76,6 +77,7 @@ export default function initEpicsList({ mountPointSelector }) {
groupLabelsPath
,
groupMilestonesPath
,
emptyStatePath
,
isSignedIn
:
parseBoolean
(
isSignedIn
),
},
render
:
(
createElement
)
=>
createElement
(
EpicsListApp
,
{
...
...
ee/app/assets/javascripts/epics_list/queries/group_epics.query.graphql
View file @
8e5ab875
...
...
@@ -16,6 +16,7 @@ query groupEpics(
$lastPageSize
:
Int
$prevPageCursor
:
String
=
""
$nextPageCursor
:
String
=
""
$isSignedIn
:
Boolean
=
false
)
{
group
(
fullPath
:
$groupPath
)
{
epics
(
...
...
@@ -41,7 +42,7 @@ query groupEpics(
startDate
dueDate
webUrl
userDiscussionsCount
userDiscussionsCount
@include
(
if
:
$isSignedIn
)
confidential
group
{
fullPath
...
...
ee/app/views/groups/epics/index.html.haml
View file @
8e5ab875
-
@can_bulk_update
=
can?
(
current_user
,
:admin_epic
,
@group
)
&&
@group
.
licensed_feature_available?
(
:group_bulk_edit
)
-
page_title
_
(
"Epics"
)
-
is_signed_in
=
current_user
.
present?
.
to_s
-
if
Feature
.
enabled?
(
:vue_epics_list
,
@group
)
#js-epics-list
{
data:
{
can_create_epic:
can?
(
current_user
,
:create_epic
,
@group
).
to_s
,
...
...
@@ -18,7 +19,8 @@
group_full_path:
@group
.
full_path
,
group_labels_path:
group_labels_path
(
@group
,
format: :json
),
group_milestones_path:
group_milestones_path
(
@group
,
format: :json
),
empty_state_path:
image_path
(
'illustrations/epics/list.svg'
)
}
}
empty_state_path:
image_path
(
'illustrations/epics/list.svg'
),
is_signed_in:
is_signed_in
}
}
-
else
.top-area
=
render
'shared/issuable/epic_nav'
,
type: :epics
...
...
ee/spec/features/epics/epics_list_spec.rb
View file @
8e5ab875
...
...
@@ -230,17 +230,10 @@ RSpec.describe 'epics list', :js do
let!
(
:epic3
)
{
create
(
:epic
,
group:
group
,
end_date:
'2021-1-15'
)
}
let!
(
:award_emoji_star
)
{
create
(
:award_emoji
,
name:
'star'
,
user:
user
,
awardable:
epic1
)
}
before
do
group
.
add_developer
(
user
)
group
.
add_developer
(
user_dev
)
visit
group_epics_path
(
group
)
wait_for_requests
end
shared_examples
'epic list'
do
it
'renders epics list'
,
:aggregate_failures
do
page
.
within
(
'.issuable-list-container'
)
do
expect
(
page
).
to
have_selector
(
'.gl-tabs'
)
expect
(
page
).
to
have_link
(
'New epic'
)
expect
(
page
).
to
have_selector
(
'.vue-filtered-search-bar-container'
)
expect
(
page
.
find
(
'.issuable-list'
)).
to
have_selector
(
'li.issue'
,
count:
3
)
end
...
...
@@ -262,10 +255,38 @@ RSpec.describe 'epics list', :js do
expect
(
page
.
all
(
'.issuable-info-container'
)[
2
].
find
(
'.issuable-info'
)).
to
have_content
(
'No start date – Jan 15, 2021'
)
end
end
end
context
'when signed in'
do
before
do
group
.
add_developer
(
user
)
group
.
add_developer
(
user_dev
)
visit
group_epics_path
(
group
)
wait_for_requests
end
it
'renders New Epic Link'
do
page
.
within
(
'.issuable-list-container'
)
do
expect
(
page
).
to
have_link
(
'New epic'
)
end
end
it_behaves_like
'epic list'
it_behaves_like
'filtered search bar'
,
available_tokens
end
context
'when signed out'
do
before
do
sign_out
user
visit
group_epics_path
(
group
)
wait_for_requests
end
it_behaves_like
'epic list'
end
end
describe
'within a sub-group group'
do
let!
(
:subgroup
)
{
create
(
:group
,
parent:
group
,
name:
'subgroup'
)
}
let!
(
:sub_epic1
)
{
create
(
:epic
,
group:
subgroup
,
start_date:
'2020-12-15'
,
end_date:
'2021-1-15'
)
}
...
...
ee/spec/frontend/epics_list/components/epics_list_root_spec.js
View file @
8e5ab875
...
...
@@ -56,6 +56,7 @@ const mockProvide = {
groupMilestonesPath
:
'
/gitlab-org/-/milestone.json
'
,
listEpicsPath
:
'
/gitlab-org/-/epics
'
,
emptyStatePath
:
'
/assets/illustrations/empty-state/epics.svg
'
,
isSignedIn
:
false
,
};
const
mockPageInfo
=
{
...
...
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