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
25e066d8
Commit
25e066d8
authored
Sep 29, 2021
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tabs switching between tree and roadmap
Changelog: fixed EE: true
parent
619f2044
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
3 deletions
+25
-3
ee/app/assets/javascripts/epic/epic_tabs.js
ee/app/assets/javascripts/epic/epic_tabs.js
+6
-1
ee/app/views/groups/epics/show.html.haml
ee/app/views/groups/epics/show.html.haml
+1
-1
ee/spec/features/epics/epic_show_spec.rb
ee/spec/features/epics/epic_show_spec.rb
+18
-1
No files found.
ee/app/assets/javascripts/epic/epic_tabs.js
View file @
25e066d8
...
...
@@ -4,9 +4,10 @@ import { parseBoolean } from '~/lib/utils/common_utils';
export
default
class
EpicTabs
{
constructor
()
{
this
.
epicTreesEnabled
=
gon
.
features
&&
gon
.
features
.
epicTrees
;
this
.
wrapper
=
document
.
querySelector
(
'
.js-epic-container
'
);
this
.
epicTabs
=
this
.
wrapper
.
querySelector
(
'
.js-epic-tabs-container
'
);
this
.
treeTabPane
=
document
.
querySelector
(
'
#tree.tab-pane
'
);
this
.
roadmapTabPane
=
document
.
querySelector
(
'
#roadmap.tab-pane
'
);
this
.
discussionFilterContainer
=
this
.
epicTabs
.
querySelector
(
'
.js-discussion-filter-container
'
);
const
allowSubEpics
=
parseBoolean
(
this
.
epicTabs
.
dataset
.
allowSubEpics
);
...
...
@@ -48,9 +49,13 @@ export default class EpicTabs {
this
.
initRoadmap
();
this
.
roadmapTabLoaded
=
true
;
}
this
.
roadmapTabPane
.
classList
.
remove
(
'
gl-display-none
'
,
'
show
'
);
this
.
treeTabPane
.
classList
.
add
(
'
gl-display-none
'
,
'
show
'
);
}
onRoadmapHide
()
{
this
.
wrapper
.
classList
.
add
(
'
container-limited
'
);
this
.
roadmapTabPane
.
classList
.
add
(
'
gl-display-none
'
,
'
show
'
);
this
.
treeTabPane
.
classList
.
remove
(
'
gl-display-none
'
,
'
show
'
);
}
}
ee/app/views/groups/epics/show.html.haml
View file @
25e066d8
...
...
@@ -58,7 +58,7 @@
allow_issuable_health_status:
allow_issuable_health_status
,
initial:
issuable_initial_data
(
@epic
).
to_json
}
}
-
if
sub_epics_feature_available
#roadmap
.tab-pane
#roadmap
.tab-pane
.gl-display-none
.row
%section
.col-md-12
#js-roadmap
{
data:
{
epics_path:
group_epics_path
(
@group
,
parent_id:
@epic
.
id
,
format: :json
),
...
...
ee/spec/features/epics/epic_show_spec.rb
View file @
25e066d8
...
...
@@ -117,9 +117,26 @@ RSpec.describe 'Epic show', :js do
expect
(
find
(
'.content-wrapper .container-fluid:not(.breadcrumbs)'
)[
:class
]).
not_to
include
(
'container-limited'
)
end
end
it
'switches between Epics and Issues tab and Roadmap tab when clicking on tab links'
,
:aggregate_failures
do
find
(
'.js-epic-tabs-container #roadmap-tab'
).
click
wait_for_all_requests
# Wait for Roadmap bundle load and then Epics fetch load
page
.
within
(
'.js-epic-tabs-content'
)
do
expect
(
page
).
to
have_selector
(
'#roadmap.tab-pane'
,
visible:
true
)
expect
(
page
).
to
have_selector
(
'#tree.tab-pane'
,
visible:
false
)
end
find
(
'.js-epic-tabs-container #tree-tab'
).
click
page
.
within
(
'.js-epic-tabs-content'
)
do
expect
(
page
).
to
have_selector
(
'#tree.tab-pane'
,
visible:
true
)
expect
(
page
).
to
have_selector
(
'#roadmap.tab-pane'
,
visible:
false
)
end
end
end
describe
'when
sub-epics feature not is
available'
do
describe
'when
the sub-epics feature is not
available'
do
before
do
visit
group_epic_path
(
group
,
epic
)
end
...
...
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