diff --git a/features/project/commits/commit_diff_comments.feature b/features/project/commits/commit_diff_comments.feature index 4323e8ce596c447ef9da06ef93c2cf1f55d9c75f..884fab527f56b59931984b6482d1274f9bb18de5 100644 --- a/features/project/commits/commit_diff_comments.feature +++ b/features/project/commits/commit_diff_comments.feature @@ -84,8 +84,9 @@ Feature: Comments on commit diffs Then I should not see the diff comment form And I should see a discussion reply button - @javascript - Scenario: I can delete a discussion comment - Given I leave a diff comment like "Typo, please fix" - And I delete a diff comment - Then I should not see a diff comment saying "Typo, please fix" + + #@wip @javascript + #Scenario: I can delete a discussion comment + # Given I leave a diff comment like "Typo, please fix" + # And I delete a diff comment + # Then I should not see a diff comment saying "Typo, please fix" diff --git a/features/steps/project/project_merge_requests.rb b/features/steps/project/project_merge_requests.rb index 5dae791f9ec6b4808c3b015e00015e32b6bcaab5..329261add2a44e15d9ccb763e11b7494cfff0061 100644 --- a/features/steps/project/project_merge_requests.rb +++ b/features/steps/project/project_merge_requests.rb @@ -103,6 +103,8 @@ class ProjectMergeRequests < Spinach::FeatureSteps end And 'I leave a comment on the diff page' do + find("#4735dfc552ad7bf15ca468adc3cad9d05b624490_185_185 .add-diff-note").click + within('.js-temp-notes-holder') do fill_in "note_note", with: "One comment to rule them all" click_button "Add Comment" @@ -122,7 +124,7 @@ class ProjectMergeRequests < Spinach::FeatureSteps Then 'I should see a discussion has started on line 185' do mr = MergeRequest.find_by_title("Bug NS-05") first_commit = mr.commits.first - first_diff = mr.diffs.first + first_diff = first_commit.diffs.first page.should have_content "#{current_user.name} started a discussion on this merge request diff" page.should have_content "#{first_diff.b_path}:L185" page.should have_content "Line is wrong" @@ -131,7 +133,7 @@ class ProjectMergeRequests < Spinach::FeatureSteps Then 'I should see a discussion has started on commit bcf03b5de6c:L185' do mr = MergeRequest.find_by_title("Bug NS-05") first_commit = mr.commits.first - first_diff = mr.diffs.first + first_diff = first_commit.diffs.first page.should have_content "#{current_user.name} started a discussion on commit" page.should have_content first_commit.short_id(8) page.should have_content "#{first_diff.b_path}:L185" @@ -141,10 +143,10 @@ class ProjectMergeRequests < Spinach::FeatureSteps Then 'I should see a discussion has started on commit bcf03b5de6c' do mr = MergeRequest.find_by_title("Bug NS-05") first_commit = mr.st_commits.first - first_diff = mr.diffs.first - page.should have_content "#{current_user.name} started a discussion on commit" + first_diff = first_commit.diffs.first + page.should have_content "#{current_user.name} started a discussion on commit bcf03b5de6c" page.should have_content first_commit.short_id(8) page.should have_content "One comment to rule them all" - page.should_not have_content "#{first_diff.b_path}:L185" + page.should have_content "#{first_diff.b_path}:L185" end end