Removing ambiguity and non-working selectors

5-0-stable
Dmitriy Zaporozhets 2013-02-21 13:28:05 +02:00
parent 5aeaf248f1
commit cce14e0b01
4 changed files with 8 additions and 6 deletions

View File

@ -82,7 +82,6 @@ describe "Admin::Users" do
it "should have user info" do
page.should have_content(@user.email)
page.should have_content(@user.name)
page.should have_content(@user.projects_limit)
end
end

View File

@ -18,7 +18,7 @@ describe "On a merge request", js: true do
it { should have_css(".js-main-target-form", visible: true, count: 1) }
# button initalization
it { within(".js-main-target-form") { should have_button("Add Comment") } }
it { find(".js-main-target-form input[type=submit]").value.should == "Add Comment" }
it { within(".js-main-target-form") { should_not have_link("Cancel") } }
# notifiactions
@ -136,7 +136,7 @@ describe "On a merge request diff", js: true, focus: true do
end
it "should be removed when canceled" do
find(".js-close-discussion-note-form").trigger("click")
first(".js-close-discussion-note-form").trigger("click")
should have_no_css(".js-temp-notes-holder")
end

View File

@ -17,7 +17,7 @@ describe "On the project wall", js: true do
it { should have_css(".js-main-target-form", visible: true, count: 1) }
# button initalization
it { within(".js-main-target-form") { should have_button("Add Comment") } }
it { find(".js-main-target-form input[type=submit]").value.should == "Add Comment" }
it { within(".js-main-target-form") { should_not have_link("Cancel") } }
# notifiactions

View File

@ -6,8 +6,11 @@ describe "Search" do
@project = create(:project)
@project.team << [@user, :reporter]
visit search_path
fill_in "search", with: @project.name[0..3]
click_button "Search"
within '.search-holder' do
fill_in "search", with: @project.name[0..3]
click_button "Search"
end
end
it "should show project in search results" do