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
Tatuya Kamada
gitlab-ce
Commits
ecea127c
Commit
ecea127c
authored
Dec 02, 2016
by
Nur Rony
Committed by
Douglas Barbosa Alexandre
Dec 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve test for sort dropdown on members page
parent
eac34fd9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
app/views/shared/members/_sort_dropdown.html.haml
app/views/shared/members/_sort_dropdown.html.haml
+1
-1
spec/features/groups/members/sorting_spec.rb
spec/features/groups/members/sorting_spec.rb
+9
-0
spec/features/projects/members/sorting_spec.rb
spec/features/projects/members/sorting_spec.rb
+9
-0
No files found.
app/views/shared/members/_sort_dropdown.html.haml
View file @
ecea127c
.dropdown.inline
.dropdown.inline
.member-sort-dropdown
=
dropdown_toggle
(
member_sort_options_hash
[
@sort
],
{
toggle:
'dropdown'
})
=
dropdown_toggle
(
member_sort_options_hash
[
@sort
],
{
toggle:
'dropdown'
})
%ul
.dropdown-menu.dropdown-menu-align-right.dropdown-menu-selectable
%ul
.dropdown-menu.dropdown-menu-align-right.dropdown-menu-selectable
%li
.dropdown-header
%li
.dropdown-header
...
...
spec/features/groups/members/sorting_spec.rb
View file @
ecea127c
...
@@ -17,6 +17,7 @@ feature 'Groups > Members > Sorting', feature: true do
...
@@ -17,6 +17,7 @@ feature 'Groups > Members > Sorting', feature: true do
expect
(
first_member
).
to
include
(
owner
.
name
)
expect
(
first_member
).
to
include
(
owner
.
name
)
expect
(
second_member
).
to
include
(
developer
.
name
)
expect
(
second_member
).
to
include
(
developer
.
name
)
expect
(
page
).
to
have_css
(
'.member-sort-dropdown .dropdown-toggle-text'
,
text:
'Name, ascending'
)
end
end
scenario
'sorts by access level ascending'
do
scenario
'sorts by access level ascending'
do
...
@@ -24,6 +25,7 @@ feature 'Groups > Members > Sorting', feature: true do
...
@@ -24,6 +25,7 @@ feature 'Groups > Members > Sorting', feature: true do
expect
(
first_member
).
to
include
(
developer
.
name
)
expect
(
first_member
).
to
include
(
developer
.
name
)
expect
(
second_member
).
to
include
(
owner
.
name
)
expect
(
second_member
).
to
include
(
owner
.
name
)
expect
(
page
).
to
have_css
(
'.member-sort-dropdown .dropdown-toggle-text'
,
text:
'Access level, ascending'
)
end
end
scenario
'sorts by access level descending'
do
scenario
'sorts by access level descending'
do
...
@@ -31,6 +33,7 @@ feature 'Groups > Members > Sorting', feature: true do
...
@@ -31,6 +33,7 @@ feature 'Groups > Members > Sorting', feature: true do
expect
(
first_member
).
to
include
(
owner
.
name
)
expect
(
first_member
).
to
include
(
owner
.
name
)
expect
(
second_member
).
to
include
(
developer
.
name
)
expect
(
second_member
).
to
include
(
developer
.
name
)
expect
(
page
).
to
have_css
(
'.member-sort-dropdown .dropdown-toggle-text'
,
text:
'Access level, descending'
)
end
end
scenario
'sorts by last joined'
do
scenario
'sorts by last joined'
do
...
@@ -38,6 +41,7 @@ feature 'Groups > Members > Sorting', feature: true do
...
@@ -38,6 +41,7 @@ feature 'Groups > Members > Sorting', feature: true do
expect
(
first_member
).
to
include
(
developer
.
name
)
expect
(
first_member
).
to
include
(
developer
.
name
)
expect
(
second_member
).
to
include
(
owner
.
name
)
expect
(
second_member
).
to
include
(
owner
.
name
)
expect
(
page
).
to
have_css
(
'.member-sort-dropdown .dropdown-toggle-text'
,
text:
'Last joined'
)
end
end
scenario
'sorts by oldest joined'
do
scenario
'sorts by oldest joined'
do
...
@@ -45,6 +49,7 @@ feature 'Groups > Members > Sorting', feature: true do
...
@@ -45,6 +49,7 @@ feature 'Groups > Members > Sorting', feature: true do
expect
(
first_member
).
to
include
(
owner
.
name
)
expect
(
first_member
).
to
include
(
owner
.
name
)
expect
(
second_member
).
to
include
(
developer
.
name
)
expect
(
second_member
).
to
include
(
developer
.
name
)
expect
(
page
).
to
have_css
(
'.member-sort-dropdown .dropdown-toggle-text'
,
text:
'Oldest joined'
)
end
end
scenario
'sorts by name ascending'
do
scenario
'sorts by name ascending'
do
...
@@ -52,6 +57,7 @@ feature 'Groups > Members > Sorting', feature: true do
...
@@ -52,6 +57,7 @@ feature 'Groups > Members > Sorting', feature: true do
expect
(
first_member
).
to
include
(
owner
.
name
)
expect
(
first_member
).
to
include
(
owner
.
name
)
expect
(
second_member
).
to
include
(
developer
.
name
)
expect
(
second_member
).
to
include
(
developer
.
name
)
expect
(
page
).
to
have_css
(
'.member-sort-dropdown .dropdown-toggle-text'
,
text:
'Name, ascending'
)
end
end
scenario
'sorts by name descending'
do
scenario
'sorts by name descending'
do
...
@@ -59,6 +65,7 @@ feature 'Groups > Members > Sorting', feature: true do
...
@@ -59,6 +65,7 @@ feature 'Groups > Members > Sorting', feature: true do
expect
(
first_member
).
to
include
(
developer
.
name
)
expect
(
first_member
).
to
include
(
developer
.
name
)
expect
(
second_member
).
to
include
(
owner
.
name
)
expect
(
second_member
).
to
include
(
owner
.
name
)
expect
(
page
).
to
have_css
(
'.member-sort-dropdown .dropdown-toggle-text'
,
text:
'Name, descending'
)
end
end
scenario
'sorts by recent sign in'
do
scenario
'sorts by recent sign in'
do
...
@@ -66,6 +73,7 @@ feature 'Groups > Members > Sorting', feature: true do
...
@@ -66,6 +73,7 @@ feature 'Groups > Members > Sorting', feature: true do
expect
(
first_member
).
to
include
(
owner
.
name
)
expect
(
first_member
).
to
include
(
owner
.
name
)
expect
(
second_member
).
to
include
(
developer
.
name
)
expect
(
second_member
).
to
include
(
developer
.
name
)
expect
(
page
).
to
have_css
(
'.member-sort-dropdown .dropdown-toggle-text'
,
text:
'Recent sign in'
)
end
end
scenario
'sorts by oldest sign in'
do
scenario
'sorts by oldest sign in'
do
...
@@ -73,6 +81,7 @@ feature 'Groups > Members > Sorting', feature: true do
...
@@ -73,6 +81,7 @@ feature 'Groups > Members > Sorting', feature: true do
expect
(
first_member
).
to
include
(
developer
.
name
)
expect
(
first_member
).
to
include
(
developer
.
name
)
expect
(
second_member
).
to
include
(
owner
.
name
)
expect
(
second_member
).
to
include
(
owner
.
name
)
expect
(
page
).
to
have_css
(
'.member-sort-dropdown .dropdown-toggle-text'
,
text:
'Oldest sign in'
)
end
end
def
visit_members_list
(
sort
:)
def
visit_members_list
(
sort
:)
...
...
spec/features/projects/members/sorting_spec.rb
View file @
ecea127c
...
@@ -17,6 +17,7 @@ feature 'Projects > Members > Sorting', feature: true do
...
@@ -17,6 +17,7 @@ feature 'Projects > Members > Sorting', feature: true do
expect
(
first_member
).
to
include
(
master
.
name
)
expect
(
first_member
).
to
include
(
master
.
name
)
expect
(
second_member
).
to
include
(
developer
.
name
)
expect
(
second_member
).
to
include
(
developer
.
name
)
expect
(
page
).
to
have_css
(
'.member-sort-dropdown .dropdown-toggle-text'
,
text:
'Name, ascending'
)
end
end
scenario
'sorts by access level ascending'
do
scenario
'sorts by access level ascending'
do
...
@@ -24,6 +25,7 @@ feature 'Projects > Members > Sorting', feature: true do
...
@@ -24,6 +25,7 @@ feature 'Projects > Members > Sorting', feature: true do
expect
(
first_member
).
to
include
(
developer
.
name
)
expect
(
first_member
).
to
include
(
developer
.
name
)
expect
(
second_member
).
to
include
(
master
.
name
)
expect
(
second_member
).
to
include
(
master
.
name
)
expect
(
page
).
to
have_css
(
'.member-sort-dropdown .dropdown-toggle-text'
,
text:
'Access level, ascending'
)
end
end
scenario
'sorts by access level descending'
do
scenario
'sorts by access level descending'
do
...
@@ -31,6 +33,7 @@ feature 'Projects > Members > Sorting', feature: true do
...
@@ -31,6 +33,7 @@ feature 'Projects > Members > Sorting', feature: true do
expect
(
first_member
).
to
include
(
master
.
name
)
expect
(
first_member
).
to
include
(
master
.
name
)
expect
(
second_member
).
to
include
(
developer
.
name
)
expect
(
second_member
).
to
include
(
developer
.
name
)
expect
(
page
).
to
have_css
(
'.member-sort-dropdown .dropdown-toggle-text'
,
text:
'Access level, descending'
)
end
end
scenario
'sorts by last joined'
do
scenario
'sorts by last joined'
do
...
@@ -38,6 +41,7 @@ feature 'Projects > Members > Sorting', feature: true do
...
@@ -38,6 +41,7 @@ feature 'Projects > Members > Sorting', feature: true do
expect
(
first_member
).
to
include
(
developer
.
name
)
expect
(
first_member
).
to
include
(
developer
.
name
)
expect
(
second_member
).
to
include
(
master
.
name
)
expect
(
second_member
).
to
include
(
master
.
name
)
expect
(
page
).
to
have_css
(
'.member-sort-dropdown .dropdown-toggle-text'
,
text:
'Last joined'
)
end
end
scenario
'sorts by oldest joined'
do
scenario
'sorts by oldest joined'
do
...
@@ -45,6 +49,7 @@ feature 'Projects > Members > Sorting', feature: true do
...
@@ -45,6 +49,7 @@ feature 'Projects > Members > Sorting', feature: true do
expect
(
first_member
).
to
include
(
master
.
name
)
expect
(
first_member
).
to
include
(
master
.
name
)
expect
(
second_member
).
to
include
(
developer
.
name
)
expect
(
second_member
).
to
include
(
developer
.
name
)
expect
(
page
).
to
have_css
(
'.member-sort-dropdown .dropdown-toggle-text'
,
text:
'Oldest joined'
)
end
end
scenario
'sorts by name ascending'
do
scenario
'sorts by name ascending'
do
...
@@ -52,6 +57,7 @@ feature 'Projects > Members > Sorting', feature: true do
...
@@ -52,6 +57,7 @@ feature 'Projects > Members > Sorting', feature: true do
expect
(
first_member
).
to
include
(
master
.
name
)
expect
(
first_member
).
to
include
(
master
.
name
)
expect
(
second_member
).
to
include
(
developer
.
name
)
expect
(
second_member
).
to
include
(
developer
.
name
)
expect
(
page
).
to
have_css
(
'.member-sort-dropdown .dropdown-toggle-text'
,
text:
'Name, ascending'
)
end
end
scenario
'sorts by name descending'
do
scenario
'sorts by name descending'
do
...
@@ -59,6 +65,7 @@ feature 'Projects > Members > Sorting', feature: true do
...
@@ -59,6 +65,7 @@ feature 'Projects > Members > Sorting', feature: true do
expect
(
first_member
).
to
include
(
developer
.
name
)
expect
(
first_member
).
to
include
(
developer
.
name
)
expect
(
second_member
).
to
include
(
master
.
name
)
expect
(
second_member
).
to
include
(
master
.
name
)
expect
(
page
).
to
have_css
(
'.member-sort-dropdown .dropdown-toggle-text'
,
text:
'Name, descending'
)
end
end
scenario
'sorts by recent sign in'
do
scenario
'sorts by recent sign in'
do
...
@@ -66,6 +73,7 @@ feature 'Projects > Members > Sorting', feature: true do
...
@@ -66,6 +73,7 @@ feature 'Projects > Members > Sorting', feature: true do
expect
(
first_member
).
to
include
(
master
.
name
)
expect
(
first_member
).
to
include
(
master
.
name
)
expect
(
second_member
).
to
include
(
developer
.
name
)
expect
(
second_member
).
to
include
(
developer
.
name
)
expect
(
page
).
to
have_css
(
'.member-sort-dropdown .dropdown-toggle-text'
,
text:
'Recent sign in'
)
end
end
scenario
'sorts by oldest sign in'
do
scenario
'sorts by oldest sign in'
do
...
@@ -73,6 +81,7 @@ feature 'Projects > Members > Sorting', feature: true do
...
@@ -73,6 +81,7 @@ feature 'Projects > Members > Sorting', feature: true do
expect
(
first_member
).
to
include
(
developer
.
name
)
expect
(
first_member
).
to
include
(
developer
.
name
)
expect
(
second_member
).
to
include
(
master
.
name
)
expect
(
second_member
).
to
include
(
master
.
name
)
expect
(
page
).
to
have_css
(
'.member-sort-dropdown .dropdown-toggle-text'
,
text:
'Oldest sign in'
)
end
end
def
visit_members_list
(
sort
:)
def
visit_members_list
(
sort
:)
...
...
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