diff options
Diffstat (limited to 'spec/features/issues/user_interacts_with_awards_spec.rb')
-rw-r--r-- | spec/features/issues/user_interacts_with_awards_spec.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/features/issues/user_interacts_with_awards_spec.rb b/spec/features/issues/user_interacts_with_awards_spec.rb index 35d9db68d32..7db72f2cd05 100644 --- a/spec/features/issues/user_interacts_with_awards_spec.rb +++ b/spec/features/issues/user_interacts_with_awards_spec.rb @@ -184,6 +184,31 @@ RSpec.describe 'User interacts with awards' do wait_for_requests end + context 'when the issue is locked' do + before do + create(:award_emoji, awardable: issue, name: '100') + issue.update!(discussion_locked: true) + + visit project_issue_path(project, issue) + wait_for_requests + end + + it 'hides the add award button' do + page.within('.awards') do + expect(page).not_to have_css('.js-add-award') + end + end + + it 'does not allow toggling existing emoji' do + page.within('.awards') do + find('gl-emoji[data-name="100"]').click + end + wait_for_requests + + expect(issue.reload.award_emoji.size).to eq(1) + end + end + it 'adds award to issue' do first('.js-emoji-btn').click |