Commit fce22dfa authored by Andrew8xx8's avatar Andrew8xx8

Tests for dashboard projects fixed

parent 804ae05c
Feature: Dashboard Feature: Dashboard projects
Background: Background:
Given I sign in as a user Given I sign in as a user
And I own project "Shop" And I own project "Shop"
...@@ -10,5 +10,3 @@ Feature: Dashboard ...@@ -10,5 +10,3 @@ Feature: Dashboard
Scenario: I should see project I am looking for Scenario: I should see project I am looking for
Given I search for "Sho" Given I search for "Sho"
Then I should see "Shop" project link Then I should see "Shop" project link
...@@ -11,7 +11,10 @@ class Dashboard < Spinach::FeatureSteps ...@@ -11,7 +11,10 @@ class Dashboard < Spinach::FeatureSteps
Given 'I search for "Sho"' do Given 'I search for "Sho"' do
fill_in "dashboard_projects_search", with: "Sho" fill_in "dashboard_projects_search", with: "Sho"
click_button "Search"
within ".dashboard-search-filter" do
find('button').click
end
end end
Then 'I should see "Shop" project link' do Then 'I should see "Shop" project link' do
......
...@@ -9,7 +9,8 @@ module SharedProject ...@@ -9,7 +9,8 @@ module SharedProject
# Create a specific project called "Shop" # Create a specific project called "Shop"
And 'I own project "Shop"' do And 'I own project "Shop"' do
@project = create(:project, name: "Shop") @project = Project.find_by_name "Shop"
@project ||= create(:project, name: "Shop")
@project.team << [@user, :master] @project.team << [@user, :master]
end end
......
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