diff options
Diffstat (limited to 'spec/features/boards')
-rw-r--r-- | spec/features/boards/add_issues_modal_spec.rb | 5 | ||||
-rw-r--r-- | spec/features/boards/boards_spec.rb | 4 | ||||
-rw-r--r-- | spec/features/boards/keyboard_shortcut_spec.rb | 8 | ||||
-rw-r--r-- | spec/features/boards/sidebar_spec.rb | 2 |
4 files changed, 14 insertions, 5 deletions
diff --git a/spec/features/boards/add_issues_modal_spec.rb b/spec/features/boards/add_issues_modal_spec.rb index f941adca233..8d0fa3e023b 100644 --- a/spec/features/boards/add_issues_modal_spec.rb +++ b/spec/features/boards/add_issues_modal_spec.rb @@ -37,6 +37,10 @@ RSpec.describe 'Issue Boards add issue modal', :js do end context 'modal interaction' do + before do + stub_feature_flags(add_issues_button: true) + end + it 'opens modal' do click_button('Add issues') @@ -72,6 +76,7 @@ RSpec.describe 'Issue Boards add issue modal', :js do context 'issues list' do before do + stub_feature_flags(add_issues_button: true) click_button('Add issues') wait_for_requests diff --git a/spec/features/boards/boards_spec.rb b/spec/features/boards/boards_spec.rb index 06ec4e05828..b3cc2eb418d 100644 --- a/spec/features/boards/boards_spec.rb +++ b/spec/features/boards/boards_spec.rb @@ -27,11 +27,11 @@ RSpec.describe 'Issue Boards', :js do end it 'creates default lists' do - lists = ['Open', 'To Do', 'Doing', 'Closed'] + lists = %w[Open Closed] wait_for_requests - expect(page).to have_selector('.board', count: 4) + expect(page).to have_selector('.board', count: 2) page.all('.board').each_with_index do |list, i| expect(list.find('.board-title')).to have_content(lists[i]) diff --git a/spec/features/boards/keyboard_shortcut_spec.rb b/spec/features/boards/keyboard_shortcut_spec.rb index f51b4d21e3b..cefb486349d 100644 --- a/spec/features/boards/keyboard_shortcut_spec.rb +++ b/spec/features/boards/keyboard_shortcut_spec.rb @@ -9,7 +9,9 @@ RSpec.describe 'Issue Boards shortcut', :js do before do create(:board, project: project) - sign_in(create(:admin)) + admin = create(:admin) + sign_in(admin) + gitlab_enable_admin_mode_sign_in(admin) visit project_path(project) end @@ -26,7 +28,9 @@ RSpec.describe 'Issue Boards shortcut', :js do let(:project) { create(:project, :issues_disabled) } before do - sign_in(create(:admin)) + admin = create(:admin) + sign_in(admin) + gitlab_enable_admin_mode_sign_in(admin) visit project_path(project) end diff --git a/spec/features/boards/sidebar_spec.rb b/spec/features/boards/sidebar_spec.rb index 332c90df6d7..2af5b787a78 100644 --- a/spec/features/boards/sidebar_spec.rb +++ b/spec/features/boards/sidebar_spec.rb @@ -72,7 +72,7 @@ RSpec.describe 'Issue Boards', :js do end end - it 'removes card from board when clicking ' do + it 'removes card from board when clicking' do click_card(card) page.within('.issue-boards-sidebar') do |