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
e37cb267
Commit
e37cb267
authored
Oct 09, 2019
by
Nick Kipling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added test cases and sort_param default
parent
13d3e75a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
ee/app/helpers/ee/sorting_helper.rb
ee/app/helpers/ee/sorting_helper.rb
+1
-1
ee/spec/features/groups/packages_spec.rb
ee/spec/features/groups/packages_spec.rb
+14
-0
No files found.
ee/app/helpers/ee/sorting_helper.rb
View file @
e37cb267
...
...
@@ -95,7 +95,7 @@ module EE
end
def
packages_sort_option_title
(
sort_value
)
packages_sort_options_hash
[
sort_value
]
packages_sort_options_hash
[
sort_value
]
||
sort_title_created_date
end
def
packages_sort_direction_button
(
sort_value
)
...
...
ee/spec/features/groups/packages_spec.rb
View file @
e37cb267
...
...
@@ -77,6 +77,20 @@ describe 'Group Packages' do
project:
second_project
)
end
it
'sorts by created date descending by default'
do
visit
group_packages_path
(
group
)
expect
(
sort_dropdown_button_text
).
to
eq
(
sort_title_created_date
)
expect
(
first_package
).
to
include
(
bbb_package
.
name
)
expect
(
last_package
).
to
include
(
aaa_package
.
name
)
end
it
'handles an invalid param'
do
visit
group_packages_path
(
group
,
sort:
'garbage'
)
# bad sort param
expect
(
sort_dropdown_button_text
).
to
eq
(
sort_title_created_date
)
expect
(
first_package
).
to
include
(
bbb_package
.
name
)
expect
(
last_package
).
to
include
(
aaa_package
.
name
)
end
it
'sorts by created date descending'
do
visit
group_packages_path
(
group
,
sort:
sort_value_recently_created
)
expect
(
sort_dropdown_button_text
).
to
eq
(
sort_title_created_date
)
...
...
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