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
61e1cf69
Commit
61e1cf69
authored
Mar 07, 2022
by
minahilnichols
Committed by
Ezekiel Kigbo
Mar 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs and cleanup edit flow
parent
3761c2dd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
7 deletions
+29
-7
ee/app/assets/javascripts/iterations/components/iteration_form_without_vue_router.vue
...erations/components/iteration_form_without_vue_router.vue
+2
-2
ee/spec/features/groups/iterations/user_edits_iteration_spec.rb
...c/features/groups/iterations/user_edits_iteration_spec.rb
+26
-4
ee/spec/frontend/iterations/components/iteration_form_without_vue_router_spec.js
...ions/components/iteration_form_without_vue_router_spec.js
+1
-1
No files found.
ee/app/assets/javascripts/iterations/components/iteration_form_without_vue_router.vue
View file @
61e1cf69
...
...
@@ -49,8 +49,8 @@ export default {
loading
:
false
,
title
:
this
.
iteration
.
title
,
description
:
this
.
iteration
.
description
??
''
,
startDate
:
this
.
iteration
.
startDate
,
dueDate
:
this
.
iteration
.
dueDate
,
startDate
:
this
.
iteration
.
startDate
?
new
Date
(
this
.
iteration
.
startDate
)
:
null
,
dueDate
:
this
.
iteration
.
dueDate
?
new
Date
(
this
.
iteration
.
dueDate
)
:
null
,
showValidation
:
false
,
};
},
...
...
ee/spec/features/groups/iterations/user_edits_iteration_spec.rb
View file @
61e1cf69
...
...
@@ -29,6 +29,8 @@ RSpec.describe 'User edits iteration' do
with_them
do
let
(
:iteration_page
)
{
using_cadences
?
group_iteration_cadence_iteration_path
(
group
,
iteration_cadence_id:
cadence
.
id
,
id:
iteration
.
id
)
:
group_iteration_path
(
iteration
.
group
,
iteration
.
id
)
}
let
(
:edit_iteration_page
)
{
using_cadences
?
edit_group_iteration_cadence_iteration_path
(
group
,
iteration_cadence_id:
cadence
.
id
,
id:
iteration
.
id
)
:
edit_group_iteration_path
(
iteration
.
group
,
iteration
.
id
)
}
let
(
:start_date_input
)
{
using_cadences
?
start_date_with_cadences
:
start_date_without_cadences
}
let
(
:due_date_input
)
{
using_cadences
?
due_date_with_cadences
:
due_date_without_cadences
}
context
'load edit page directly'
,
:js
do
before
do
...
...
@@ -52,8 +54,16 @@ RSpec.describe 'User edits iteration' do
fill_in
(
'Title'
,
with:
updated_title
)
fill_in
(
'Description'
,
with:
updated_desc
)
fill_in
(
'Start date'
,
with:
updated_start_date
.
strftime
(
'%Y-%m-%d'
))
fill_in
(
'Due date'
,
with:
updated_due_date
.
strftime
(
'%Y-%m-%d'
))
if
using_cadences
fill_in
(
'Start date'
,
with:
updated_start_date
.
strftime
(
'%Y-%m-%d'
))
fill_in
(
'Due date'
,
with:
updated_due_date
.
strftime
(
'%Y-%m-%d'
))
else
start_date_input
.
set
(
updated_start_date
)
due_date_input
.
set
(
updated_due_date
)
due_date_input
.
set
(
updated_due_date
)
end
click_button
(
'Update iteration'
)
aggregate_failures
do
...
...
@@ -132,12 +142,24 @@ RSpec.describe 'User edits iteration' do
page
.
find
(
'#iteration-description'
)
end
def
start_date_
input
def
start_date_
with_cadences
page
.
find
(
'#iteration-start-date'
)
end
def
due_date_
input
def
due_date_
with_cadences
page
.
find
(
'#iteration-due-date'
)
end
def
start_date_without_cadences
input
=
page
.
first
(
'[data-testid="gl-datepicker-input"]'
)
input
.
set
(
now
-
1
.
day
)
input
end
def
due_date_without_cadences
input
=
all
(
'[data-testid="gl-datepicker-input"]'
).
last
input
.
set
(
now
)
input
end
end
end
ee/spec/frontend/iterations/components/iteration_form_without_vue_router_spec.js
View file @
61e1cf69
...
...
@@ -237,9 +237,9 @@ describe('Iteration Form', () => {
props
:
propsWithIteration
,
});
// remove input from edit page
findTitle
().
vm
.
$emit
(
'
input
'
,
''
);
findStartDate
().
vm
.
$emit
(
'
input
'
,
null
);
findTitle
().
trigger
(
'
change
'
);
findStartDate
().
trigger
(
'
change
'
);
...
...
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