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
c753c7d9
Commit
c753c7d9
authored
May 04, 2021
by
Eulyeon Ko
Committed by
Natalia Tepluhina
May 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Issue due date changes without user input"
parent
7ab25364
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
app/assets/javascripts/sidebar/components/date/sidebar_date_widget.vue
...vascripts/sidebar/components/date/sidebar_date_widget.vue
+1
-1
changelogs/unreleased/329614-issue-due-date-changes-without-user-input.yml
...ased/329614-issue-due-date-changes-without-user-input.yml
+5
-0
spec/frontend/sidebar/components/date/sidebar_date_widget_spec.js
...ntend/sidebar/components/date/sidebar_date_widget_spec.js
+8
-0
No files found.
app/assets/javascripts/sidebar/components/date/sidebar_date_widget.vue
View file @
c753c7d9
...
...
@@ -284,7 +284,7 @@ export default {
<gl-datepicker
ref=
"datePicker"
class=
"gl-relative"
:
valu
e=
"parsedDate"
:
default-dat
e=
"parsedDate"
show-clear-button
@
input=
"setDate"
@
clear=
"setDate(null)"
...
...
changelogs/unreleased/329614-issue-due-date-changes-without-user-input.yml
0 → 100644
View file @
c753c7d9
---
title
:
Fix due date being randomly set in issue page
merge_request
:
60917
author
:
type
:
fixed
spec/frontend/sidebar/components/date/sidebar_date_widget_spec.js
View file @
c753c7d9
import
{
GlDatepicker
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
VueApollo
from
'
vue-apollo
'
;
...
...
@@ -23,6 +24,7 @@ describe('Sidebar date Widget', () => {
const
findEditableItem
=
()
=>
wrapper
.
findComponent
(
SidebarEditableItem
);
const
findPopoverIcon
=
()
=>
wrapper
.
find
(
'
[data-testid="inherit-date-popover"]
'
);
const
findDatePicker
=
()
=>
wrapper
.
find
(
GlDatepicker
);
const
createComponent
=
({
dueDateQueryHandler
=
jest
.
fn
().
mockResolvedValue
(
issuableDueDateResponse
()),
...
...
@@ -50,6 +52,7 @@ describe('Sidebar date Widget', () => {
},
stubs
:
{
SidebarEditableItem
,
GlDatepicker
,
},
});
};
...
...
@@ -109,6 +112,11 @@ describe('Sidebar date Widget', () => {
it
(
'
emits `dueDateUpdated` event with the date payload
'
,
()
=>
{
expect
(
wrapper
.
emitted
(
'
dueDateUpdated
'
)).
toEqual
([[
date
]]);
});
it
(
'
uses a correct prop to set the initial date for GlDatePicker
'
,
()
=>
{
expect
(
findDatePicker
().
props
(
'
value
'
)).
toBe
(
null
);
expect
(
findDatePicker
().
props
(
'
defaultDate
'
)).
toEqual
(
wrapper
.
vm
.
parsedDate
);
});
});
it
.
each
`
...
...
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