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
577f0e70
Commit
577f0e70
authored
Mar 16, 2022
by
minahilnichols
Committed by
Ezekiel Kigbo
Mar 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup variable names on spec
parent
a922223e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
17 deletions
+23
-17
ee/spec/features/groups/iterations/user_edits_iteration_spec.rb
...c/features/groups/iterations/user_edits_iteration_spec.rb
+23
-17
No files found.
ee/spec/features/groups/iterations/user_edits_iteration_spec.rb
View file @
577f0e70
...
...
@@ -26,56 +26,62 @@ RSpec.describe 'User edits iteration' do
sign_in
(
user
)
end
let
(
:start_date_with_cadences
)
do
let
(
:start_date_with_cadences
_input
)
do
page
.
find
(
'#iteration-start-date'
)
end
let
(
:due_date_with_cadences
)
do
let
(
:due_date_with_cadences
_input
)
do
page
.
find
(
'#iteration-due-date'
)
end
let
(
:start_date_without_cadences
)
do
let
(
:start_date_without_cadences
_input
)
do
input
=
page
.
first
(
'[data-testid="gl-datepicker-input"]'
)
input
.
set
(
now
-
1
.
day
)
input
end
let
(
:due_date_without_cadences
)
do
let
(
:due_date_without_cadences
_input
)
do
input
=
all
(
'[data-testid="gl-datepicker-input"]'
).
last
input
.
set
(
now
)
input
end
let
(
:updated_start_date_with_cadences
)
do
let
(
:updated_start_date_with_cadences
_input
)
do
fill_in
(
'Start date'
,
with:
new_start_date
.
strftime
(
'%Y-%m-%d'
))
new_start_date
.
strftime
(
'%b %-d, %Y'
)
end
let
(
:updated_due_date_with_cadences
)
do
let
(
:updated_due_date_with_cadences
_input
)
do
fill_in
(
'Due date'
,
with:
new_due_date
.
strftime
(
'%Y-%m-%d'
))
new_due_date
.
strftime
(
'%b %-d, %Y'
)
end
let
(
:updated_start_date_without_cadences
)
do
start_date_without_cadences
.
set
(
new_start_date
)
let
(
:updated_start_date_without_cadences
_input
)
do
start_date_without_cadences
_input
.
set
(
new_start_date
)
new_start_date
.
strftime
(
'%b %-d, %Y'
)
end
let
(
:updated_due_date_without_cadences
)
do
due_date_without_cadences
.
set
(
new_due_date
)
due_date_without_cadences
.
set
(
new_due_date
)
let
(
:updated_due_date_without_cadences_input
)
do
# TODO: Reported issue with Capybara
# Use fill_in instead, update datepicker to have labels
due_date_without_cadences_input
.
set
(
''
)
due_date_without_cadences_input
.
set
(
new_due_date
)
new_due_date
.
strftime
(
'%b %-d, %Y'
)
end
where
(
:using_cadences
,
:start_date_input
,
:due_date_input
,
:updated_start_date
,
:updated_due_date
)
do
true
|
ref
(
:start_date_with_cadences
)
|
ref
(
:due_date_with_cadences
)
|
ref
(
:updated_start_date_with_cadences
)
|
ref
(
:updated_due_date_with_cadences
)
false
|
ref
(
:start_date_without_cadences
)
|
ref
(
:due_date_without_cadences
)
|
ref
(
:updated_start_date_without_cadences
)
|
ref
(
:updated_due_date_without_cadences
)
let
(
:iteration_with_cadences_page
)
{
group_iteration_cadence_iteration_path
(
group
,
iteration_cadence_id:
cadence
.
id
,
id:
iteration
.
id
)
}
let
(
:iteration_without_cadences_page
)
{
group_iteration_path
(
iteration
.
group
,
iteration
.
id
)
}
let
(
:edit_iteration_with_cadences_page
)
{
edit_group_iteration_cadence_iteration_path
(
group
,
iteration_cadence_id:
cadence
.
id
,
id:
iteration
.
id
)
}
let
(
:edit_iteration_without_cadences_page
)
{
edit_group_iteration_path
(
iteration
.
group
,
iteration
.
id
)
}
where
(
:using_cadences
,
:start_date_input
,
:due_date_input
,
:updated_start_date
,
:updated_due_date
,
:iteration_page
,
:edit_iteration_page
)
do
true
|
ref
(
:start_date_with_cadences_input
)
|
ref
(
:due_date_with_cadences_input
)
|
ref
(
:updated_start_date_with_cadences_input
)
|
ref
(
:updated_due_date_with_cadences_input
)
|
ref
(
:iteration_with_cadences_page
)
|
ref
(
:edit_iteration_with_cadences_page
)
false
|
ref
(
:start_date_without_cadences_input
)
|
ref
(
:due_date_without_cadences_input
)
|
ref
(
:updated_start_date_without_cadences_input
)
|
ref
(
:updated_due_date_without_cadences_input
)
|
ref
(
:iteration_without_cadences_page
)
|
ref
(
:edit_iteration_without_cadences_page
)
end
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
)
}
context
'load edit page directly'
,
:js
do
before
do
visit
edit_iteration_page
...
...
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