diff options
author | Rémy Coutable <remy@rymai.me> | 2016-02-15 15:19:23 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-02-15 15:40:24 +0100 |
commit | 54613b6af56008588a3cc8a9e9f2ee642ca59a36 (patch) | |
tree | 1e5c08d6ce26d4fb839302eac3911ba59f227cd9 /features/steps/shared/issuable.rb | |
parent | c29517aaf420b0d83f21d468b371260f4887cf00 (diff) | |
download | gitlab-ce-54613b6af56008588a3cc8a9e9f2ee642ca59a36.tar.gz |
Fix the "x of y" displayed at the top of Issuables' sidebarfix/13356-issuable-index-of-total-in-sidebar
1. We now display the index of the current issuable among all its project's
issuables, of the same type and with the same state.
2. Also, refactored a bit the Issuable helpers into a new IssuablesHelper
module.
3. Added acceptance specs for the sidebar counter.
Diffstat (limited to 'features/steps/shared/issuable.rb')
-rw-r--r-- | features/steps/shared/issuable.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/features/steps/shared/issuable.rb b/features/steps/shared/issuable.rb index 25c2b476f43..2117feaedb8 100644 --- a/features/steps/shared/issuable.rb +++ b/features/steps/shared/issuable.rb @@ -119,6 +119,24 @@ module SharedIssuable end end + step 'I should see "1 of 1" in the sidebar' do + expect_sidebar_content('1 of 1') + end + + step 'I should see "1 of 2" in the sidebar' do + expect_sidebar_content('1 of 2') + end + + step 'I should see "2 of 2" in the sidebar' do + expect_sidebar_content('2 of 2') + end + + step 'I click link "Next" in the sidebar' do + page.within '.issuable-sidebar' do + click_link 'Next' + end + end + def create_issuable_for_project(project_name:, title:, type: :issue) project = Project.find_by(name: project_name) @@ -159,4 +177,10 @@ module SharedIssuable expect(page).to have_content("mentioned in #{issuable.class.to_s.titleize.downcase} #{issuable.to_reference(project)}") end + def expect_sidebar_content(content) + page.within '.issuable-sidebar' do + expect(page).to have_content content + end + end + end |