Commit 56c4f22c authored by Robert Speicher's avatar Robert Speicher

Remove redundant integration tests

These three tests were essentially checking that adding a note to
something updated its `noteable`'s `updated_at` attribute.

This is well-tested Rails behavior and we shouldn't feel the need to
write an integration test to verify it. At most we should be ensuring
that the association definition adds the `touch: true` option, which we
now do in Note's unit test.
parent 903aa7c9
...@@ -58,14 +58,6 @@ Feature: Project Issues ...@@ -58,14 +58,6 @@ Feature: Project Issues
Then I should see comment "XML attached" Then I should see comment "XML attached"
And I should see an error alert section within the comment form And I should see an error alert section within the comment form
@javascript
Scenario: Visiting Issues after leaving a comment
Given I visit issue page "Release 0.4"
And I leave a comment like "XML attached"
And I visit project "Shop" issues page
And I sort the list by "Last updated"
Then I should see "Release 0.4" at the top
@javascript @javascript
Scenario: Visiting Issues after being sorted the list Scenario: Visiting Issues after being sorted the list
Given I visit project "Shop" issues page Given I visit project "Shop" issues page
......
...@@ -86,15 +86,6 @@ Feature: Project Merge Requests ...@@ -86,15 +86,6 @@ Feature: Project Merge Requests
And I leave a comment like "XML attached" And I leave a comment like "XML attached"
Then I should see comment "XML attached" Then I should see comment "XML attached"
@javascript
Scenario: Visiting Merge Requests after leaving a comment
Given project "Shop" have "Bug NS-05" open merge request with diffs inside
And I visit merge request page "Bug NS-04"
And I leave a comment like "XML attached"
And I visit project "Shop" merge requests page
And I sort the list by "Last updated"
Then I should see "Bug NS-04" at the top
@javascript @javascript
Scenario: Visiting Merge Requests after being sorted the list Scenario: Visiting Merge Requests after being sorted the list
Given I visit project "Shop" merge requests page Given I visit project "Shop" merge requests page
...@@ -128,16 +119,6 @@ Feature: Project Merge Requests ...@@ -128,16 +119,6 @@ Feature: Project Merge Requests
And I sort the list by "Least popular" And I sort the list by "Least popular"
Then The list should be sorted by "Least popular" Then The list should be sorted by "Least popular"
@javascript
Scenario: Visiting Merge Requests after commenting on diffs
Given project "Shop" have "Bug NS-05" open merge request with diffs inside
And I visit merge request page "Bug NS-05"
And I click on the Changes tab
And I leave a comment like "Line is wrong" on diff
And I visit project "Shop" merge requests page
And I sort the list by "Last updated"
Then I should see "Bug NS-05" at the top
@javascript @javascript
Scenario: I comment on a merge request diff Scenario: I comment on a merge request diff
Given project "Shop" have "Bug NS-05" open merge request with diffs inside Given project "Shop" have "Bug NS-05" open merge request with diffs inside
......
...@@ -355,10 +355,6 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps ...@@ -355,10 +355,6 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
end end
end end
step 'I should see "Release 0.4" at the top' do
expect(page.find('ul.content-list.issues-list li.issue:first-child')).to have_content("Release 0.4")
end
def filter_issue(text) def filter_issue(text)
fill_in 'issue_search', with: text fill_in 'issue_search', with: text
end end
......
...@@ -517,14 +517,6 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps ...@@ -517,14 +517,6 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end end
end end
step 'I should see "Bug NS-05" at the top' do
expect(page.find('ul.content-list.mr-list li.merge-request:first-child')).to have_content("Bug NS-05")
end
step 'I should see "Bug NS-04" at the top' do
expect(page.find('ul.content-list.mr-list li.merge-request:first-child')).to have_content("Bug NS-04")
end
def merge_request def merge_request
@merge_request ||= MergeRequest.find_by!(title: "Bug NS-05") @merge_request ||= MergeRequest.find_by!(title: "Bug NS-05")
end end
......
...@@ -144,11 +144,4 @@ module SharedNote ...@@ -144,11 +144,4 @@ module SharedNote
expect(page).to have_content("+1 Awesome!") expect(page).to have_content("+1 Awesome!")
end end
end end
step 'I sort the list by "Last updated"' do
find('button.dropdown-toggle.btn').click
page.within('ul.dropdown-menu.dropdown-menu-align-right li') do
click_link "Last updated"
end
end
end end
...@@ -24,7 +24,7 @@ require 'spec_helper' ...@@ -24,7 +24,7 @@ require 'spec_helper'
describe Note, models: true do describe Note, models: true do
describe 'associations' do describe 'associations' do
it { is_expected.to belong_to(:project) } it { is_expected.to belong_to(:project) }
it { is_expected.to belong_to(:noteable) } it { is_expected.to belong_to(:noteable).touch(true) }
it { is_expected.to belong_to(:author).class_name('User') } it { is_expected.to belong_to(:author).class_name('User') }
it { is_expected.to have_many(:todos).dependent(:destroy) } it { is_expected.to have_many(:todos).dependent(:destroy) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment