diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-13 09:08:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-13 09:08:08 +0300 |
commit | 1cd5d53f92b07b0be71b6c2d9fdfa7cf07221890 (patch) | |
tree | 95e12ad9b7b43fd9fe2b3b4ba121bb4d0b6c9a0c /spec/support | |
parent | 0f5d9f4ba36dc94ebb547e28ffb6f56611bd3004 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/shared_examples/features/work_items_shared_examples.rb | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/spec/support/shared_examples/features/work_items_shared_examples.rb b/spec/support/shared_examples/features/work_items_shared_examples.rb index c59e0ace279..ab57f4e2c55 100644 --- a/spec/support/shared_examples/features/work_items_shared_examples.rb +++ b/spec/support/shared_examples/features/work_items_shared_examples.rb @@ -71,6 +71,12 @@ RSpec.shared_examples 'work items comments' do |type| end 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 set_comment @@ -78,13 +84,15 @@ RSpec.shared_examples 'work items comments' do |type| 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"]') - 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="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 @@ -295,7 +303,6 @@ RSpec.shared_examples 'work items comment actions for guest users' do expect(page).to have_selector('[data-testid="work-item-note-actions"]') find('[data-testid="work-item-note-actions"]', match: :first).click - expect(page).to have_selector('[data-testid="copy-link-action"]') expect(page).not_to have_selector('[data-testid="assign-note-action"]') end |