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
646e50c4
Commit
646e50c4
authored
Aug 18, 2021
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate epic sidebar todo button to widget
Review feedback
parent
455b0ca1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
11 deletions
+20
-11
ee/app/assets/javascripts/epic/components/epic_sidebar.vue
ee/app/assets/javascripts/epic/components/epic_sidebar.vue
+1
-1
ee/spec/frontend/epic/components/epic_sidebar_spec.js
ee/spec/frontend/epic/components/epic_sidebar_spec.js
+19
-10
No files found.
ee/app/assets/javascripts/epic/components/epic_sidebar.vue
View file @
646e50c4
...
...
@@ -174,7 +174,7 @@ export default {
<div
class=
"issuable-sidebar js-issuable-update"
>
<sidebar-header
:sidebar-collapsed=
"sidebarCollapsed"
>
<sidebar-todo-widget
v-
show
=
"isUserSignedIn"
v-
if
=
"isUserSignedIn"
:issuable-id=
"fullEpicId"
:issuable-iid=
"String(iid)"
:full-path=
"fullPath"
...
...
ee/spec/frontend/epic/components/epic_sidebar_spec.js
View file @
646e50c4
...
...
@@ -178,14 +178,6 @@ describe('EpicSidebarComponent', () => {
expect
(
wrapper
.
find
(
'
.issuable-sidebar.js-issuable-update
'
).
exists
()).
toBe
(
true
);
});
it
(
'
renders Todo toggle button element when sidebar is collapsed and user is signed in
'
,
async
()
=>
{
store
.
dispatch
(
'
toggleSidebarFlag
'
,
true
);
await
nextTick
();
expect
(
wrapper
.
find
(
'
[data-testid="todo"]
'
).
exists
()).
toBe
(
true
);
});
it
(
'
renders Start date & Due date elements when sidebar is expanded
'
,
async
()
=>
{
wrapper
.
vm
.
$store
.
dispatch
(
'
toggleSidebarFlag
'
,
false
);
...
...
@@ -215,8 +207,15 @@ describe('EpicSidebarComponent', () => {
expect
(
wrapper
.
find
(
SidebarSubscriptionsWidget
).
exists
()).
toBe
(
true
);
});
it
(
'
renders SidebarTodoWidget
'
,
()
=>
{
expect
(
wrapper
.
find
(
SidebarTodoWidget
).
exists
()).
toBe
(
true
);
it
(
'
renders SidebarTodoWidget when user is signed in
'
,
()
=>
{
const
todoWidget
=
wrapper
.
find
(
SidebarTodoWidget
);
expect
(
todoWidget
.
exists
()).
toBe
(
true
);
expect
(
todoWidget
.
props
()).
toMatchObject
({
issuableId
:
'
gid://gitlab/Epic/1
'
,
issuableIid
:
'
1
'
,
fullPath
:
'
frontend-fixtures-group
'
,
issuableType
:
'
epic
'
,
});
});
it
(
'
renders SidebarReferenceWidget
'
,
()
=>
{
...
...
@@ -259,6 +258,16 @@ describe('EpicSidebarComponent', () => {
});
});
describe
(
'
when user is not signed in
'
,
()
=>
{
beforeEach
(()
=>
{
gon
.
current_user_id
=
null
;
});
it
(
'
does not render SidebarTodoWidget
'
,
()
=>
{
expect
(
wrapper
.
find
(
SidebarTodoWidget
).
exists
()).
toBe
(
false
);
});
});
describe
(
'
mounted
'
,
()
=>
{
it
(
'
makes request to get epic details
'
,
()
=>
{
const
actionSpies
=
{
...
...
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