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
6df5fb10
Commit
6df5fb10
authored
Aug 06, 2021
by
Jose Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix group runner sort dropdown
Changelog: fixed
parent
585db4b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
1 deletion
+32
-1
app/views/groups/runners/_sort_dropdown.html.haml
app/views/groups/runners/_sort_dropdown.html.haml
+1
-1
spec/views/groups/runners/_sort_dropdown.html.haml_spec.rb
spec/views/groups/runners/_sort_dropdown.html.haml_spec.rb
+31
-0
No files found.
app/views/groups/runners/_sort_dropdown.html.haml
View file @
6df5fb10
-
sorted_by
=
sort_options_hash
[
@sort
]
-
sorted_by
=
sort_options_hash
[
@sort
]
||
sort_title_created_date
.dropdown.inline.gl-ml-3
%button
.dropdown-menu-toggle
{
type:
'button'
,
data:
{
toggle:
'dropdown'
,
display:
'static'
}
}
...
...
spec/views/groups/runners/_sort_dropdown.html.haml_spec.rb
0 → 100644
View file @
6df5fb10
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
'groups/runners/sort_dropdown.html.haml'
do
describe
'render'
do
let_it_be
(
:sort_options_hash
)
{
{
by_title:
'Title'
}
}
let_it_be
(
:sort_title_created_date
)
{
'Created date'
}
before
do
allow
(
view
).
to
receive
(
:sort
).
and_return
(
'by_title'
)
end
describe
'when a sort option is not selected'
do
it
'renders a default sort option'
do
render
'groups/runners/sort_dropdown'
,
sort_options_hash:
sort_options_hash
,
sort_title_created_date:
sort_title_created_date
expect
(
rendered
).
to
have_content
'Created date'
end
end
describe
'when a sort option is selected'
do
it
'renders the selected sort option'
do
@sort
=
:by_title
render
'groups/runners/sort_dropdown'
,
sort_options_hash:
sort_options_hash
,
sort_title_created_date:
sort_title_created_date
expect
(
rendered
).
to
have_content
'Title'
end
end
end
end
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