diff options
author | Ciro Santilli <ciro.santilli@gmail.com> | 2014-09-22 01:40:22 +0400 |
---|---|---|
committer | Ciro Santilli <ciro.santilli@gmail.com> | 2014-09-22 12:01:50 +0400 |
commit | ef6e94e37e0fce23acf32992476aeb63405be0c1 (patch) | |
tree | 3cfce6b15bab68f2213850672872de2ce420bae3 /features/steps/admin | |
parent | fda61a047ffb9b04bc4dd38e897088fde17fb3c1 (diff) |
Replace old spinach step definitions with step.
Diffstat (limited to 'features/steps/admin')
-rw-r--r-- | features/steps/admin/active_tab.rb | 16 | ||||
-rw-r--r-- | features/steps/admin/groups.rb | 10 | ||||
-rw-r--r-- | features/steps/admin/logs.rb | 2 | ||||
-rw-r--r-- | features/steps/admin/projects.rb | 6 | ||||
-rw-r--r-- | features/steps/admin/users.rb | 12 |
5 files changed, 23 insertions, 23 deletions
diff --git a/features/steps/admin/active_tab.rb b/features/steps/admin/active_tab.rb index 8f09e51ccef..58853361afc 100644 --- a/features/steps/admin/active_tab.rb +++ b/features/steps/admin/active_tab.rb @@ -3,35 +3,35 @@ class AdminActiveTab < Spinach::FeatureSteps include SharedPaths include SharedActiveTab - Then 'the active main tab should be Home' do + step 'the active main tab should be Home' do ensure_active_main_tab('Overview') end - Then 'the active main tab should be Projects' do + step 'the active main tab should be Projects' do ensure_active_main_tab('Projects') end - Then 'the active main tab should be Groups' do + step 'the active main tab should be Groups' do ensure_active_main_tab('Groups') end - Then 'the active main tab should be Users' do + step 'the active main tab should be Users' do ensure_active_main_tab('Users') end - Then 'the active main tab should be Logs' do + step 'the active main tab should be Logs' do ensure_active_main_tab('Logs') end - Then 'the active main tab should be Hooks' do + step 'the active main tab should be Hooks' do ensure_active_main_tab('Hooks') end - Then 'the active main tab should be Resque' do + step 'the active main tab should be Resque' do ensure_active_main_tab('Background Jobs') end - Then 'the active main tab should be Messages' do + step 'the active main tab should be Messages' do ensure_active_main_tab('Messages') end end diff --git a/features/steps/admin/groups.rb b/features/steps/admin/groups.rb index 9c1bcfefb9c..4aa8b0f551d 100644 --- a/features/steps/admin/groups.rb +++ b/features/steps/admin/groups.rb @@ -13,7 +13,7 @@ class AdminGroups < Spinach::FeatureSteps click_link "New Group" end - And 'I have group with projects' do + step 'I have group with projects' do @group = create(:group) @project = create(:project, group: @group) @event = create(:closed_issue_event, project: @project) @@ -21,18 +21,18 @@ class AdminGroups < Spinach::FeatureSteps @project.team << [current_user, :master] end - And 'submit form with new group info' do + step 'submit form with new group info' do fill_in 'group_name', with: 'gitlab' fill_in 'group_description', with: 'Group description' click_button "Create group" end - Then 'I should see newly created group' do + step 'I should see newly created group' do page.should have_content "Group: gitlab" page.should have_content "Group description" end - Then 'I should be redirected to group page' do + step 'I should be redirected to group page' do current_path.should == admin_group_path(Group.last) end @@ -45,7 +45,7 @@ class AdminGroups < Spinach::FeatureSteps click_button "Add users into group" end - Then 'I should see "John Doe" in team list in every project as "Reporter"' do + step 'I should see "John Doe" in team list in every project as "Reporter"' do within ".group-users-list" do page.should have_content "John Doe" page.should have_content "Reporter" diff --git a/features/steps/admin/logs.rb b/features/steps/admin/logs.rb index 83958545c4d..697c96585bf 100644 --- a/features/steps/admin/logs.rb +++ b/features/steps/admin/logs.rb @@ -3,7 +3,7 @@ class AdminLogs < Spinach::FeatureSteps include SharedPaths include SharedAdmin - Then 'I should see tabs with available logs' do + step 'I should see tabs with available logs' do page.should have_content 'production.log' page.should have_content 'githost.log' page.should have_content 'application.log' diff --git a/features/steps/admin/projects.rb b/features/steps/admin/projects.rb index 992aa46a8bc..e0015bfd37c 100644 --- a/features/steps/admin/projects.rb +++ b/features/steps/admin/projects.rb @@ -3,17 +3,17 @@ class AdminProjects < Spinach::FeatureSteps include SharedPaths include SharedAdmin - And 'I should see all projects' do + step 'I should see all projects' do Project.all.each do |p| page.should have_content p.name_with_namespace end end - And 'I click on first project' do + step 'I click on first project' do click_link Project.first.name_with_namespace end - Then 'I should see project details' do + step 'I should see project details' do project = Project.first current_path.should == admin_project_path(project) page.should have_content(project.name_with_namespace) diff --git a/features/steps/admin/users.rb b/features/steps/admin/users.rb index 253c4609e82..6e9b9fce0ee 100644 --- a/features/steps/admin/users.rb +++ b/features/steps/admin/users.rb @@ -3,32 +3,32 @@ class AdminUsers < Spinach::FeatureSteps include SharedPaths include SharedAdmin - Then 'I should see all users' do + step 'I should see all users' do User.all.each do |user| page.should have_content user.name end end - And 'Click edit' do + step 'Click edit' do @user = User.first find("#edit_user_#{@user.id}").click end - And 'Input non ascii char in username' do + step 'Input non ascii char in username' do fill_in 'user_username', with: "\u3042\u3044" end - And 'Click save' do + step 'Click save' do click_button("Save") end - Then 'See username error message' do + step 'See username error message' do within "#error_explanation" do page.should have_content "Username" end end - And 'Not changed form action url' do + step 'Not changed form action url' do page.should have_selector %(form[action="/admin/users/#{@user.username}"]) end |