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:
authorLin Jen-Shin <godfat@godfat.org>2016-12-20 15:54:40 +0300
committerLin Jen-Shin <godfat@godfat.org>2016-12-20 15:54:40 +0300
commit0f0738e78867f6822dd15cb26da1f17628acde77 (patch)
tree0813c71b448d149afad6802e25c56a219efb0523 /features
parenteb839b9af51d411a6a35786a1c1c58954da1a650 (diff)
parentad1a1d976c877eca16858368db0c5b3ef800db8b (diff)
Merge remote-tracking branch 'upstream/master' into feature/1376-allow-write-access-deploy-keys
* upstream/master: (538 commits) Reject blank environment vcariables in Gitlab::Git::RevList Add online terminal documentation Add changelog entry Add terminal UI and controller actions Fix specs Even out padding on plus button in breadcrumb menu Update font size of detail page header to 14px Update CHANGELOG.md for 8.13.10 Update CHANGELOG.md for 8.14.5 Fix Route#rename_children behavior Remove inline-block styling from status Add terminals to the Kubernetes deployment service Add a ReactiveCaching concern for use in the KubernetesService Add xterm.js 2.1.0 and a wrapper class to the asset pipeline Remove unnecessary hidden svg elements for icons. Fix consistent typo in environment.js Use a block to insert extra check for authenticate_build! Align milestone column header with count number Add Wiki import to BB importer Make CI badge hitboxes better match container ...
Diffstat (limited to 'features')
-rw-r--r--features/admin/active_tab.feature54
-rw-r--r--features/admin/appearance.feature37
-rw-r--r--features/admin/applications.feature18
-rw-r--r--features/admin/broadcast_messages.feature33
-rw-r--r--features/admin/labels.feature38
-rw-r--r--features/admin/projects.feature47
-rw-r--r--features/admin/settings.feature19
-rw-r--r--features/project/service.feature8
-rw-r--r--features/steps/admin/active_tab.rb41
-rw-r--r--features/steps/admin/appearance.rb72
-rw-r--r--features/steps/admin/applications.rb55
-rw-r--r--features/steps/admin/broadcast_messages.rb66
-rw-r--r--features/steps/admin/labels.rb117
-rw-r--r--features/steps/admin/projects.rb104
-rw-r--r--features/steps/admin/settings.rb62
-rw-r--r--features/steps/group/milestones.rb2
-rw-r--r--features/steps/project/services.rb8
-rw-r--r--features/steps/project/snippets.rb2
-rw-r--r--features/steps/shared/authentication.rb2
-rw-r--r--features/steps/shared/paths.rb14
20 files changed, 13 insertions, 786 deletions
diff --git a/features/admin/active_tab.feature b/features/admin/active_tab.feature
deleted file mode 100644
index f5bb06dea7d..00000000000
--- a/features/admin/active_tab.feature
+++ /dev/null
@@ -1,54 +0,0 @@
-@admin
-Feature: Admin Active Tab
- Background:
- Given I sign in as an admin
-
- Scenario: On Admin Home
- Given I visit admin page
- Then the active main tab should be Overview
- And no other main tabs should be active
-
- Scenario: On Admin Projects
- Given I visit admin projects page
- Then the active main tab should be Overview
- And the active sub tab should be Projects
- And no other main tabs should be active
- And no other sub tabs should be active
-
- Scenario: On Admin Groups
- Given I visit admin groups page
- Then the active main tab should be Overview
- And the active sub tab should be Groups
- And no other main tabs should be active
- And no other sub tabs should be active
-
- Scenario: On Admin Users
- Given I visit admin users page
- Then the active main tab should be Overview
- And the active sub tab should be Users
- And no other main tabs should be active
- And no other sub tabs should be active
-
- Scenario: On Admin Logs
- Given I visit admin logs page
- Then the active main tab should be Monitoring
- And the active sub tab should be Logs
- And no other main tabs should be active
- And no other sub tabs should be active
-
- Scenario: On Admin Messages
- Given I visit admin messages page
- Then the active main tab should be Messages
- And no other main tabs should be active
-
- Scenario: On Admin Hooks
- Given I visit admin hooks page
- Then the active main tab should be Hooks
- And no other main tabs should be active
-
- Scenario: On Admin Resque
- Given I visit admin Resque page
- Then the active main tab should be Monitoring
- And the active sub tab should be Resque
- And no other main tabs should be active
- And no other sub tabs should be active
diff --git a/features/admin/appearance.feature b/features/admin/appearance.feature
deleted file mode 100644
index 5c1dd7531c1..00000000000
--- a/features/admin/appearance.feature
+++ /dev/null
@@ -1,37 +0,0 @@
-Feature: Admin Appearance
- Scenario: Create new appearance
- Given I sign in as an admin
- And I visit admin appearance page
- When submit form with new appearance
- Then I should be redirected to admin appearance page
- And I should see newly created appearance
-
- Scenario: Preview appearance
- Given application has custom appearance
- And I sign in as an admin
- When I visit admin appearance page
- And I click preview button
- Then I should see a customized appearance
-
- Scenario: Custom sign-in page
- Given application has custom appearance
- When I visit login page
- Then I should see a customized appearance
-
- Scenario: Appearance logo
- Given application has custom appearance
- And I sign in as an admin
- And I visit admin appearance page
- When I attach a logo
- Then I should see a logo
- And I remove the logo
- Then I should see logo removed
-
- Scenario: Header logos
- Given application has custom appearance
- And I sign in as an admin
- And I visit admin appearance page
- When I attach header logos
- Then I should see header logos
- And I remove the header logos
- Then I should see header logos removed
diff --git a/features/admin/applications.feature b/features/admin/applications.feature
deleted file mode 100644
index 2a00e1666c0..00000000000
--- a/features/admin/applications.feature
+++ /dev/null
@@ -1,18 +0,0 @@
-@admin
-Feature: Admin Applications
- Background:
- Given I sign in as an admin
- And I visit applications page
-
- Scenario: I can manage application
- Then I click on new application button
- And I should see application form
- Then I fill application form out and submit
- And I see application
- Then I click edit
- And I see edit application form
- Then I change name of application and submit
- And I see that application was changed
- Then I visit applications page
- And I click to remove application
- Then I see that application is removed \ No newline at end of file
diff --git a/features/admin/broadcast_messages.feature b/features/admin/broadcast_messages.feature
deleted file mode 100644
index 4f9c651561e..00000000000
--- a/features/admin/broadcast_messages.feature
+++ /dev/null
@@ -1,33 +0,0 @@
-@admin
-Feature: Admin Broadcast Messages
- Background:
- Given I sign in as an admin
- And application already has a broadcast message
- And I visit admin messages page
-
- Scenario: See broadcast messages list
- Then I should see all broadcast messages
-
- Scenario: Create a customized broadcast message
- When submit form with new customized broadcast message
- Then I should be redirected to admin messages page
- And I should see newly created broadcast message
- Then I visit dashboard page
- And I should see a customized broadcast message
-
- Scenario: Edit an existing broadcast message
- When I edit an existing broadcast message
- And I change the broadcast message text
- Then I should be redirected to admin messages page
- And I should see the updated broadcast message
-
- Scenario: Remove an existing broadcast message
- When I remove an existing broadcast message
- Then I should be redirected to admin messages page
- And I should not see the removed broadcast message
-
- @javascript
- Scenario: Live preview a customized broadcast message
- When I visit admin messages page
- And I enter a broadcast message with Markdown
- Then I should see a live preview of the rendered broadcast message
diff --git a/features/admin/labels.feature b/features/admin/labels.feature
deleted file mode 100644
index 1af0e700bd4..00000000000
--- a/features/admin/labels.feature
+++ /dev/null
@@ -1,38 +0,0 @@
-Feature: Admin Issues Labels
- Background:
- Given I sign in as an admin
- And I have labels: "bug", "feature", "enhancement"
- Given I visit admin labels page
-
- Scenario: I should see labels list
- Then I should see label 'bug'
- And I should see label 'feature'
-
- Scenario: I create new label
- Given I submit new label 'support'
- Then I should see label 'support'
-
- Scenario: I edit label
- Given I visit 'bug' label edit page
- When I change label 'bug' to 'fix'
- Then I should not see label 'bug'
- Then I should see label 'fix'
-
- Scenario: I remove label
- When I remove label 'bug'
- Then I should not see label 'bug'
-
- @javascript
- Scenario: I delete all labels
- When I delete all labels
- Then I should see labels help message
-
- Scenario: I create a label with invalid color
- Given I visit admin new label page
- When I submit new label with invalid color
- Then I should see label color error message
-
- Scenario: I create a label that already exists
- Given I visit admin new label page
- When I submit new label 'bug'
- Then I should see label exist error message
diff --git a/features/admin/projects.feature b/features/admin/projects.feature
deleted file mode 100644
index 8929bcf8d80..00000000000
--- a/features/admin/projects.feature
+++ /dev/null
@@ -1,47 +0,0 @@
-@admin
-Feature: Admin Projects
- Background:
- Given I sign in as an admin
- And there are projects in system
-
- Scenario: I should see non-archived projects in the list
- Given archived project "Archive"
- When I visit admin projects page
- Then I should see all non-archived projects
- And I should not see project "Archive"
-
- @javascript
- Scenario: I should see all projects in the list
- Given archived project "Archive"
- When I visit admin projects page
- And I select "Show archived projects"
- Then I should see all projects
- And I should see "archived" label
-
- Scenario: Projects show
- When I visit admin projects page
- And I click on first project
- Then I should see project details
-
- @javascript
- Scenario: Transfer project
- Given group 'Web'
- And I visit admin project page
- When I transfer project to group 'Web'
- Then I should see project transfered
-
- @javascript
- Scenario: Signed in admin should be able to add himself to a project
- Given "John Doe" owns private project "Enterprise"
- When I visit project "Enterprise" members page
- When I select current user as "Developer"
- Then I should see current user as "Developer"
-
- @javascript
- Scenario: Signed in admin should be able to remove himself from a project
- Given "John Doe" owns private project "Enterprise"
- And current user is developer of project "Enterprise"
- When I visit project "Enterprise" members page
- Then I should see current user as "Developer"
- When I click on the "Remove User From Project" button for current user
- Then I should not see current user as "Developer"
diff --git a/features/admin/settings.feature b/features/admin/settings.feature
deleted file mode 100644
index e38eea2cfed..00000000000
--- a/features/admin/settings.feature
+++ /dev/null
@@ -1,19 +0,0 @@
-@admin
-Feature: Admin Settings
- Background:
- Given I sign in as an admin
- And I visit admin settings page
-
- Scenario: Change application settings
- When I modify settings and save form
- Then I should see application settings saved
-
- Scenario: Change Slack Service Template settings
- When I click on "Service Templates"
- And I click on "Slack" service
- And I fill out Slack settings
- Then I check all events and submit form
- And I should see service template settings saved
- Then I click on "Slack" service
- And I should see all checkboxes checked
- And I should see Slack settings saved
diff --git a/features/project/service.feature b/features/project/service.feature
index 3a7b8308524..cce5f58adec 100644
--- a/features/project/service.feature
+++ b/features/project/service.feature
@@ -37,11 +37,11 @@ Feature: Project Services
And I fill Assembla settings
Then I should see Assembla service settings saved
- Scenario: Activate Slack service
+ Scenario: Activate Slack notifications service
When I visit project "Shop" services page
- And I click Slack service link
- And I fill Slack settings
- Then I should see Slack service settings saved
+ And I click Slack notifications service link
+ And I fill Slack notifications settings
+ Then I should see Slack Notifications service settings saved
Scenario: Activate Pushover service
When I visit project "Shop" services page
diff --git a/features/steps/admin/active_tab.rb b/features/steps/admin/active_tab.rb
deleted file mode 100644
index 9b1689a8198..00000000000
--- a/features/steps/admin/active_tab.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-class Spinach::Features::AdminActiveTab < Spinach::FeatureSteps
- include SharedAuthentication
- include SharedPaths
- include SharedActiveTab
-
- step 'the active main tab should be Overview' do
- ensure_active_main_tab('Overview')
- end
-
- step 'the active sub tab should be Projects' do
- ensure_active_sub_tab('Projects')
- end
-
- step 'the active sub tab should be Groups' do
- ensure_active_sub_tab('Groups')
- end
-
- step 'the active sub tab should be Users' do
- ensure_active_sub_tab('Users')
- end
-
- step 'the active main tab should be Hooks' do
- ensure_active_main_tab('Hooks')
- end
-
- step 'the active main tab should be Monitoring' do
- ensure_active_main_tab('Monitoring')
- end
-
- step 'the active sub tab should be Resque' do
- ensure_active_sub_tab('Background Jobs')
- end
-
- step 'the active sub tab should be Logs' do
- ensure_active_sub_tab('Logs')
- end
-
- step 'the active main tab should be Messages' do
- ensure_active_main_tab('Messages')
- end
-end
diff --git a/features/steps/admin/appearance.rb b/features/steps/admin/appearance.rb
deleted file mode 100644
index 0d1be46d11d..00000000000
--- a/features/steps/admin/appearance.rb
+++ /dev/null
@@ -1,72 +0,0 @@
-class Spinach::Features::AdminAppearance < Spinach::FeatureSteps
- include SharedAuthentication
- include SharedPaths
-
- step 'submit form with new appearance' do
- fill_in 'appearance_title', with: 'MyCompany'
- fill_in 'appearance_description', with: 'dev server'
- click_button 'Save'
- end
-
- step 'I should be redirected to admin appearance page' do
- expect(current_path).to eq admin_appearances_path
- expect(page).to have_content 'Appearance settings'
- end
-
- step 'I should see newly created appearance' do
- expect(page).to have_field('appearance_title', with: 'MyCompany')
- expect(page).to have_field('appearance_description', with: 'dev server')
- expect(page).to have_content 'Last edit'
- end
-
- step 'I click preview button' do
- click_link "Preview"
- end
-
- step 'application has custom appearance' do
- create(:appearance)
- end
-
- step 'I should see a customized appearance' do
- expect(page).to have_content appearance.title
- expect(page).to have_content appearance.description
- end
-
- step 'I attach a logo' do
- attach_file(:appearance_logo, Rails.root.join('spec', 'fixtures', 'dk.png'))
- click_button 'Save'
- end
-
- step 'I attach header logos' do
- attach_file(:appearance_header_logo, Rails.root.join('spec', 'fixtures', 'dk.png'))
- click_button 'Save'
- end
-
- step 'I should see a logo' do
- expect(page).to have_xpath('//img[@src="/uploads/appearance/logo/1/dk.png"]')
- end
-
- step 'I should see header logos' do
- expect(page).to have_xpath('//img[@src="/uploads/appearance/header_logo/1/dk.png"]')
- end
-
- step 'I remove the logo' do
- click_link 'Remove logo'
- end
-
- step 'I remove the header logos' do
- click_link 'Remove header logo'
- end
-
- step 'I should see logo removed' do
- expect(page).not_to have_xpath('//img[@src="/uploads/appearance/logo/1/gitlab_logo.png"]')
- end
-
- step 'I should see header logos removed' do
- expect(page).not_to have_xpath('//img[@src="/uploads/appearance/header_logo/1/header_logo_light.png"]')
- end
-
- def appearance
- Appearance.last
- end
-end
diff --git a/features/steps/admin/applications.rb b/features/steps/admin/applications.rb
deleted file mode 100644
index 7c12cb96921..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
- expect(page).to 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
- expect(page).to have_content "Application: test"
- expect(page).to have_content "Application Id"
- expect(page).to have_content "Secret"
- end
-
- step 'I click edit' do
- click_on "Edit"
- end
-
- step 'I see edit application form' do
- expect(page).to have_content "Edit application"
- end
-
- step 'I change name of application and submit' do
- expect(page).to have_content "Edit application"
- fill_in :doorkeeper_application_name, with: 'test_changed'
- click_on "Submit"
- end
-
- step 'I see that application was changed' do
- expect(page).to have_content "test_changed"
- expect(page).to have_content "Application Id"
- expect(page).to have_content "Secret"
- end
-
- step 'I click to remove application' do
- page.within '.oauth-applications' do
- click_on "Destroy"
- end
- end
-
- step "I see that application is removed" do
- expect(page.find(".oauth-applications")).not_to 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 af2b4a29313..00000000000
--- a/features/steps/admin/broadcast_messages.rb
+++ /dev/null
@@ -1,66 +0,0 @@
-class Spinach::Features::AdminBroadcastMessages < Spinach::FeatureSteps
- include SharedAuthentication
- include SharedPaths
-
- step 'application already has a broadcast message' do
- FactoryGirl.create(:broadcast_message, :expired, message: "Migration to new server")
- end
-
- step 'I should see all broadcast messages' do
- expect(page).to have_content "Migration to new server"
- end
-
- step 'I should be redirected to admin messages page' do
- expect(current_path).to eq admin_broadcast_messages_path
- end
-
- step 'I should see newly created broadcast message' do
- expect(page).to 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**'
- fill_in 'broadcast_message_color', with: '#f2dede'
- fill_in 'broadcast_message_font', with: '#b94a48'
- select Date.today.next_year.year, from: "broadcast_message_ends_at_1i"
- click_button "Add broadcast message"
- end
-
- step 'I should see a customized broadcast message' do
- expect(page).to have_content 'Application update from 4:00 CST to 5:00 CST'
- expect(page).to have_selector 'strong', text: '4:00 CST to 5:00 CST'
- expect(page).to have_selector %(div[style="background-color: #f2dede; color: #b94a48"])
- end
-
- step 'I edit an existing broadcast message' do
- click_link 'Edit'
- end
-
- step 'I change the broadcast message text' do
- fill_in 'broadcast_message_message', with: 'Application update RIGHT NOW'
- click_button 'Update broadcast message'
- end
-
- step 'I should see the updated broadcast message' do
- expect(page).to have_content "Application update RIGHT NOW"
- end
-
- step 'I remove an existing broadcast message' do
- click_link 'Remove'
- end
-
- step 'I should not see the removed broadcast message' do
- expect(page).not_to have_content 'Migration to new server'
- end
-
- step 'I enter a broadcast message with Markdown' do
- fill_in 'broadcast_message_message', with: "Live **Markdown** previews. :tada:"
- end
-
- step 'I should see a live preview of the rendered broadcast message' do
- page.within('.broadcast-message-preview') do
- expect(page).to have_selector('strong', text: 'Markdown')
- expect(page).to have_selector('img.emoji')
- end
- end
-end
diff --git a/features/steps/admin/labels.rb b/features/steps/admin/labels.rb
deleted file mode 100644
index 55ddcc25085..00000000000
--- a/features/steps/admin/labels.rb
+++ /dev/null
@@ -1,117 +0,0 @@
-class Spinach::Features::AdminIssuesLabels < Spinach::FeatureSteps
- include SharedAuthentication
- include SharedProject
- include SharedPaths
-
- step 'I visit \'bug\' label edit page' do
- visit edit_admin_label_path(bug_label)
- end
-
- step 'I visit admin new label page' do
- visit new_admin_label_path
- end
-
- step 'I visit admin labels page' do
- visit admin_labels_path
- end
-
- step 'I remove label \'bug\'' do
- page.within "#label_#{bug_label.id}" do
- click_link 'Delete'
- end
- end
-
- step 'I have labels: "bug", "feature", "enhancement"' do
- ["bug", "feature", "enhancement"].each do |title|
- Label.create(title: title, template: true)
- end
- end
-
- step 'I delete all labels' do
- page.within '.labels' do
- page.all('.btn-remove').each do |remove|
- remove.click
- sleep 0.05
- end
- end
- end
-
- step 'I should see labels help message' do
- page.within '.labels' do
- expect(page).to have_content 'There are no labels yet'
- end
- end
-
- step 'I submit new label \'support\'' do
- visit new_admin_label_path
- fill_in 'Title', with: 'support'
- fill_in 'Background color', with: '#F95610'
- click_button 'Save'
- end
-
- step 'I submit new label \'bug\'' do
- visit new_admin_label_path
- fill_in 'Title', with: 'bug'
- fill_in 'Background color', with: '#F95610'
- click_button 'Save'
- end
-
- step 'I submit new label with invalid color' do
- visit new_admin_label_path
- fill_in 'Title', with: 'support'
- fill_in 'Background color', with: '#12'
- click_button 'Save'
- end
-
- step 'I should see label exist error message' do
- page.within '.label-form' do
- expect(page).to have_content 'Title has already been taken'
- end
- end
-
- step 'I should see label color error message' do
- page.within '.label-form' do
- expect(page).to have_content 'Color must be a valid color code'
- end
- end
-
- step 'I should see label \'feature\'' do
- page.within '.manage-labels-list' do
- expect(page).to have_content 'feature'
- end
- end
-
- step 'I should see label \'bug\'' do
- page.within '.manage-labels-list' do
- expect(page).to have_content 'bug'
- end
- end
-
- step 'I should not see label \'bug\'' do
- page.within '.manage-labels-list' do
- expect(page).not_to have_content 'bug'
- end
- end
-
- step 'I should see label \'support\'' do
- page.within '.manage-labels-list' do
- expect(page).to have_content 'support'
- end
- end
-
- step 'I change label \'bug\' to \'fix\'' do
- fill_in 'Title', with: 'fix'
- fill_in 'Background color', with: '#F15610'
- click_button 'Save'
- end
-
- step 'I should see label \'fix\'' do
- page.within '.manage-labels-list' do
- expect(page).to have_content 'fix'
- end
- end
-
- def bug_label
- Label.templates.find_or_create_by(title: 'bug')
- end
-end
diff --git a/features/steps/admin/projects.rb b/features/steps/admin/projects.rb
deleted file mode 100644
index 2b8cd030ace..00000000000
--- a/features/steps/admin/projects.rb
+++ /dev/null
@@ -1,104 +0,0 @@
-class Spinach::Features::AdminProjects < Spinach::FeatureSteps
- include SharedAuthentication
- include SharedPaths
- include SharedAdmin
- include SharedProject
- include SharedUser
- include Select2Helper
-
- step 'I should see all non-archived projects' do
- Project.non_archived.each do |p|
- expect(page).to have_content p.name_with_namespace
- end
- end
-
- step 'I should see all projects' do
- Project.all.each do |p|
- expect(page).to have_content p.name_with_namespace
- end
- end
-
- step 'I select "Show archived projects"' do
- find(:css, '#sort-projects-dropdown').click
- click_link 'Show archived projects'
- end
-
- step 'I should see "archived" label' do
- expect(page).to have_xpath("//span[@class='label label-warning']", text: 'archived')
- 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
- expect(current_path).to eq admin_namespace_project_path(project.namespace, project)
- expect(page).to have_content(project.name_with_namespace)
- expect(page).to 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
- allow_any_instance_of(Projects::TransferService).
- to receive(:move_uploads_to_new_namespace).and_return(true)
- click_button 'Search for Namespace'
- click_link 'group: web'
- click_button 'Transfer'
- end
-
- step 'group \'Web\'' do
- create(:group, name: 'Web')
- end
-
- step 'I should see project transfered' do
- expect(page).to have_content 'Web / ' + project.name
- expect(page).to have_content 'Namespace: Web'
- end
-
- step 'I visit project "Enterprise" members page' do
- project = Project.find_by!(name: "Enterprise")
- visit namespace_project_project_members_path(project.namespace, project)
- end
-
- step 'I select current user as "Developer"' do
- page.within ".users-project-form" do
- select2(current_user.id, from: "#user_ids", multiple: true)
- select "Developer", from: "access_level"
- end
-
- click_button "Add to project"
- end
-
- step 'I should see current user as "Developer"' do
- page.within '.content-list' do
- expect(page).to have_content(current_user.name)
- expect(page).to have_content('Developer')
- end
- end
-
- step 'current user is developer of project "Enterprise"' do
- project = Project.find_by!(name: "Enterprise")
- project.team << [current_user, :developer]
- end
-
- step 'I click on the "Remove User From Project" button for current user' do
- find(:css, 'li', text: current_user.name).find(:css, 'a.btn-remove').click
- # poltergeist always confirms popups.
- end
-
- step 'I should not see current_user as "Developer"' do
- expect(page).not_to have_selector(:css, '.content-list')
- 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 11dc7f580f0..00000000000
--- a/features/steps/admin/settings.rb
+++ /dev/null
@@ -1,62 +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/'
- fill_in 'Help page text', with: 'Example text'
- click_button 'Save'
- end
-
- step 'I should see application settings saved' do
- expect(current_application_settings.gravatar_enabled).to be_falsey
- expect(current_application_settings.home_page_url).to eq "https://about.gitlab.com/"
- expect(page).to 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')
- page.check('Tag push')
- page.check('Note')
- page.check('Issue')
- page.check('Merge request')
- page.check('Build')
- page.check('Pipeline')
- click_on 'Save'
- end
-
- step 'I fill out Slack settings' do
- fill_in 'Webhook', with: 'http://localhost'
- fill_in 'Username', with: 'test_user'
- fill_in 'service_push_channel', with: '#test_channel'
- page.check('Notify only broken builds')
- end
-
- step 'I should see service template settings saved' do
- expect(page).to have_content 'Application settings saved successfully'
- end
-
- step 'I should see all checkboxes checked' do
- page.all('input[type=checkbox]').each do |checkbox|
- expect(checkbox).to be_checked
- end
- end
-
- step 'I should see Slack settings saved' do
- expect(find_field('Webhook').value).to eq 'http://localhost'
- expect(find_field('Username').value).to eq 'test_user'
- expect(find('#service_push_channel').value).to eq '#test_channel'
- end
-end
diff --git a/features/steps/group/milestones.rb b/features/steps/group/milestones.rb
index f5fddab357d..c1d1eca9116 100644
--- a/features/steps/group/milestones.rb
+++ b/features/steps/group/milestones.rb
@@ -131,5 +131,7 @@ class Spinach::Features::GroupMilestones < Spinach::FeatureSteps
issue.labels << project.labels.find_by(title: 'bug')
issue.labels << project.labels.find_by(title: 'feature')
end
+
+ current_user.refresh_authorized_projects
end
end
diff --git a/features/steps/project/services.rb b/features/steps/project/services.rb
index bd6466f3686..a4d29770922 100644
--- a/features/steps/project/services.rb
+++ b/features/steps/project/services.rb
@@ -137,17 +137,17 @@ class Spinach::Features::ProjectServices < Spinach::FeatureSteps
expect(find_field('Colorize messages').value).to eq '1'
end
- step 'I click Slack service link' do
- click_link 'Slack'
+ step 'I click Slack notifications service link' do
+ click_link 'Slack notifications'
end
- step 'I fill Slack settings' do
+ step 'I fill Slack notifications settings' do
check 'Active'
fill_in 'Webhook', with: 'https://hooks.slack.com/services/SVRWFV0VVAR97N/B02R25XN3/ZBqu7xMupaEEICInN685'
click_button 'Save'
end
- step 'I should see Slack service settings saved' do
+ step 'I should see Slack Notifications service settings saved' do
expect(find_field('Webhook').value).to eq 'https://hooks.slack.com/services/SVRWFV0VVAR97N/B02R25XN3/ZBqu7xMupaEEICInN685'
end
diff --git a/features/steps/project/snippets.rb b/features/steps/project/snippets.rb
index 5e7d539add6..a3bebfa4b71 100644
--- a/features/steps/project/snippets.rb
+++ b/features/steps/project/snippets.rb
@@ -22,7 +22,7 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps
end
step 'I click link "New snippet"' do
- click_link "New snippet"
+ first(:link, "New snippet").click
end
step 'I click link "Snippet one"' do
diff --git a/features/steps/shared/authentication.rb b/features/steps/shared/authentication.rb
index 735e0ef6108..5c3e724746b 100644
--- a/features/steps/shared/authentication.rb
+++ b/features/steps/shared/authentication.rb
@@ -33,6 +33,6 @@ module SharedAuthentication
end
def current_user
- @user || User.first
+ @user || User.reorder(nil).first
end
end
diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb
index 2bd8ea745e4..15b81fa529b 100644
--- a/features/steps/shared/paths.rb
+++ b/features/steps/shared/paths.rb
@@ -168,7 +168,7 @@ module SharedPaths
end
step 'I visit admin projects page' do
- visit admin_namespaces_projects_path
+ visit admin_projects_path
end
step 'I visit admin users page' do
@@ -195,26 +195,14 @@ module SharedPaths
visit admin_groups_path
end
- step 'I visit admin appearance page' do
- visit admin_appearances_path
- end
-
step 'I visit admin teams page' do
visit admin_teams_path
end
- step 'I visit admin settings page' do
- visit admin_application_settings_path
- end
-
step 'I visit spam logs page' do
visit admin_spam_logs_path
end
- step 'I visit applications page' do
- visit admin_applications_path
- end
-
# ----------------------------------------
# Generic Project
# ----------------------------------------