diff options
author | Phil Hughes <me@iamphill.com> | 2016-10-07 09:55:12 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-10-07 09:55:12 +0100 |
commit | b602023e95f130e4b24cf2be1817f4a22444bb5b (patch) | |
tree | 9b8d82dd2c1a54573bd391ff1288c770a1460642 | |
parent | e4571614983ca6ba7ef7c4ea8c4bc5bbd992ce32 (diff) | |
download | gitlab-ce-b602023e95f130e4b24cf2be1817f4a22444bb5b.tar.gz |
Added tests for showing sidebar when new issue is saved
-rw-r--r-- | spec/features/boards/new_issue_spec.rb | 15 | ||||
-rw-r--r-- | spec/features/boards/sidebar_spec.rb | 14 |
2 files changed, 29 insertions, 0 deletions
diff --git a/spec/features/boards/new_issue_spec.rb b/spec/features/boards/new_issue_spec.rb index c046e6b8d79..c776c977416 100644 --- a/spec/features/boards/new_issue_spec.rb +++ b/spec/features/boards/new_issue_spec.rb @@ -65,6 +65,21 @@ describe 'Issue Boards new issue', feature: true, js: true do expect(page).to have_content('1') end end + + it 'shows sidebar when creating new issue' do + page.within(first('.board')) do + find('.board-issue-count-holder .btn').click + end + + page.within(first('.board-new-issue-form')) do + find('.form-control').set('bug') + click_button 'Submit issue' + end + + wait_for_vue_resource + + expect(page).to have_selector('.issue-boards-sidebar') + end end context 'unauthorized user' do diff --git a/spec/features/boards/sidebar_spec.rb b/spec/features/boards/sidebar_spec.rb index 2e754287f3a..905d720705d 100644 --- a/spec/features/boards/sidebar_spec.rb +++ b/spec/features/boards/sidebar_spec.rb @@ -294,4 +294,18 @@ describe 'Issue Boards', feature: true, js: true do end end end + + context 'subscription' do + it 'changes issue subscription' do + page.within(first('.board')) do + first('.card').click + end + + page.within('.subscription') do + click_button 'Subscribe' + + expect(page).to have_content("You're receiving notifications because you're subscribed to this thread.") + end + end + end end |