diff options
author | Ciro Santilli <ciro.santilli@gmail.com> | 2014-09-21 23:40:22 +0200 |
---|---|---|
committer | Ciro Santilli <ciro.santilli@gmail.com> | 2014-09-22 10:01:50 +0200 |
commit | ef6e94e37e0fce23acf32992476aeb63405be0c1 (patch) | |
tree | 3cfce6b15bab68f2213850672872de2ce420bae3 /features/steps/dashboard/dashboard.rb | |
parent | fda61a047ffb9b04bc4dd38e897088fde17fb3c1 (diff) | |
download | gitlab-ce-ef6e94e37e0fce23acf32992476aeb63405be0c1.tar.gz |
Replace old spinach step definitions with step.
Diffstat (limited to 'features/steps/dashboard/dashboard.rb')
-rw-r--r-- | features/steps/dashboard/dashboard.rb | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/features/steps/dashboard/dashboard.rb b/features/steps/dashboard/dashboard.rb index 84a480bd7f8..92dd2841004 100644 --- a/features/steps/dashboard/dashboard.rb +++ b/features/steps/dashboard/dashboard.rb @@ -3,31 +3,31 @@ class Dashboard < Spinach::FeatureSteps include SharedPaths include SharedProject - Then 'I should see "New Project" link' do + step 'I should see "New Project" link' do page.should have_link "New project" end - Then 'I should see "Shop" project link' do + step 'I should see "Shop" project link' do page.should have_link "Shop" end - Then 'I should see last push widget' do + step 'I should see last push widget' do page.should have_content "You pushed to fix" page.should have_link "Create Merge Request" end - And 'I click "Create Merge Request" link' do + step 'I click "Create Merge Request" link' do click_link "Create Merge Request" end - Then 'I see prefilled new Merge Request page' do + step 'I see prefilled new Merge Request page' do current_path.should == new_project_merge_request_path(@project) find("#merge_request_target_project_id").value.should == @project.id.to_s find("#merge_request_source_branch").value.should == "fix" find("#merge_request_target_branch").value.should == "master" end - Given 'user with name "John Doe" joined project "Shop"' do + step 'user with name "John Doe" joined project "Shop"' do user = create(:user, {name: "John Doe"}) project.team << [user, :master] Event.create( @@ -37,11 +37,11 @@ class Dashboard < Spinach::FeatureSteps ) end - Then 'I should see "John Doe joined project at Shop" event' do + step 'I should see "John Doe joined project at Shop" event' do page.should have_content "John Doe joined project at #{project.name_with_namespace}" end - And 'user with name "John Doe" left project "Shop"' do + step 'user with name "John Doe" left project "Shop"' do user = User.find_by(name: "John Doe") Event.create( project: project, @@ -50,11 +50,11 @@ class Dashboard < Spinach::FeatureSteps ) end - Then 'I should see "John Doe left project at Shop" event' do + step 'I should see "John Doe left project at Shop" event' do page.should have_content "John Doe left project at #{project.name_with_namespace}" end - And 'I have group with projects' do + step 'I have group with projects' do @group = create(:group) @project = create(:project, namespace: @group) @event = create(:closed_issue_event, project: @project) @@ -62,24 +62,24 @@ class Dashboard < Spinach::FeatureSteps @project.team << [current_user, :master] end - Then 'I should see projects list' do + step 'I should see projects list' do @user.authorized_projects.all.each do |project| page.should have_link project.name_with_namespace end end - Then 'I should see groups list' do + step 'I should see groups list' do Group.all.each do |group| page.should have_link group.name end end - And 'group has a projects that does not belongs to me' do + step 'group has a projects that does not belongs to me' do @forbidden_project1 = create(:project, group: @group) @forbidden_project2 = create(:project, group: @group) end - Then 'I should see 1 project at group list' do + step 'I should see 1 project at group list' do page.find('span.last_activity/span').should have_content('1') end |