Commit cce14e0b0133ec6e8f380a23a6309bb52e67cc20

Authored by Dmitriy Zaporozhets
1 parent 5aeaf248

Removing ambiguity and non-working selectors

spec/features/admin/admin_users_spec.rb
... ... @@ -82,7 +82,6 @@ describe "Admin::Users" do
82 82 it "should have user info" do
83 83 page.should have_content(@user.email)
84 84 page.should have_content(@user.name)
85   - page.should have_content(@user.projects_limit)
86 85 end
87 86 end
88 87  
... ...
spec/features/notes_on_merge_requests_spec.rb
... ... @@ -18,7 +18,7 @@ describe "On a merge request", js: true do
18 18 it { should have_css(".js-main-target-form", visible: true, count: 1) }
19 19  
20 20 # button initalization
21   - it { within(".js-main-target-form") { should have_button("Add Comment") } }
  21 + it { find(".js-main-target-form input[type=submit]").value.should == "Add Comment" }
22 22 it { within(".js-main-target-form") { should_not have_link("Cancel") } }
23 23  
24 24 # notifiactions
... ... @@ -136,7 +136,7 @@ describe "On a merge request diff", js: true, focus: true do
136 136 end
137 137  
138 138 it "should be removed when canceled" do
139   - find(".js-close-discussion-note-form").trigger("click")
  139 + first(".js-close-discussion-note-form").trigger("click")
140 140  
141 141 should have_no_css(".js-temp-notes-holder")
142 142 end
... ...
spec/features/notes_on_wall_spec.rb
... ... @@ -17,7 +17,7 @@ describe "On the project wall", js: true do
17 17 it { should have_css(".js-main-target-form", visible: true, count: 1) }
18 18  
19 19 # button initalization
20   - it { within(".js-main-target-form") { should have_button("Add Comment") } }
  20 + it { find(".js-main-target-form input[type=submit]").value.should == "Add Comment" }
21 21 it { within(".js-main-target-form") { should_not have_link("Cancel") } }
22 22  
23 23 # notifiactions
... ...
spec/features/search_spec.rb
... ... @@ -6,8 +6,11 @@ describe "Search" do
6 6 @project = create(:project)
7 7 @project.team << [@user, :reporter]
8 8 visit search_path
9   - fill_in "search", with: @project.name[0..3]
10   - click_button "Search"
  9 +
  10 + within '.search-holder' do
  11 + fill_in "search", with: @project.name[0..3]
  12 + click_button "Search"
  13 + end
11 14 end
12 15  
13 16 it "should show project in search results" do
... ...