Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'features/steps/admin')
-rw-r--r--features/steps/admin/active_tab.rb37
-rw-r--r--features/steps/admin/applications.rb55
-rw-r--r--features/steps/admin/broadcast_messages.rb41
-rw-r--r--features/steps/admin/deploy_keys.rb57
-rw-r--r--features/steps/admin/groups.rb85
-rw-r--r--features/steps/admin/logs.rb11
-rw-r--r--features/steps/admin/projects.rb48
-rw-r--r--features/steps/admin/settings.rb47
-rw-r--r--features/steps/admin/users.rb117
9 files changed, 0 insertions, 498 deletions
diff --git a/features/steps/admin/active_tab.rb b/features/steps/admin/active_tab.rb
deleted file mode 100644
index 90d13abdb13..00000000000
--- a/features/steps/admin/active_tab.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-class Spinach::Features::AdminActiveTab < Spinach::FeatureSteps
- include SharedAuthentication
- include SharedPaths
- include SharedActiveTab
-
- step 'the active main tab should be Home' do
- ensure_active_main_tab('Overview')
- end
-
- step 'the active main tab should be Projects' do
- ensure_active_main_tab('Projects')
- end
-
- step 'the active main tab should be Groups' do
- ensure_active_main_tab('Groups')
- end
-
- step 'the active main tab should be Users' do
- ensure_active_main_tab('Users')
- end
-
- step 'the active main tab should be Logs' do
- ensure_active_main_tab('Logs')
- end
-
- step 'the active main tab should be Hooks' do
- ensure_active_main_tab('Hooks')
- end
-
- step 'the active main tab should be Resque' do
- ensure_active_main_tab('Background Jobs')
- end
-
- step 'the active main tab should be Messages' do
- ensure_active_main_tab('Messages')
- end
-end
diff --git a/features/steps/admin/applications.rb b/features/steps/admin/applications.rb
deleted file mode 100644
index d59088fa3c3..00000000000
--- a/features/steps/admin/applications.rb
+++ /dev/null
@@ -1,55 +0,0 @@
-class Spinach::Features::AdminApplications < Spinach::FeatureSteps
- include SharedAuthentication
- include SharedPaths
- include SharedAdmin
-
- step 'I click on new application button' do
- click_on 'New Application'
- end
-
- step 'I should see application form' do
- page.should have_content "New application"
- end
-
- step 'I fill application form out and submit' do
- fill_in :doorkeeper_application_name, with: 'test'
- fill_in :doorkeeper_application_redirect_uri, with: 'https://test.com'
- click_on "Submit"
- end
-
- step 'I see application' do
- page.should have_content "Application: test"
- page.should have_content "Application Id"
- page.should have_content "Secret"
- end
-
- step 'I click edit' do
- click_on "Edit"
- end
-
- step 'I see edit application form' do
- page.should have_content "Edit application"
- end
-
- step 'I change name of application and submit' do
- page.should have_content "Edit application"
- fill_in :doorkeeper_application_name, with: 'test_changed'
- click_on "Submit"
- end
-
- step 'I see that application was changed' do
- page.should have_content "test_changed"
- page.should have_content "Application Id"
- page.should have_content "Secret"
- end
-
- step 'I click to remove application' do
- within '.oauth-applications' do
- click_on "Destroy"
- end
- end
-
- step "I see that application is removed" do
- page.find(".oauth-applications").should_not have_content "test_changed"
- end
-end
diff --git a/features/steps/admin/broadcast_messages.rb b/features/steps/admin/broadcast_messages.rb
deleted file mode 100644
index a35fa34a3a2..00000000000
--- a/features/steps/admin/broadcast_messages.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-class Spinach::Features::AdminBroadcastMessages < Spinach::FeatureSteps
- include SharedAuthentication
- include SharedPaths
- include SharedAdmin
-
- step 'application already has admin messages' do
- FactoryGirl.create(:broadcast_message, message: "Migration to new server")
- end
-
- step 'I should be all broadcast messages' do
- page.should have_content "Migration to new server"
- end
-
- step 'submit form with new broadcast message' do
- fill_in 'broadcast_message_message', with: 'Application update from 4:00 CST to 5:00 CST'
- select '2018', from: "broadcast_message_ends_at_1i"
- click_button "Add broadcast message"
- end
-
- step 'I should be redirected to admin messages page' do
- current_path.should == admin_broadcast_messages_path
- end
-
- step 'I should see newly created broadcast message' do
- page.should have_content 'Application update from 4:00 CST to 5:00 CST'
- end
-
- step 'submit form with new customized broadcast message' do
- fill_in 'broadcast_message_message', with: 'Application update from 4:00 CST to 5:00 CST'
- click_link "Customize colors"
- fill_in 'broadcast_message_color', with: '#f2dede'
- fill_in 'broadcast_message_font', with: '#b94a48'
- select '2018', from: "broadcast_message_ends_at_1i"
- click_button "Add broadcast message"
- end
-
- step 'I should see a customized broadcast message' do
- page.should have_content 'Application update from 4:00 CST to 5:00 CST'
- page.should have_selector %(div[style="background-color:#f2dede;color:#b94a48"])
- end
-end
diff --git a/features/steps/admin/deploy_keys.rb b/features/steps/admin/deploy_keys.rb
deleted file mode 100644
index fb0b611762e..00000000000
--- a/features/steps/admin/deploy_keys.rb
+++ /dev/null
@@ -1,57 +0,0 @@
-class Spinach::Features::AdminDeployKeys < Spinach::FeatureSteps
- include SharedAuthentication
- include SharedPaths
- include SharedAdmin
-
- step 'there are public deploy keys in system' do
- create(:deploy_key, public: true)
- create(:another_deploy_key, public: true)
- end
-
- step 'I should see all public deploy keys' do
- DeployKey.are_public.each do |p|
- page.should have_content p.title
- end
- end
-
- step 'I click on first deploy key' do
- click_link DeployKey.are_public.first.title
- end
-
- step 'I should see deploy key details' do
- deploy_key = DeployKey.are_public.first
- current_path.should == admin_deploy_key_path(deploy_key)
- page.should have_content(deploy_key.title)
- page.should have_content(deploy_key.key)
- end
-
- step 'I visit admin deploy key page' do
- visit admin_deploy_key_path(deploy_key)
- end
-
- step 'I visit admin deploy keys page' do
- visit admin_deploy_keys_path
- end
-
- step 'I click \'New Deploy Key\'' do
- click_link 'New Deploy Key'
- end
-
- step 'I submit new deploy key' do
- fill_in "deploy_key_title", with: "laptop"
- fill_in "deploy_key_key", with: "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAzrEJUIR6Y03TCE9rIJ+GqTBvgb8t1jI9h5UBzCLuK4VawOmkLornPqLDrGbm6tcwM/wBrrLvVOqi2HwmkKEIecVO0a64A4rIYScVsXIniHRS6w5twyn1MD3sIbN+socBDcaldECQa2u1dI3tnNVcs8wi77fiRe7RSxePsJceGoheRQgC8AZ510UdIlO+9rjIHUdVN7LLyz512auAfYsgx1OfablkQ/XJcdEwDNgi9imI6nAXhmoKUm1IPLT2yKajTIC64AjLOnE0YyCh6+7RFMpiMyu1qiOCpdjYwTgBRiciNRZCH8xIedyCoAmiUgkUT40XYHwLuwiPJICpkAzp7Q== user@laptop"
- click_button "Create"
- end
-
- step 'I should be on admin deploy keys page' do
- current_path.should == admin_deploy_keys_path
- end
-
- step 'I should see newly created deploy key' do
- page.should have_content(deploy_key.title)
- end
-
- def deploy_key
- @deploy_key ||= DeployKey.are_public.first
- end
-end
diff --git a/features/steps/admin/groups.rb b/features/steps/admin/groups.rb
deleted file mode 100644
index 721460b9371..00000000000
--- a/features/steps/admin/groups.rb
+++ /dev/null
@@ -1,85 +0,0 @@
-class Spinach::Features::AdminGroups < Spinach::FeatureSteps
- include SharedAuthentication
- include SharedPaths
- include SharedUser
- include SharedActiveTab
- include Select2Helper
-
- When 'I visit admin group page' do
- visit admin_group_path(current_group)
- end
-
- When 'I click new group link' do
- click_link "New Group"
- end
-
- step 'I have group with projects' do
- @group = create(:group)
- @project = create(:project, group: @group)
- @event = create(:closed_issue_event, project: @project)
-
- @project.team << [current_user, :master]
- end
-
- step 'submit form with new group info' do
- fill_in 'group_path', with: 'gitlab'
- fill_in 'group_description', with: 'Group description'
- click_button "Create group"
- end
-
- step 'I should see newly created group' do
- page.should have_content "Group: gitlab"
- page.should have_content "Group description"
- end
-
- step 'I should be redirected to group page' do
- current_path.should == admin_group_path(Group.find_by(path: 'gitlab'))
- end
-
- When 'I select user "John Doe" from user list as "Reporter"' do
- select2(user_john.id, from: "#user_ids", multiple: true)
- within "#new_project_member" do
- select "Reporter", from: "access_level"
- end
- click_button "Add users to group"
- end
-
- 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"
- end
- end
-
- step 'I should be all groups' do
- Group.all.each do |group|
- page.should have_content group.name
- end
- end
-
- step 'we have user "John Doe" in group' do
- current_group.add_user(user_john, Gitlab::Access::REPORTER)
- end
-
- step 'I remove user "John Doe" from group' do
- within "#user_#{user_john.id}" do
- click_link 'Remove user from group'
- end
- end
-
- step 'I should not see "John Doe" in team list' do
- within ".group-users-list" do
- page.should_not have_content "John Doe"
- end
- end
-
- protected
-
- def current_group
- @group ||= Group.first
- end
-
- def user_john
- @user_john ||= User.find_by(name: "John Doe")
- end
-end
diff --git a/features/steps/admin/logs.rb b/features/steps/admin/logs.rb
deleted file mode 100644
index 904e5468655..00000000000
--- a/features/steps/admin/logs.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-class Spinach::Features::AdminLogs < Spinach::FeatureSteps
- include SharedAuthentication
- include SharedPaths
- include SharedAdmin
-
- 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'
- end
-end
diff --git a/features/steps/admin/projects.rb b/features/steps/admin/projects.rb
deleted file mode 100644
index 9be4d39d2d5..00000000000
--- a/features/steps/admin/projects.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-class Spinach::Features::AdminProjects < Spinach::FeatureSteps
- include SharedAuthentication
- include SharedPaths
- include SharedAdmin
-
- step 'I should see all projects' do
- Project.all.each do |p|
- page.should have_content p.name_with_namespace
- end
- end
-
- step 'I click on first project' do
- click_link Project.first.name_with_namespace
- end
-
- step 'I should see project details' do
- project = Project.first
- current_path.should == admin_namespace_project_path(project.namespace, project)
- page.should have_content(project.name_with_namespace)
- page.should have_content(project.creator.name)
- end
-
- step 'I visit admin project page' do
- visit admin_namespace_project_path(project.namespace, project)
- end
-
- step 'I transfer project to group \'Web\'' do
- find(:xpath, "//input[@id='new_namespace_id']").set group.id
- click_button 'Transfer'
- end
-
- step 'group \'Web\'' do
- create(:group, name: 'Web')
- end
-
- step 'I should see project transfered' do
- page.should have_content 'Web / ' + project.name
- page.should have_content 'Namespace: Web'
- end
-
- def project
- @project ||= Project.first
- end
-
- def group
- Group.find_by(name: 'Web')
- end
-end
diff --git a/features/steps/admin/settings.rb b/features/steps/admin/settings.rb
deleted file mode 100644
index 87d4e969ff5..00000000000
--- a/features/steps/admin/settings.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-class Spinach::Features::AdminSettings < Spinach::FeatureSteps
- include SharedAuthentication
- include SharedPaths
- include SharedAdmin
- include Gitlab::CurrentSettings
-
- step 'I modify settings and save form' do
- uncheck 'Gravatar enabled'
- fill_in 'Home page url', with: 'https://about.gitlab.com/'
- click_button 'Save'
- end
-
- step 'I should see application settings saved' do
- current_application_settings.gravatar_enabled.should be_false
- current_application_settings.home_page_url.should == 'https://about.gitlab.com/'
- page.should have_content 'Application settings saved successfully'
- end
-
- step 'I click on "Service Templates"' do
- click_link 'Service Templates'
- end
-
- step 'I click on "Slack" service' do
- click_link 'Slack'
- end
-
- step 'I check all events and submit form' do
- page.check('Active')
- page.check('Push events')
- page.check('Tag push events')
- page.check('Comments')
- page.check('Issues events')
- page.check('Merge Request events')
- fill_in 'Webhook', with: "http://localhost"
- click_on 'Save'
- end
-
- step 'I should see service template settings saved' do
- page.should have_content 'Application settings saved successfully'
- end
-
- step 'I should see all checkboxes checked' do
- all('input[type=checkbox]').each do |checkbox|
- checkbox.should be_checked
- end
- end
-end
diff --git a/features/steps/admin/users.rb b/features/steps/admin/users.rb
deleted file mode 100644
index e1383097248..00000000000
--- a/features/steps/admin/users.rb
+++ /dev/null
@@ -1,117 +0,0 @@
-class Spinach::Features::AdminUsers < Spinach::FeatureSteps
- include SharedAuthentication
- include SharedPaths
- include SharedAdmin
-
- step 'I should see all users' do
- User.all.each do |user|
- page.should have_content user.name
- end
- end
-
- step 'Click edit' do
- @user = User.first
- find("#edit_user_#{@user.id}").click
- end
-
- step 'Input non ascii char in username' do
- fill_in 'user_username', with: "\u3042\u3044"
- end
-
- step 'Click save' do
- click_button("Save")
- end
-
- step 'See username error message' do
- within "#error_explanation" do
- page.should have_content "Username"
- end
- end
-
- step 'Not changed form action url' do
- page.should have_selector %(form[action="/admin/users/#{@user.username}"])
- end
-
- step 'I submit modified user' do
- check :user_can_create_group
- click_button 'Save'
- end
-
- step 'I see user attributes changed' do
- page.should have_content 'Can create groups: Yes'
- end
-
- step 'click edit on my user' do
- find("#edit_user_#{current_user.id}").click
- end
-
- step 'I view the user with secondary email' do
- @user_with_secondary_email = User.last
- @user_with_secondary_email.emails.new(email: "secondary@example.com")
- @user_with_secondary_email.save
- visit "/admin/users/#{@user_with_secondary_email.username}"
- end
-
- step 'I see the secondary email' do
- page.should have_content "Secondary email: #{@user_with_secondary_email.emails.last.email}"
- end
-
- step 'I click remove secondary email' do
- find("#remove_email_#{@user_with_secondary_email.emails.last.id}").click
- end
-
- step 'I should not see secondary email anymore' do
- page.should_not have_content "Secondary email:"
- end
-
- step 'user "Mike" with groups and projects' do
- user = create(:user, name: 'Mike')
-
- project = create(:empty_project)
- project.team << [user, :developer]
-
- group = create(:group)
- group.add_user(user, Gitlab::Access::DEVELOPER)
- end
-
- step 'click on "Mike" link' do
- click_link "Mike"
- end
-
- step 'I should see user "Mike" details' do
- page.should have_content 'Account'
- page.should have_content 'Personal projects limit'
- end
-
- step 'user "Pete" with ssh keys' do
- user = create(:user, name: 'Pete')
- create(:key, user: user, title: "ssh-rsa Key1", key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4FIEBXGi4bPU8kzxMefudPIJ08/gNprdNTaO9BR/ndy3+58s2HCTw2xCHcsuBmq+TsAqgEidVq4skpqoTMB+Uot5Uzp9z4764rc48dZiI661izoREoKnuRQSsRqUTHg5wrLzwxlQbl1MVfRWQpqiz/5KjBC7yLEb9AbusjnWBk8wvC1bQPQ1uLAauEA7d836tgaIsym9BrLsMVnR4P1boWD3Xp1B1T/ImJwAGHvRmP/ycIqmKdSpMdJXwxcb40efWVj0Ibbe7ii9eeoLdHACqevUZi6fwfbymdow+FeqlkPoHyGg3Cu4vD/D8+8cRc7mE/zGCWcQ15Var83Tczour Key1")
- create(:key, user: user, title: "ssh-rsa Key2", key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQSTWXhJAX/He+nG78MiRRRn7m0Pb0XbcgTxE0etArgoFoh9WtvDf36HG6tOSg/0UUNcp0dICsNAmhBKdncp6cIyPaXJTURPRAGvhI0/VDk4bi27bRnccGbJ/hDaUxZMLhhrzY0r22mjVf8PF6dvv5QUIQVm1/LeaWYsHHvLgiIjwrXirUZPnFrZw6VLREoBKG8uWvfSXw1L5eapmstqfsME8099oi+vWLR8MgEysZQmD28M73fgW4zek6LDQzKQyJx9nB+hJkKUDvcuziZjGmRFlNgSA2mguERwL1OXonD8WYUrBDGKroIvBT39zS5d9tQDnidEJZ9Y8gv5ViYP7x Key2")
- end
-
- step 'click on user "Pete"' do
- click_link 'Pete'
- end
-
- step 'I should see key list' do
- page.should have_content 'ssh-rsa Key2'
- page.should have_content 'ssh-rsa Key1'
- end
-
- step 'I click on the key title' do
- click_link 'ssh-rsa Key2'
- end
-
- step 'I should see key details' do
- page.should have_content 'ssh-rsa Key2'
- page.should have_content 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQSTWXhJAX/He+nG78MiRRRn7m0Pb0XbcgTxE0etArgoFoh9WtvDf36HG6tOSg/0UUNcp0dICsNAmhBKdncp6cIyPaXJTURPRAGvhI0/VDk4bi27bRnccGbJ/hDaUxZMLhhrzY0r22mjVf8PF6dvv5QUIQVm1/LeaWYsHHvLgiIjwrXirUZPnFrZw6VLREoBKG8uWvfSXw1L5eapmstqfsME8099oi+vWLR8MgEysZQmD28M73fgW4zek6LDQzKQyJx9nB+hJkKUDvcuziZjGmRFlNgSA2mguERwL1OXonD8WYUrBDGKroIvBT39zS5d9tQDnidEJZ9Y8gv5ViYP7x Key2'
- end
-
- step 'I click on remove key' do
- click_link 'Remove'
- end
-
- step 'I should see the key removed' do
- page.should_not have_content 'ssh-rsa Key2'
- end
-end