summaryrefslogtreecommitdiff
path: root/spec/support/features
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-01-17 11:30:25 +0000
committerNick Thomas <nick@gitlab.com>2018-01-24 17:25:55 +0000
commit93ea3234dfaa43204c5f24d4010bbe5070d75c72 (patch)
treedab7e978b28b6dc79349a3e084fad36175cf55d7 /spec/support/features
parent5a4fb8f0d183c7dd1560c90e750a7a37141c22d4 (diff)
downloadgitlab-ce-93ea3234dfaa43204c5f24d4010bbe5070d75c72.tar.gz
Use the DatabaseCleaner 'deletion' strategy instead of 'truncation'
Diffstat (limited to 'spec/support/features')
-rw-r--r--spec/support/features/discussion_comments_shared_example.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/support/features/discussion_comments_shared_example.rb b/spec/support/features/discussion_comments_shared_example.rb
index fa94aa2ae3d..c8662d41769 100644
--- a/spec/support/features/discussion_comments_shared_example.rb
+++ b/spec/support/features/discussion_comments_shared_example.rb
@@ -143,15 +143,17 @@ shared_examples 'discussion comments' do |resource_name|
end
if resource_name == 'merge request'
+ let(:note_id) { find("#{comments_selector} .note", match: :first)['data-note-id'] }
+
it 'shows resolved discussion when toggled' do
click_button "Resolve discussion"
- expect(page).to have_selector('.note-row-1', visible: true)
+ expect(page).to have_selector(".note-row-#{note_id}", visible: true)
refresh
click_button "Toggle discussion"
- expect(page).to have_selector('.note-row-1', visible: true)
+ expect(page).to have_selector(".note-row-#{note_id}", visible: true)
end
end
end