From 0d236638b683d368d5384e95dd75772a68c727c2 Mon Sep 17 00:00:00 2001 From: "Vitaliy @blackst0ne Klachkov" Date: Sat, 23 Sep 2017 11:46:53 +1100 Subject: Improve list of sorting options --- features/project/issues/issues.feature | 18 ++++++++---------- features/project/merge_requests.feature | 16 +++++++--------- features/steps/project/issues/issues.rb | 2 +- features/steps/project/merge_requests.rb | 2 +- features/steps/shared/issuable.rb | 12 ++++++------ 5 files changed, 23 insertions(+), 27 deletions(-) (limited to 'features') diff --git a/features/project/issues/issues.feature b/features/project/issues/issues.feature index 4f905674d8c..d6cfa524a3a 100644 --- a/features/project/issues/issues.feature +++ b/features/project/issues/issues.feature @@ -51,36 +51,34 @@ Feature: Project Issues @javascript Scenario: Visiting Issues after being sorted the list Given I visit project "Shop" issues page - And I sort the list by "Oldest updated" + And I sort the list by "Last updated" And I visit my project's home page And I visit project "Shop" issues page - Then The list should be sorted by "Oldest updated" + Then The list should be sorted by "Last updated" @javascript Scenario: Visiting Merge Requests after being sorted the list Given project "Shop" has a "Bugfix MR" merge request open And I visit project "Shop" issues page - And I sort the list by "Oldest updated" + And I sort the list by "Last updated" And I visit project "Shop" merge requests page - Then The list should be sorted by "Oldest updated" + Then The list should be sorted by "Last updated" @javascript Scenario: Visiting Merge Requests from a differente Project after sorting Given project "Shop" has a "Bugfix MR" merge request open And I visit project "Shop" merge requests page - And I sort the list by "Oldest updated" + And I sort the list by "Last updated" And I visit dashboard merge requests page - Then The list should be sorted by "Oldest updated" + Then The list should be sorted by "Last updated" @javascript Scenario: Sort issues by upvotes/downvotes Given project "Shop" have "Bugfix" open issue And issue "Release 0.4" have 2 upvotes and 1 downvote And issue "Tweet control" have 1 upvote and 2 downvotes - And I sort the list by "Most popular" - Then The list should be sorted by "Most popular" - And I sort the list by "Least popular" - Then The list should be sorted by "Least popular" + And I sort the list by "Popularity" + Then The list should be sorted by "Popularity" # Markdown diff --git a/features/project/merge_requests.feature b/features/project/merge_requests.feature index 0ebeded7fc5..349fa2663a7 100644 --- a/features/project/merge_requests.feature +++ b/features/project/merge_requests.feature @@ -91,28 +91,26 @@ Feature: Project Merge Requests @javascript Scenario: Visiting Merge Requests after being sorted the list Given I visit project "Shop" merge requests page - And I sort the list by "Oldest updated" + And I sort the list by "Last updated" And I visit my project's home page And I visit project "Shop" merge requests page - Then The list should be sorted by "Oldest updated" + Then The list should be sorted by "Last updated" @javascript Scenario: Visiting Merge Requests from a different Project after sorting Given I visit project "Shop" merge requests page - And I sort the list by "Oldest updated" + And I sort the list by "Last updated" And I visit dashboard merge requests page - Then The list should be sorted by "Oldest updated" + Then The list should be sorted by "Last updated" @javascript - Scenario: Sort merge requests by upvotes/downvotes + Scenario: Sort merge requests by upvotes Given project "Shop" have "Bug NS-05" open merge request with diffs inside And project "Shop" have "Bug NS-06" open merge request And merge request "Bug NS-04" have 2 upvotes and 1 downvote And merge request "Bug NS-06" have 1 upvote and 2 downvotes - And I sort the list by "Most popular" - Then The list should be sorted by "Most popular" - And I sort the list by "Least popular" - Then The list should be sorted by "Least popular" + And I sort the list by "Popularity" + Then The list should be sorted by "Popularity" @javascript Scenario: I comment on a merge request diff diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb index b9460f5b534..2c3ef2efd52 100644 --- a/features/steps/project/issues/issues.rb +++ b/features/steps/project/issues/issues.rb @@ -223,7 +223,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps end end - step 'The list should be sorted by "Most popular"' do + step 'The list should be sorted by "Popularity"' do page.within '.issues-list' do page.within 'li.issue:nth-child(1)' do expect(page).to have_content 'Release 0.4' diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index 0d49a4ab90d..dde918e3d41 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -222,7 +222,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps end end - step 'The list should be sorted by "Most popular"' do + step 'The list should be sorted by "Popularity"' do page.within '.mr-list' do page.within 'li.merge-request:nth-child(1)' do expect(page).to have_content 'Bug NS-04' diff --git a/features/steps/shared/issuable.rb b/features/steps/shared/issuable.rb index 7c842ba88fb..714985f2051 100644 --- a/features/steps/shared/issuable.rb +++ b/features/steps/shared/issuable.rb @@ -109,10 +109,10 @@ module SharedIssuable edit_issuable end - step 'I sort the list by "Oldest updated"' do + step 'I sort the list by "Last updated"' do find('button.dropdown-toggle').click page.within('.content ul.dropdown-menu.dropdown-menu-align-right li') do - click_link "Oldest updated" + click_link "Last updated" end end @@ -124,16 +124,16 @@ module SharedIssuable end end - step 'I sort the list by "Most popular"' do + step 'I sort the list by "Popularity"' do find('button.dropdown-toggle').click page.within('.content ul.dropdown-menu.dropdown-menu-align-right li') do - click_link 'Most popular' + click_link 'Popularity' end end - step 'The list should be sorted by "Oldest updated"' do - expect(find('.issues-filters')).to have_content('Oldest updated') + step 'The list should be sorted by "Last updated"' do + expect(find('.issues-filters')).to have_content('Last updated') end step 'I click link "Next" in the sidebar' do -- cgit v1.2.1