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
0
Merge Requests
0
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
Kazuhiko Shiozaki
gitlab-ce
Commits
35aca2d5
Commit
35aca2d5
authored
Mar 14, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed tests for MR & issue filters
parent
37ba5a12
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
20 deletions
+14
-20
app/assets/javascripts/gl_dropdown.js.coffee
app/assets/javascripts/gl_dropdown.js.coffee
+3
-1
app/views/shared/issuable/_filter.html.haml
app/views/shared/issuable/_filter.html.haml
+1
-1
features/steps/dashboard/issues.rb
features/steps/dashboard/issues.rb
+3
-5
features/steps/dashboard/merge_requests.rb
features/steps/dashboard/merge_requests.rb
+7
-13
No files found.
app/assets/javascripts/gl_dropdown.js.coffee
View file @
35aca2d5
...
@@ -238,13 +238,15 @@ class GitLabDropdown
...
@@ -238,13 +238,15 @@ class GitLabDropdown
selectedObject
=
@
renderedData
[
selectedIndex
]
selectedObject
=
@
renderedData
[
selectedIndex
]
value
=
if
@
options
.
id
then
@
options
.
id
(
selectedObject
,
el
)
else
selectedObject
.
id
value
=
if
@
options
.
id
then
@
options
.
id
(
selectedObject
,
el
)
else
selectedObject
.
id
if
!
value
?
field
.
remove
()
if
@
options
.
multiSelect
if
@
options
.
multiSelect
oldValue
=
field
.
val
()
oldValue
=
field
.
val
()
if
oldValue
if
oldValue
value
=
"
#{
oldValue
}
,
#{
value
}
"
value
=
"
#{
oldValue
}
,
#{
value
}
"
else
else
@
dropdown
.
find
(
ACTIVE_CLASS
).
removeClass
ACTIVE_CLASS
@
dropdown
.
find
(
ACTIVE_CLASS
).
removeClass
ACTIVE_CLASS
field
.
remove
()
# Toggle active class for the tick mark
# Toggle active class for the tick mark
el
.
toggleClass
"is-active"
el
.
toggleClass
"is-active"
...
...
app/views/shared/issuable/_filter.html.haml
View file @
35aca2d5
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
.filter-item.inline
.filter-item.inline
-
if
params
[
:assignee_id
]
-
if
params
[
:assignee_id
]
=
hidden_field_tag
(
:assignee_id
,
params
[
:assignee_id
])
=
hidden_field_tag
(
:assignee_id
,
params
[
:assignee_id
])
=
dropdown_tag
(
"Assignee"
,
options:
{
toggle_class:
"js-user-search js-filter-submit js-assignee-search"
,
title:
"Filter by assignee"
,
filter:
true
,
dropdown_class:
"dropdown-menu-user dropdown-menu-selectable"
,
=
dropdown_tag
(
"Assignee"
,
options:
{
toggle_class:
"js-user-search js-filter-submit js-assignee-search"
,
title:
"Filter by assignee"
,
filter:
true
,
dropdown_class:
"dropdown-menu-user dropdown-menu-selectable
dropdown-menu-assignee
"
,
placeholder:
"Search assignee"
,
data:
{
any_user:
"Any Author"
,
first_user:
(
current_user
.
username
if
current_user
),
null_user:
true
,
current_user:
true
,
project_id:
(
@project
.
id
if
@project
),
selected:
params
[
:assignee_id
],
field_name:
"assignee_id"
}
})
placeholder:
"Search assignee"
,
data:
{
any_user:
"Any Author"
,
first_user:
(
current_user
.
username
if
current_user
),
null_user:
true
,
current_user:
true
,
project_id:
(
@project
.
id
if
@project
),
selected:
params
[
:assignee_id
],
field_name:
"assignee_id"
}
})
.filter-item.inline.milestone-filter
.filter-item.inline.milestone-filter
...
...
features/steps/dashboard/issues.rb
View file @
35aca2d5
...
@@ -36,11 +36,9 @@ class Spinach::Features::DashboardIssues < Spinach::FeatureSteps
...
@@ -36,11 +36,9 @@ class Spinach::Features::DashboardIssues < Spinach::FeatureSteps
end
end
step
'I click "Authored by me" link'
do
step
'I click "Authored by me" link'
do
execute_script
(
'$("#assignee_id").val("")'
)
find
(
"#assignee_id"
).
set
(
""
)
execute_script
(
'$(".js-user-search").first().click()'
)
find
(
".js-author-search"
,
match: :first
).
click
sleep
1
find
(
".dropdown-menu-author li a"
,
match: :first
,
text:
current_user
.
to_reference
).
click
execute_script
(
"$('.dropdown-content li:contains(
\"
#{
current_user
.
to_reference
}
\"
) a').click()"
)
sleep
1
end
end
step
'I click "All" link'
do
step
'I click "All" link'
do
...
...
features/steps/dashboard/merge_requests.rb
View file @
35aca2d5
...
@@ -40,22 +40,16 @@ class Spinach::Features::DashboardMergeRequests < Spinach::FeatureSteps
...
@@ -40,22 +40,16 @@ class Spinach::Features::DashboardMergeRequests < Spinach::FeatureSteps
end
end
step
'I click "Authored by me" link'
do
step
'I click "Authored by me" link'
do
execute_script
(
'$("#assignee_id").val("")'
)
find
(
"#assignee_id"
).
set
(
""
)
execute_script
(
'$(".js-user-search").first().click()'
)
find
(
".js-author-search"
,
match: :first
).
click
sleep
0.5
find
(
".dropdown-menu-author li a"
,
match: :first
,
text:
current_user
.
to_reference
).
click
execute_script
(
"$('.dropdown-content li:contains(
\"
#{
current_user
.
to_reference
}
\"
) a').click()"
)
sleep
2
end
end
step
'I click "All" link'
do
step
'I click "All" link'
do
execute_script
(
'$(".js-user-search").first().click()'
)
find
(
".js-author-search"
).
click
sleep
0.5
find
(
".dropdown-menu-author li a"
,
match: :first
).
click
execute_script
(
'$(".js-user-search").first().parent().find("li a").first().click()'
)
find
(
".js-assignee-search"
).
click
sleep
2
find
(
".dropdown-menu-assignee li a"
,
match: :first
).
click
execute_script
(
'$(".js-user-search").eq(1).click()'
)
sleep
0.5
execute_script
(
'$(".js-user-search").eq(1).parent().find("li a").first().click()'
)
sleep
2
end
end
def
should_see
(
merge_request
)
def
should_see
(
merge_request
)
...
...
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