Commit ecea127c authored by Nur Rony's avatar Nur Rony Committed by Douglas Barbosa Alexandre

Improve test for sort dropdown on members page

parent eac34fd9
.dropdown.inline
.dropdown.inline.member-sort-dropdown
= dropdown_toggle(member_sort_options_hash[@sort], { toggle: 'dropdown' })
%ul.dropdown-menu.dropdown-menu-align-right.dropdown-menu-selectable
%li.dropdown-header
......
......@@ -17,6 +17,7 @@ feature 'Groups > Members > Sorting', feature: true do
expect(first_member).to include(owner.name)
expect(second_member).to include(developer.name)
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Name, ascending')
end
scenario 'sorts by access level ascending' do
......@@ -24,6 +25,7 @@ feature 'Groups > Members > Sorting', feature: true do
expect(first_member).to include(developer.name)
expect(second_member).to include(owner.name)
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Access level, ascending')
end
scenario 'sorts by access level descending' do
......@@ -31,6 +33,7 @@ feature 'Groups > Members > Sorting', feature: true do
expect(first_member).to include(owner.name)
expect(second_member).to include(developer.name)
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Access level, descending')
end
scenario 'sorts by last joined' do
......@@ -38,6 +41,7 @@ feature 'Groups > Members > Sorting', feature: true do
expect(first_member).to include(developer.name)
expect(second_member).to include(owner.name)
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Last joined')
end
scenario 'sorts by oldest joined' do
......@@ -45,6 +49,7 @@ feature 'Groups > Members > Sorting', feature: true do
expect(first_member).to include(owner.name)
expect(second_member).to include(developer.name)
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Oldest joined')
end
scenario 'sorts by name ascending' do
......@@ -52,6 +57,7 @@ feature 'Groups > Members > Sorting', feature: true do
expect(first_member).to include(owner.name)
expect(second_member).to include(developer.name)
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Name, ascending')
end
scenario 'sorts by name descending' do
......@@ -59,6 +65,7 @@ feature 'Groups > Members > Sorting', feature: true do
expect(first_member).to include(developer.name)
expect(second_member).to include(owner.name)
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Name, descending')
end
scenario 'sorts by recent sign in' do
......@@ -66,6 +73,7 @@ feature 'Groups > Members > Sorting', feature: true do
expect(first_member).to include(owner.name)
expect(second_member).to include(developer.name)
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Recent sign in')
end
scenario 'sorts by oldest sign in' do
......@@ -73,6 +81,7 @@ feature 'Groups > Members > Sorting', feature: true do
expect(first_member).to include(developer.name)
expect(second_member).to include(owner.name)
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Oldest sign in')
end
def visit_members_list(sort:)
......
......@@ -17,6 +17,7 @@ feature 'Projects > Members > Sorting', feature: true do
expect(first_member).to include(master.name)
expect(second_member).to include(developer.name)
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Name, ascending')
end
scenario 'sorts by access level ascending' do
......@@ -24,6 +25,7 @@ feature 'Projects > Members > Sorting', feature: true do
expect(first_member).to include(developer.name)
expect(second_member).to include(master.name)
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Access level, ascending')
end
scenario 'sorts by access level descending' do
......@@ -31,6 +33,7 @@ feature 'Projects > Members > Sorting', feature: true do
expect(first_member).to include(master.name)
expect(second_member).to include(developer.name)
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Access level, descending')
end
scenario 'sorts by last joined' do
......@@ -38,6 +41,7 @@ feature 'Projects > Members > Sorting', feature: true do
expect(first_member).to include(developer.name)
expect(second_member).to include(master.name)
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Last joined')
end
scenario 'sorts by oldest joined' do
......@@ -45,6 +49,7 @@ feature 'Projects > Members > Sorting', feature: true do
expect(first_member).to include(master.name)
expect(second_member).to include(developer.name)
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Oldest joined')
end
scenario 'sorts by name ascending' do
......@@ -52,6 +57,7 @@ feature 'Projects > Members > Sorting', feature: true do
expect(first_member).to include(master.name)
expect(second_member).to include(developer.name)
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Name, ascending')
end
scenario 'sorts by name descending' do
......@@ -59,6 +65,7 @@ feature 'Projects > Members > Sorting', feature: true do
expect(first_member).to include(developer.name)
expect(second_member).to include(master.name)
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Name, descending')
end
scenario 'sorts by recent sign in' do
......@@ -66,6 +73,7 @@ feature 'Projects > Members > Sorting', feature: true do
expect(first_member).to include(master.name)
expect(second_member).to include(developer.name)
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Recent sign in')
end
scenario 'sorts by oldest sign in' do
......@@ -73,6 +81,7 @@ feature 'Projects > Members > Sorting', feature: true do
expect(first_member).to include(developer.name)
expect(second_member).to include(master.name)
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Oldest sign in')
end
def visit_members_list(sort:)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment