Commit 063c4a069c1de3ee70cc500906121367b94a7886
1 parent
ba4f0abf
Exists in
master
and in
4 other branches
fix wall feature. removed duplicated test
Showing
4 changed files
with
19 additions
and
63 deletions
Show diff stats
features/steps/project/project_wall.rb
| ... | ... | @@ -3,4 +3,22 @@ class ProjectWall < Spinach::FeatureSteps |
| 3 | 3 | include SharedProject |
| 4 | 4 | include SharedNote |
| 5 | 5 | include SharedPaths |
| 6 | + | |
| 7 | + | |
| 8 | + Given 'I write new comment "my special test message"' do | |
| 9 | + within(".wall-note-form") do | |
| 10 | + fill_in "note[note]", with: "my special test message" | |
| 11 | + click_button "Add Comment" | |
| 12 | + end | |
| 13 | + end | |
| 14 | + | |
| 15 | + Then 'I should see project wall note "my special test message"' do | |
| 16 | + page.should have_content "my special test message" | |
| 17 | + end | |
| 18 | + | |
| 19 | + Then 'I should see comment "XML attached"' do | |
| 20 | + within(".note") do | |
| 21 | + page.should have_content("XML attached") | |
| 22 | + end | |
| 23 | + end | |
| 6 | 24 | end | ... | ... |
features/steps/shared/note.rb
| ... | ... | @@ -96,25 +96,4 @@ module SharedNote |
| 96 | 96 | page.should have_css(".js-note-preview-button", visible: true) |
| 97 | 97 | end |
| 98 | 98 | end |
| 99 | - | |
| 100 | - | |
| 101 | - | |
| 102 | - # Wall | |
| 103 | - | |
| 104 | - Given 'I write new comment "my special test message"' do | |
| 105 | - within(".js-main-target-form") do | |
| 106 | - fill_in "note[note]", with: "my special test message" | |
| 107 | - click_button "Add Comment" | |
| 108 | - end | |
| 109 | - end | |
| 110 | - | |
| 111 | - Then 'I should see project wall note "my special test message"' do | |
| 112 | - page.should have_content "my special test message" | |
| 113 | - end | |
| 114 | - | |
| 115 | - Then 'I should see comment "XML attached"' do | |
| 116 | - within(".note") do | |
| 117 | - page.should have_content("XML attached") | |
| 118 | - end | |
| 119 | - end | |
| 120 | 99 | end | ... | ... |
features/steps/shared/paths.rb
spec/features/notes_on_wall_spec.rb
| ... | ... | @@ -1,41 +0,0 @@ |
| 1 | -require 'spec_helper' | |
| 2 | - | |
| 3 | -describe "On the project wall", js: true do | |
| 4 | - let!(:project) { create(:project) } | |
| 5 | - | |
| 6 | - before do | |
| 7 | - login_as :user | |
| 8 | - project.team << [@user, :master] | |
| 9 | - visit project_wall_path(project) | |
| 10 | - end | |
| 11 | - | |
| 12 | - subject { page } | |
| 13 | - | |
| 14 | - describe "the note form" do | |
| 15 | - it { should have_css(".wall-note-form", visible: true, count: 1) } | |
| 16 | - it { find(".wall-note-form input[type=submit]").value.should == "Add Comment" } | |
| 17 | - it { within(".wall-note-form") { should have_unchecked_field("Notify team via email") } } | |
| 18 | - | |
| 19 | - describe "with text" do | |
| 20 | - before do | |
| 21 | - within(".wall-note-form") do | |
| 22 | - fill_in "note[note]", with: "This is awesome" | |
| 23 | - end | |
| 24 | - end | |
| 25 | - | |
| 26 | - it { within(".wall-note-form") { should_not have_css(".js-comment-button[disabled]") } } | |
| 27 | - end | |
| 28 | - end | |
| 29 | - | |
| 30 | - describe "when posting a note" do | |
| 31 | - before do | |
| 32 | - within(".wall-note-form") do | |
| 33 | - fill_in "note[note]", with: "This is awsome!" | |
| 34 | - click_button "Add Comment" | |
| 35 | - end | |
| 36 | - end | |
| 37 | - | |
| 38 | - it { should have_content("This is awsome!") } | |
| 39 | - it { within(".wall-note-form") { should have_no_field("note[note]", with: "This is awesome!") } } | |
| 40 | - end | |
| 41 | -end |