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
8189d0be
Commit
8189d0be
authored
May 05, 2021
by
Eulyeon Ko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply maintainer suggestions
Use toMatchObject for succinct testing Simply pass down autocomplete="off"
parent
3746c284
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
app/assets/javascripts/sidebar/components/date/sidebar_date_widget.vue
...vascripts/sidebar/components/date/sidebar_date_widget.vue
+1
-1
spec/frontend/sidebar/components/date/sidebar_date_widget_spec.js
...ntend/sidebar/components/date/sidebar_date_widget_spec.js
+5
-3
No files found.
app/assets/javascripts/sidebar/components/date/sidebar_date_widget.vue
View file @
8189d0be
...
@@ -287,7 +287,7 @@ export default {
...
@@ -287,7 +287,7 @@ export default {
class=
"gl-relative"
class=
"gl-relative"
:default-date=
"parsedDate"
:default-date=
"parsedDate"
show-clear-button
show-clear-button
:autocomplete=
"'off'
"
autocomplete=
"off
"
@
input=
"setDate"
@
input=
"setDate"
@
clear=
"setDate(null)"
@
clear=
"setDate(null)"
/>
/>
...
...
spec/frontend/sidebar/components/date/sidebar_date_widget_spec.js
View file @
8189d0be
...
@@ -120,9 +120,11 @@ describe('Sidebar date Widget', () => {
...
@@ -120,9 +120,11 @@ describe('Sidebar date Widget', () => {
});
});
it
(
'
uses a correct prop to set the initial date for GlDatePicker
'
,
()
=>
{
it
(
'
uses a correct prop to set the initial date for GlDatePicker
'
,
()
=>
{
expect
(
findDatePicker
().
props
(
'
value
'
)).
toBe
(
null
);
expect
(
findDatePicker
().
props
()).
toMatchObject
({
expect
(
findDatePicker
().
props
(
'
defaultDate
'
)).
toEqual
(
wrapper
.
vm
.
parsedDate
);
value
:
null
,
expect
(
findDatePicker
().
props
(
'
autocomplete
'
)).
toEqual
(
'
off
'
);
autocomplete
:
'
off
'
,
defaultDate
:
expect
.
any
(
Object
),
});
});
});
it
(
'
renders GlDatePicker
'
,
async
()
=>
{
it
(
'
renders GlDatePicker
'
,
async
()
=>
{
...
...
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