summaryrefslogtreecommitdiff
path: root/features/steps/shared
diff options
context:
space:
mode:
authorblackst0ne <blackst0ne.ru@gmail.com>2018-05-14 18:55:41 +1100
committerblackst0ne <blackst0ne.ru@gmail.com>2018-05-14 18:55:41 +1100
commit5d8cd87c5006f467e7c7985ce38d42b51c0bbb66 (patch)
treec0d460e2e26ce08df1dfa8fd530420a194c7a187 /features/steps/shared
parent5f4dc699434ad86f611897fd6f9f5ca0de8826b5 (diff)
downloadgitlab-ce-5d8cd87c5006f467e7c7985ce38d42b51c0bbb66.tar.gz
Remove /features
Diffstat (limited to 'features/steps/shared')
-rw-r--r--features/steps/shared/active_tab.rb32
-rw-r--r--features/steps/shared/admin.rb11
-rw-r--r--features/steps/shared/authentication.rb56
-rw-r--r--features/steps/shared/diff_note.rb44
-rw-r--r--features/steps/shared/group.rb46
-rw-r--r--features/steps/shared/issuable.rb78
-rw-r--r--features/steps/shared/markdown.rb11
-rw-r--r--features/steps/shared/note.rb21
-rw-r--r--features/steps/shared/paths.rb413
-rw-r--r--features/steps/shared/project.rb102
-rw-r--r--features/steps/shared/project_tab.rb66
-rw-r--r--features/steps/shared/shortcuts.rb18
-rw-r--r--features/steps/shared/sidebar_active_tab.rb31
-rw-r--r--features/steps/shared/user.rb41
14 files changed, 0 insertions, 970 deletions
diff --git a/features/steps/shared/active_tab.rb b/features/steps/shared/active_tab.rb
deleted file mode 100644
index 104d024fee2..00000000000
--- a/features/steps/shared/active_tab.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-module SharedActiveTab
- include Spinach::DSL
- include WaitForRequests
-
- after do
- wait_for_requests if javascript_test?
- end
-
- def ensure_active_main_tab(content)
- expect(find('.sidebar-top-level-items > li.active')).to have_content(content)
- end
-
- def ensure_active_sub_tab(content)
- expect(find('.sidebar-sub-level-items > li.active:not(.fly-out-top-item)')).to have_content(content)
- end
-
- def ensure_active_sub_nav(content)
- expect(find('.layout-nav .controls li.active')).to have_content(content)
- end
-
- step 'no other main tabs should be active' do
- expect(page).to have_selector('.sidebar-top-level-items > li.active', count: 1)
- end
-
- step 'no other sub tabs should be active' do
- expect(page).to have_selector('.sidebar-sub-level-items > li.active:not(.fly-out-top-item)', count: 1)
- end
-
- step 'no other sub navs should be active' do
- expect(page).to have_selector('.layout-nav .controls li.active', count: 1)
- end
-end
diff --git a/features/steps/shared/admin.rb b/features/steps/shared/admin.rb
deleted file mode 100644
index ac0a1764147..00000000000
--- a/features/steps/shared/admin.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-module SharedAdmin
- include Spinach::DSL
-
- step 'there are projects in system' do
- 2.times { create(:project, :repository) }
- end
-
- step 'system has users' do
- 2.times { create(:user) }
- end
-end
diff --git a/features/steps/shared/authentication.rb b/features/steps/shared/authentication.rb
deleted file mode 100644
index df1428d8266..00000000000
--- a/features/steps/shared/authentication.rb
+++ /dev/null
@@ -1,56 +0,0 @@
-require Rails.root.join('features', 'support', 'login_helpers')
-
-module SharedAuthentication
- include Spinach::DSL
- include LoginHelpers
-
- step 'I sign in as a user' do
- sign_out(@user) if @user
-
- @user = create(:user)
- sign_in(@user)
- end
-
- step 'I sign in via the UI' do
- gitlab_sign_in(create(:user))
- end
-
- step 'I should be redirected to sign in page' do
- expect(current_path).to eq new_user_session_path
- end
-
- step "I logout directly" do
- gitlab_sign_out
- end
-
- def current_user
- @user || User.reorder(nil).first
- end
-
- private
-
- def gitlab_sign_in(user)
- visit new_user_session_path
-
- fill_in "user_login", with: user.email
- fill_in "user_password", with: "12345678"
- check 'user_remember_me'
- click_button "Sign in"
-
- @user = user
- end
-
- def gitlab_sign_out
- return unless @user
-
- if Capybara.current_driver == Capybara.javascript_driver
- find('.header-user-dropdown-toggle').click
- click_link 'Sign out'
- expect(page).to have_button('Sign in')
- else
- sign_out(@user)
- end
-
- @user = nil
- end
-end
diff --git a/features/steps/shared/diff_note.rb b/features/steps/shared/diff_note.rb
deleted file mode 100644
index 22f397947b0..00000000000
--- a/features/steps/shared/diff_note.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-module SharedDiffNote
- include Spinach::DSL
- include RepoHelpers
- include WaitForRequests
-
- after do
- wait_for_requests if javascript_test?
- end
-
- step 'I delete a diff comment' do
- find('.note').hover
- find(".js-note-delete").click
- end
-
- step 'I haven\'t written any diff comment text' do
- page.within(diff_file_selector) do
- fill_in "note[note]", with: ""
- end
- end
-
- step 'The diff comment preview tab should say there is nothing to do' do
- page.within(diff_file_selector) do
- find('.js-md-preview-button').click
- expect(find('.js-md-preview')).to have_content('Nothing to preview.')
- end
- end
-
- step 'I see side-by-side diff button' do
- expect(page).to have_content "Side-by-side"
- end
-
- def diff_file_selector
- '.diff-file:nth-of-type(1)'
- end
-
- def click_diff_line(code)
- find(".line_holder[id='#{code}'] button").click
- end
-
- def click_parallel_diff_line(code, line_type)
- find(".line_holder.parallel td[id='#{code}']").find(:xpath, 'preceding-sibling::*[1][self::td]').hover
- find(".line_holder.parallel button[data-line-code='#{code}']").click
- end
-end
diff --git a/features/steps/shared/group.rb b/features/steps/shared/group.rb
deleted file mode 100644
index 0126ce39c5a..00000000000
--- a/features/steps/shared/group.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-module SharedGroup
- include Spinach::DSL
-
- step 'current user is developer of group "Owned"' do
- is_member_of(current_user.name, "Owned", Gitlab::Access::DEVELOPER)
- end
-
- step '"John Doe" is guest of group "Guest"' do
- is_member_of("John Doe", "Guest", Gitlab::Access::GUEST)
- end
-
- step '"Mary Jane" is owner of group "Owned"' do
- is_member_of("Mary Jane", "Owned", Gitlab::Access::OWNER)
- end
-
- step '"Mary Jane" is guest of group "Owned"' do
- is_member_of("Mary Jane", "Owned", Gitlab::Access::GUEST)
- end
-
- step '"Mary Jane" is guest of group "Guest"' do
- is_member_of("Mary Jane", "Guest", Gitlab::Access::GUEST)
- end
-
- step 'I should see group "TestGroup"' do
- expect(page).to have_content "TestGroup"
- end
-
- step 'I should not see group "TestGroup"' do
- expect(page).not_to have_content "TestGroup"
- end
-
- protected
-
- def is_member_of(username, groupname, role)
- user = User.find_by(name: username) || create(:user, name: username)
- group = Group.find_by(name: groupname) || create(:group, name: groupname)
- group.add_user(user, role)
- project ||= create(:project, :repository, namespace: group)
- create(:closed_issue_event, project: project)
- project.add_master(user)
- end
-
- def owned_group
- @owned_group ||= Group.find_by(name: "Owned")
- end
-end
diff --git a/features/steps/shared/issuable.rb b/features/steps/shared/issuable.rb
deleted file mode 100644
index cc6fd48935f..00000000000
--- a/features/steps/shared/issuable.rb
+++ /dev/null
@@ -1,78 +0,0 @@
-module SharedIssuable
- include Spinach::DSL
-
- def edit_issuable
- find('.js-issuable-edit', visible: true).click
- end
-
- step 'I leave a comment referencing issue "Community issue"' do
- leave_reference_comment(
- issuable: Issue.find_by(title: 'Community issue'),
- from_project_name: 'Enterprise'
- )
- end
-
- step 'I click link "Edit" for the merge request' do
- edit_issuable
- end
-
- step 'I sort the list by "Least popular"' do
- find('button.dropdown-toggle').click
-
- page.within('.content ul.dropdown-menu.dropdown-menu-align-right li') do
- click_link 'Least popular'
- end
- end
-
- step 'I click link "Next" in the sidebar' do
- page.within '.issuable-sidebar' do
- click_link 'Next'
- end
- end
-
- def create_issuable_for_project(project_name:, title:, type: :issue)
- project = Project.find_by(name: project_name)
-
- attrs = {
- title: title,
- author: project.users.first,
- description: '# Description header'
- }
-
- case type
- when :issue
- attrs[:project] = project
- when :merge_request
- attrs.merge!(
- source_project: project,
- target_project: project,
- source_branch: 'fix',
- target_branch: 'master'
- )
- end
-
- create(type, attrs)
- end
-
- def leave_reference_comment(issuable:, from_project_name:)
- project = Project.find_by(name: from_project_name)
-
- page.within('.js-main-target-form') do
- fill_in 'note[note]', with: "##{issuable.to_reference(project)}"
- click_button 'Comment'
- end
- end
-
- def visible_note(issuable:, from_project_name:, user_name:)
- project = Project.find_by(name: from_project_name)
-
- expect(page).to have_content(user_name)
- expect(page).to have_content("mentioned in #{issuable.class.to_s.titleize.downcase} #{issuable.to_reference(project)}")
- end
-
- def expect_sidebar_content(content)
- page.within '.issuable-sidebar' do
- expect(page).to have_content content
- end
- end
-end
diff --git a/features/steps/shared/markdown.rb b/features/steps/shared/markdown.rb
deleted file mode 100644
index 65118f07ca2..00000000000
--- a/features/steps/shared/markdown.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-module SharedMarkdown
- include Spinach::DSL
-
- step 'I should not see the Markdown preview' do
- expect(find('.gfm-form .js-md-preview')).not_to be_visible
- end
-
- step 'I haven\'t written any description text' do
- find('.gfm-form').fill_in 'Description', with: ''
- end
-end
diff --git a/features/steps/shared/note.rb b/features/steps/shared/note.rb
deleted file mode 100644
index 4a6dee3c7b8..00000000000
--- a/features/steps/shared/note.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-module SharedNote
- include Spinach::DSL
- include WaitForRequests
-
- after do
- wait_for_requests if javascript_test?
- end
-
- step 'I haven\'t written any comment text' do
- page.within(".js-main-target-form") do
- fill_in "note[note]", with: ""
- end
- end
-
- step 'The comment preview tab should say there is nothing to do' do
- page.within(".js-main-target-form") do
- find('.js-md-preview-button').click
- expect(find('.js-md-preview')).to have_content('Nothing to preview.')
- end
- end
-end
diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb
deleted file mode 100644
index 8f2f5ca26a9..00000000000
--- a/features/steps/shared/paths.rb
+++ /dev/null
@@ -1,413 +0,0 @@
-module SharedPaths
- include Spinach::DSL
- include RepoHelpers
- include DashboardHelper
- include WaitForRequests
-
- step 'I visit new project page' do
- visit new_project_path
- end
-
- step 'I visit login page' do
- visit new_user_session_path
- end
-
- # ----------------------------------------
- # User
- # ----------------------------------------
-
- step 'I visit user "John Doe" page' do
- visit user_path("john_doe")
- end
-
- # ----------------------------------------
- # Group
- # ----------------------------------------
-
- step 'I visit group "Owned" page' do
- visit group_path(Group.find_by(name: "Owned"))
- end
-
- step 'I visit group "Owned" activity page' do
- visit activity_group_path(Group.find_by(name: "Owned"))
- end
-
- step 'I visit group "Owned" issues page' do
- visit issues_group_path(Group.find_by(name: "Owned"))
- end
-
- step 'I visit group "Owned" merge requests page' do
- visit merge_requests_group_path(Group.find_by(name: "Owned"))
- end
-
- step 'I visit group "Owned" milestones page' do
- visit group_milestones_path(Group.find_by(name: "Owned"))
- end
-
- step 'I visit group "Owned" members page' do
- visit group_group_members_path(Group.find_by(name: "Owned"))
- end
-
- step 'I visit group "Owned" projects page' do
- visit projects_group_path(Group.find_by(name: "Owned"))
- end
-
- step 'I visit group "Guest" page' do
- visit group_path(Group.find_by(name: "Guest"))
- end
-
- step 'I visit group "Guest" issues page' do
- visit issues_group_path(Group.find_by(name: "Guest"))
- end
-
- step 'I visit group "Guest" merge requests page' do
- visit merge_requests_group_path(Group.find_by(name: "Guest"))
- end
-
- step 'I visit group "Guest" members page' do
- visit group_group_members_path(Group.find_by(name: "Guest"))
- end
-
- step 'I visit group "Guest" settings page' do
- visit edit_group_path(Group.find_by(name: "Guest"))
- end
-
- # ----------------------------------------
- # Dashboard
- # ----------------------------------------
-
- step 'I visit dashboard page' do
- visit dashboard_projects_path
- end
-
- step 'I visit dashboard activity page' do
- visit activity_dashboard_path
- end
-
- step 'I visit dashboard projects page' do
- visit projects_dashboard_path
- end
-
- step 'I visit dashboard issues page' do
- visit assigned_issues_dashboard_path
- end
-
- step 'I visit dashboard search page' do
- visit search_path
- end
-
- step 'I visit dashboard help page' do
- visit help_path
- end
-
- step 'I visit dashboard groups page' do
- visit dashboard_groups_path
- end
-
- step 'I should be redirected to the dashboard groups page' do
- expect(current_path).to eq dashboard_groups_path
- end
-
- step 'I visit dashboard starred projects page' do
- visit starred_dashboard_projects_path
- end
-
- # ----------------------------------------
- # Profile
- # ----------------------------------------
-
- step 'I visit profile page' do
- visit profile_path
- end
-
- step 'I visit profile applications page' do
- visit applications_profile_path
- end
-
- step 'I visit profile password page' do
- visit edit_profile_password_path
- end
-
- step 'I visit profile account page' do
- visit profile_account_path
- end
-
- step 'I visit profile SSH keys page' do
- visit profile_keys_path
- end
-
- step 'I visit profile preferences page' do
- visit profile_preferences_path
- end
-
- step 'I visit Authentication log page' do
- visit audit_log_profile_path
- end
-
- # ----------------------------------------
- # Admin
- # ----------------------------------------
-
- step 'I visit admin page' do
- visit admin_root_path
- end
-
- step 'I visit abuse reports page' do
- visit admin_abuse_reports_path
- end
-
- step 'I visit admin projects page' do
- visit admin_projects_path
- end
-
- step 'I visit admin users page' do
- visit admin_users_path
- end
-
- step 'I visit admin logs page' do
- visit admin_logs_path
- end
-
- step 'I visit admin messages page' do
- visit admin_broadcast_messages_path
- end
-
- step 'I visit admin hooks page' do
- visit admin_hooks_path
- end
-
- step 'I visit admin Resque page' do
- visit admin_background_jobs_path
- end
-
- step 'I visit admin teams page' do
- visit admin_teams_path
- end
-
- step 'I visit spam logs page' do
- visit admin_spam_logs_path
- end
-
- # ----------------------------------------
- # Generic Project
- # ----------------------------------------
-
- step "I visit my project's settings page" do
- visit edit_project_path(@project)
- end
-
- step 'I visit a binary file in the repo' do
- visit project_blob_path(@project,
- File.join(root_ref, 'files/images/logo-black.png'))
- end
-
- step "I visit my project's commits page" do
- visit project_commits_path(@project, root_ref, { limit: 5 })
- end
-
- step "I visit my project's commits page for a specific path" do
- visit project_commits_path(@project, root_ref + "/files/ruby/regex.rb", { limit: 5 })
- end
-
- step 'I visit my project\'s commits stats page' do
- visit stats_project_repository_path(@project)
- end
-
- step "I visit my project's graph page" do
- # Stub Graph max_size to speed up test (10 commits vs. 650)
- Network::Graph.stub(max_count: 10)
-
- visit project_network_path(@project, root_ref)
- end
-
- step "I visit my project's issues page" do
- visit project_issues_path(@project)
- end
-
- step "I visit my project's merge requests page" do
- visit project_merge_requests_path(@project)
- end
-
- step "I visit my project's members page" do
- visit project_project_members_path(@project)
- end
-
- step "I visit my project's wiki page" do
- visit project_wiki_path(@project, :home)
- end
-
- step 'I visit project hooks page' do
- visit project_settings_integrations_path(@project)
- end
-
- step 'I visit project find file page' do
- visit project_find_file_path(@project, root_ref)
- end
-
- # ----------------------------------------
- # "Shop" Project
- # ----------------------------------------
-
- step 'I visit project "Shop" page' do
- visit project_path(project)
- end
-
- step 'I visit edit project "Shop" page' do
- visit edit_project_path(project)
- end
-
- step 'I visit compare refs page' do
- visit project_compare_index_path(@project)
- end
-
- step 'I visit project commits page' do
- visit project_commits_path(@project, root_ref, { limit: 5 })
- end
-
- step 'I visit project commits page for stable branch' do
- visit project_commits_path(@project, 'stable', { limit: 5 })
- end
-
- step 'I visit blob file from repo' do
- visit project_blob_path(@project, File.join(sample_commit.id, sample_blob.path))
- end
-
- step 'I visit ".gitignore" file in repo' do
- visit project_blob_path(@project, File.join(root_ref, '.gitignore'))
- end
-
- step 'I am on the new file page' do
- expect(current_path).to eq(project_create_blob_path(@project, root_ref))
- end
-
- step 'I am on the ".gitignore" edit file page' do
- expect(current_path).to eq(
- project_edit_blob_path(@project, File.join(root_ref, '.gitignore')))
- end
-
- step 'I visit project source page for "6d39438"' do
- visit project_tree_path(@project, "6d39438")
- end
-
- step 'I visit project source page for' \
- ' "6d394385cf567f80a8fd85055db1ab4c5295806f"' do
- visit project_tree_path(@project,
- '6d394385cf567f80a8fd85055db1ab4c5295806f')
- end
-
- step 'I visit project tags page' do
- visit project_tags_path(@project)
- end
-
- step 'I visit issue page "Release 0.4"' do
- issue = Issue.find_by(title: "Release 0.4")
- visit project_issue_path(issue.project, issue)
- end
-
- step 'I visit project "Forum" labels page' do
- project = Project.find_by(name: 'Forum')
- visit project_labels_path(project)
- end
-
- step 'I visit project "Shop" new label page' do
- project = Project.find_by(name: 'Shop')
- visit new_project_label_path(project)
- end
-
- step 'I visit project "Forum" new label page' do
- project = Project.find_by(name: 'Forum')
- visit new_project_label_path(project)
- end
-
- step 'I visit merge request page "Bug NS-04"' do
- visit merge_request_path("Bug NS-04")
- wait_for_requests
- end
-
- step 'I visit merge request page "Bug NS-07"' do
- visit merge_request_path("Bug NS-07")
- wait_for_requests
- end
-
- step 'I visit merge request page "Bug NS-08"' do
- visit merge_request_path("Bug NS-08")
- wait_for_requests
- end
-
- step 'I visit merge request page "Bug CO-01"' do
- mr = MergeRequest.find_by(title: "Bug CO-01")
- visit project_merge_request_path(mr.target_project, mr)
- wait_for_requests
- end
-
- step 'I visit forked project "Shop" merge requests page' do
- visit project_merge_requests_path(project)
- end
-
- step 'I visit project "Shop" team page' do
- visit project_project_members_path(project)
- end
-
- step 'I visit project wiki page' do
- visit project_wiki_path(@project, :home)
- end
-
- # ----------------------------------------
- # Visibility Projects
- # ----------------------------------------
-
- step 'I visit project "Community" source page' do
- project = Project.find_by(name: 'Community')
- visit project_tree_path(project, root_ref)
- end
-
- step 'I visit project "Internal" page' do
- project = Project.find_by(name: "Internal")
- visit project_path(project)
- end
-
- step 'I visit project "Enterprise" page' do
- project = Project.find_by(name: "Enterprise")
- visit project_path(project)
- end
-
- # ----------------------------------------
- # Empty Projects
- # ----------------------------------------
-
- step "I should not see command line instructions" do
- expect(page).not_to have_css('.empty_wrapper')
- end
-
- # ----------------------------------------
- # Public Projects
- # ----------------------------------------
- step 'I visit the public groups area' do
- visit explore_groups_path
- end
-
- # ----------------------------------------
- # Snippets
- # ----------------------------------------
-
- step 'I visit project "Shop" snippets page' do
- visit project_snippets_path(project)
- end
-
- step 'I visit snippets page' do
- visit explore_snippets_path
- end
-
- def root_ref
- @project.repository.root_ref
- end
-
- def project
- Project.find_by!(name: 'Shop')
- end
-
- def merge_request_path(title)
- mr = MergeRequest.find_by(title: title)
- project_merge_request_path(mr.target_project, mr)
- end
-end
diff --git a/features/steps/shared/project.rb b/features/steps/shared/project.rb
deleted file mode 100644
index d0277257320..00000000000
--- a/features/steps/shared/project.rb
+++ /dev/null
@@ -1,102 +0,0 @@
-module SharedProject
- include Spinach::DSL
-
- # Create a project without caring about what it's called
- step "I own a project" do
- @project = create(:project, :repository, namespace: @user.namespace)
- @project.add_master(@user)
- end
-
- step "I own a project in some group namespace" do
- @group = create(:group, name: 'some group')
- @project = create(:project, namespace: @group)
- @project.add_master(@user)
- end
-
- def current_project
- @project ||= Project.first
- end
-
- # ----------------------------------------
- # Visibility of archived project
- # ----------------------------------------
-
- step 'I should not see project "Archive"' do
- project = Project.find_by(name: "Archive")
- expect(page).not_to have_content project.full_name
- end
-
- step 'I should see project "Archive"' do
- project = Project.find_by(name: "Archive")
- expect(page).to have_content project.full_name
- end
-
- # ----------------------------------------
- # Visibility level
- # ----------------------------------------
-
- step 'I should see project "Enterprise"' do
- expect(page).to have_content "Enterprise"
- end
-
- step 'I should not see project "Enterprise"' do
- expect(page).not_to have_content "Enterprise"
- end
-
- step 'internal project "Internal"' do
- create(:project, :internal, :repository, name: 'Internal')
- end
-
- step 'I should see project "Internal"' do
- page.within '.js-projects-list-holder' do
- expect(page).to have_content "Internal"
- end
- end
-
- step 'I should not see project "Internal"' do
- page.within '.js-projects-list-holder' do
- expect(page).not_to have_content "Internal"
- end
- end
-
- step 'I should see project "Community"' do
- expect(page).to have_content "Community"
- end
-
- step 'I should not see project "Community"' do
- expect(page).not_to have_content "Community"
- end
-
- step '"John Doe" owns private project "Enterprise"' do
- user_owns_project(
- user_name: 'John Doe',
- project_name: 'Enterprise'
- )
- end
-
- step '"John Doe" owns internal project "Internal"' do
- user_owns_project(
- user_name: 'John Doe',
- project_name: 'Internal',
- visibility: :internal
- )
- end
-
- step 'public empty project "Empty Public Project"' do
- create :project_empty_repo, :public, name: "Empty Public Project"
- end
-
- step 'project "Shop" has labels: "bug", "feature", "enhancement"' do
- project = Project.find_by(name: "Shop")
- create(:label, project: project, title: 'bug')
- create(:label, project: project, title: 'feature')
- create(:label, project: project, title: 'enhancement')
- end
-
- def user_owns_project(user_name:, project_name:, visibility: :private)
- user = user_exists(user_name, username: user_name.gsub(/\s/, '').underscore)
- project = Project.find_by(name: project_name)
- project ||= create(:project, visibility, name: project_name, namespace: user.namespace)
- project.add_master(user)
- end
-end
diff --git a/features/steps/shared/project_tab.rb b/features/steps/shared/project_tab.rb
deleted file mode 100644
index 5a516ee33bc..00000000000
--- a/features/steps/shared/project_tab.rb
+++ /dev/null
@@ -1,66 +0,0 @@
-require_relative 'active_tab'
-
-module SharedProjectTab
- include Spinach::DSL
- include SharedActiveTab
-
- step 'the active main tab should be Project' do
- ensure_active_main_tab('Overview')
- end
-
- step 'the active main tab should be Repository' do
- ensure_active_main_tab('Repository')
- end
-
- step 'the active main tab should be Issues' do
- ensure_active_main_tab('Issues')
- end
-
- step 'the active sub tab should be Members' do
- ensure_active_sub_tab('Members')
- end
-
- step 'the active main tab should be Merge Requests' do
- ensure_active_main_tab('Merge Requests')
- end
-
- step 'the active main tab should be Snippets' do
- ensure_active_main_tab('Snippets')
- end
-
- step 'the active main tab should be Wiki' do
- ensure_active_main_tab('Wiki')
- end
-
- step 'the active main tab should be Members' do
- ensure_active_main_tab('Members')
- end
-
- step 'the active main tab should be Settings' do
- ensure_active_main_tab('Settings')
- end
-
- step 'the active sub tab should be Graph' do
- ensure_active_sub_tab('Graph')
- end
-
- step 'the active sub tab should be Files' do
- ensure_active_sub_tab('Files')
- end
-
- step 'the active sub tab should be Commits' do
- ensure_active_sub_tab('Commits')
- end
-
- step 'the active sub tab should be Home' do
- ensure_active_sub_tab('Details')
- end
-
- step 'the active sub tab should be Activity' do
- ensure_active_sub_tab('Activity')
- end
-
- step 'the active sub tab should be Charts' do
- ensure_active_sub_tab('Charts')
- end
-end
diff --git a/features/steps/shared/shortcuts.rb b/features/steps/shared/shortcuts.rb
deleted file mode 100644
index a75a8474d26..00000000000
--- a/features/steps/shared/shortcuts.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-module SharedShortcuts
- include Spinach::DSL
-
- step 'I press "g" and "p"' do
- find('body').native.send_key('g')
- find('body').native.send_key('p')
- end
-
- step 'I press "g" and "i"' do
- find('body').native.send_key('g')
- find('body').native.send_key('i')
- end
-
- step 'I press "g" and "m"' do
- find('body').native.send_key('g')
- find('body').native.send_key('m')
- end
-end
diff --git a/features/steps/shared/sidebar_active_tab.rb b/features/steps/shared/sidebar_active_tab.rb
deleted file mode 100644
index 07fff16e867..00000000000
--- a/features/steps/shared/sidebar_active_tab.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-module SharedSidebarActiveTab
- include Spinach::DSL
-
- step 'no other main tabs should be active' do
- expect(page).to have_selector('.nav-sidebar li.active', count: 1)
- end
-
- def ensure_active_main_tab(content)
- expect(find('.nav-sidebar li.active')).to have_content(content)
- end
-
- step 'the active main tab should be Home' 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 Projects' do
- ensure_active_main_tab('Projects')
- end
-
- step 'the active main tab should be Issues' do
- ensure_active_main_tab('Issues')
- end
-
- step 'the active main tab should be Merge Requests' do
- ensure_active_main_tab('Merge Requests')
- end
-end
diff --git a/features/steps/shared/user.rb b/features/steps/shared/user.rb
deleted file mode 100644
index 9cadc91769d..00000000000
--- a/features/steps/shared/user.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-module SharedUser
- include Spinach::DSL
-
- step 'User "John Doe" exists' do
- user_exists("John Doe", { username: "john_doe" })
- end
-
- step 'User "Mary Jane" exists' do
- user_exists("Mary Jane", { username: "mary_jane" })
- end
-
- step 'gitlab user "Mike"' do
- create(:user, name: "Mike")
- end
-
- protected
-
- def user_exists(name, options = {})
- User.find_by(name: name) || create(:user, { name: name, admin: false }.merge(options))
- end
-
- step 'I have no ssh keys' do
- @user.keys.delete_all
- end
-
- step 'I click on "Personal projects" tab' do
- page.within '.nav-links' do
- click_link 'Personal projects'
- end
-
- expect(page).to have_css('.tab-content #projects.active')
- end
-
- step 'I click on "Contributed projects" tab' do
- page.within '.nav-links' do
- click_link 'Contributed projects'
- end
-
- expect(page).to have_css('.tab-content #contributed.active')
- end
-end