diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-22 21:56:12 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-22 21:56:12 +0400 |
commit | c31c8c55a4b805932ff24e08dc4cdacb497b1a82 (patch) | |
tree | f4654ca2c6872015fb1346f5318c9c2d5140e18d /features/steps/dashboard | |
parent | fbdf34d7abc678435ab4a603e93dcc83cb89a981 (diff) | |
parent | ef6e94e37e0fce23acf32992476aeb63405be0c1 (diff) |
Merge branch 'spinach-step' of https://github.com/cirosantilli/gitlabhq into cirosantilli-spinach-step
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Conflicts:
features/steps/project/markdown_render.rb
Diffstat (limited to 'features/steps/dashboard')
-rw-r--r-- | features/steps/dashboard/dashboard.rb | 28 | ||||
-rw-r--r-- | features/steps/dashboard/event_filters.rb | 18 | ||||
-rw-r--r-- | features/steps/dashboard/projects.rb | 2 | ||||
-rw-r--r-- | features/steps/dashboard/with_archived_projects.rb | 6 |
4 files changed, 27 insertions, 27 deletions
diff --git a/features/steps/dashboard/dashboard.rb b/features/steps/dashboard/dashboard.rb index 13635598fd4..eb735d9b567 100644 --- a/features/steps/dashboard/dashboard.rb +++ b/features/steps/dashboard/dashboard.rb @@ -3,31 +3,31 @@ class Spinach::Features::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 Spinach::Features::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 Spinach::Features::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 Spinach::Features::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 diff --git a/features/steps/dashboard/event_filters.rb b/features/steps/dashboard/event_filters.rb index a16cda064c7..332bfa95d97 100644 --- a/features/steps/dashboard/event_filters.rb +++ b/features/steps/dashboard/event_filters.rb @@ -3,31 +3,31 @@ class Spinach::Features::EventFilters < Spinach::FeatureSteps include SharedPaths include SharedProject - Then 'I should see push event' do + step 'I should see push event' do page.should have_selector('span.pushed') end - Then 'I should not see push event' do + step 'I should not see push event' do page.should_not have_selector('span.pushed') end - Then 'I should see new member event' do + step 'I should see new member event' do page.should have_selector('span.joined') end - And 'I should not see new member event' do + step 'I should not see new member event' do page.should_not have_selector('span.joined') end - Then 'I should see merge request event' do + step 'I should see merge request event' do page.should have_selector('span.accepted') end - And 'I should not see merge request event' do + step 'I should not see merge request event' do page.should_not have_selector('span.accepted') end - And 'this project has push event' do + step 'this project has push event' do data = { before: "0000000000000000000000000000000000000000", after: "0220c11b9a3e6c69dc8fd35321254ca9a7b98f7e", @@ -51,7 +51,7 @@ class Spinach::Features::EventFilters < Spinach::FeatureSteps ) end - And 'this project has new member event' do + step 'this project has new member event' do user = create(:user, {name: "John Doe"}) Event.create( project: @project, @@ -60,7 +60,7 @@ class Spinach::Features::EventFilters < Spinach::FeatureSteps ) end - And 'this project has merge request event' do + step 'this project has merge request event' do merge_request = create :merge_request, author: @user, source_project: @project, target_project: @project Event.create( project: @project, diff --git a/features/steps/dashboard/projects.rb b/features/steps/dashboard/projects.rb index 40526660beb..2a348163060 100644 --- a/features/steps/dashboard/projects.rb +++ b/features/steps/dashboard/projects.rb @@ -3,7 +3,7 @@ class Spinach::Features::DashboardProjects < Spinach::FeatureSteps include SharedPaths include SharedProject - 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 diff --git a/features/steps/dashboard/with_archived_projects.rb b/features/steps/dashboard/with_archived_projects.rb index 0217a2a1c1d..256629382a7 100644 --- a/features/steps/dashboard/with_archived_projects.rb +++ b/features/steps/dashboard/with_archived_projects.rb @@ -8,15 +8,15 @@ class Spinach::Features::DashboardWithArchivedProjects < Spinach::FeatureSteps project.update_attribute(:archived, true) 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 not see "Forum" project link' do + step 'I should not see "Forum" project link' do page.should_not have_link "Forum" end - Then 'I should see "Forum" project link' do + step 'I should see "Forum" project link' do page.should have_link "Forum" end end |