Skip to content
Snippets Groups Projects
Commit 5d5a5ce5 authored by Deepika Guliani's avatar Deepika Guliani 1️⃣
Browse files

Add delete note action visibility rspec

Changelog: added
parent 3ae8bf3a
2 merge requests!119439Draft: Prevent file variable content expansion in downstream pipeline,!119302Add feature spec for delete note action
...@@ -71,6 +71,12 @@ def set_comment ...@@ -71,6 +71,12 @@ def set_comment
end end
context 'for work item note actions signed in user with developer role' do context 'for work item note actions signed in user with developer role' do
let_it_be(:owner) { create(:user) }
before do
project.add_owner(owner)
end
it 'shows work item note actions' do it 'shows work item note actions' do
set_comment set_comment
...@@ -78,13 +84,15 @@ def set_comment ...@@ -78,13 +84,15 @@ def set_comment
wait_for_requests wait_for_requests
page.within(".main-notes-list") do page.within('.timeline-entry.note.note-wrapper.note-comment:last-child') do
expect(page).to have_selector('[data-testid="work-item-note-actions"]') expect(page).to have_selector('[data-testid="work-item-note-actions"]')
find('[data-testid="work-item-note-actions"]', match: :first).click find('[data-testid="work-item-note-actions"]').click
expect(page).to have_selector('[data-testid="copy-link-action"]') expect(page).to have_selector('[data-testid="copy-link-action"]')
expect(page).to have_selector('[data-testid="assign-note-action"]') expect(page).to have_selector('[data-testid="assign-note-action"]')
expect(page).to have_selector('[data-testid="delete-note-action"]')
expect(page).to have_selector('[data-testid="edit-work-item-note"]')
end end
end end
end end
...@@ -295,7 +303,6 @@ def set_milestone(milestone_dropdown, milestone_text) ...@@ -295,7 +303,6 @@ def set_milestone(milestone_dropdown, milestone_text)
expect(page).to have_selector('[data-testid="work-item-note-actions"]') expect(page).to have_selector('[data-testid="work-item-note-actions"]')
find('[data-testid="work-item-note-actions"]', match: :first).click find('[data-testid="work-item-note-actions"]', match: :first).click
expect(page).to have_selector('[data-testid="copy-link-action"]') expect(page).to have_selector('[data-testid="copy-link-action"]')
expect(page).not_to have_selector('[data-testid="assign-note-action"]') expect(page).not_to have_selector('[data-testid="assign-note-action"]')
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment