2012-09-10 10:51:02 +02:00
|
|
|
class DashboardSearch < Spinach::FeatureSteps
|
2012-09-10 17:35:03 +02:00
|
|
|
include SharedAuthentication
|
|
|
|
include SharedPaths
|
|
|
|
|
2012-09-10 10:51:02 +02:00
|
|
|
Given 'I search for "Sho"' do
|
2012-11-07 12:56:48 +01:00
|
|
|
fill_in "dashboard_search", with: "Sho"
|
2012-09-10 10:51:02 +02:00
|
|
|
click_button "Search"
|
|
|
|
end
|
|
|
|
|
|
|
|
Then 'I should see "Shop" project link' do
|
|
|
|
page.should have_link "Shop"
|
|
|
|
end
|
|
|
|
|
|
|
|
And 'I own project "Shop"' do
|
2012-11-06 04:31:55 +01:00
|
|
|
@project = create(:project, :name => "Shop")
|
2012-09-10 10:51:02 +02:00
|
|
|
@project.add_access(@user, :admin)
|
|
|
|
end
|
2012-10-16 21:05:11 +02:00
|
|
|
|
|
|
|
Given 'I search for "Contibuting"' do
|
2012-11-07 12:56:48 +01:00
|
|
|
fill_in "dashboard_search", with: "Contibuting"
|
2012-10-16 21:05:11 +02:00
|
|
|
click_button "Search"
|
|
|
|
end
|
|
|
|
|
|
|
|
And 'Project "Shop" has wiki page "Contibuting guide"' do
|
2012-11-07 12:56:48 +01:00
|
|
|
@wiki_page = create :wiki,
|
|
|
|
project: @project,
|
|
|
|
title: "Contibuting guide",
|
|
|
|
slug: "contributing"
|
2012-10-16 21:05:11 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
Then 'I should see "Contibuting guide" wiki link' do
|
|
|
|
page.should have_link "Contibuting guide"
|
|
|
|
end
|
2012-09-10 10:51:02 +02:00
|
|
|
end
|