diff options
Diffstat (limited to 'features')
-rw-r--r-- | features/project/commits/branches.feature | 42 | ||||
-rw-r--r-- | features/project/issues/milestones.feature | 43 | ||||
-rw-r--r-- | features/project/project.feature | 86 | ||||
-rw-r--r-- | features/steps/project/commits/branches.rb | 57 | ||||
-rw-r--r-- | features/steps/project/issues/milestones.rb | 58 | ||||
-rw-r--r-- | features/steps/project/project.rb | 154 | ||||
-rw-r--r-- | features/steps/shared/markdown.rb | 4 | ||||
-rw-r--r-- | features/steps/shared/paths.rb | 16 | ||||
-rw-r--r-- | features/steps/shared/project.rb | 84 |
9 files changed, 0 insertions, 544 deletions
diff --git a/features/project/commits/branches.feature b/features/project/commits/branches.feature deleted file mode 100644 index c57376aecff..00000000000 --- a/features/project/commits/branches.feature +++ /dev/null @@ -1,42 +0,0 @@ -@project_commits -Feature: Project Commits Branches - Background: - Given I sign in as a user - And I own project "Shop" - And project "Shop" has protected branches - - Scenario: I can see project all git branches - Given I visit project branches page - Then I should see "Shop" all branches list - - Scenario: I can see project protected git branches - Given I visit project protected branches page - Then I should see "Shop" protected branches list - - @javascript - Scenario: I create a branch - Given I visit project branches page - And I click new branch link - And I submit new branch form - Then I should see new branch created - - @javascript - Scenario: I delete a branch - Given I visit project branches page - And I filter for branch improve/awesome - And I click branch 'improve/awesome' delete link - Then I should not see branch 'improve/awesome' - - @javascript - Scenario: I create a branch with invalid name - Given I visit project branches page - And I click new branch link - And I submit new branch form with invalid name - Then I should see new an error that branch is invalid - - @javascript - Scenario: I create a branch that already exists - Given I visit project branches page - And I click new branch link - And I submit new branch form with branch that already exists - Then I should see new an error that branch already exists diff --git a/features/project/issues/milestones.feature b/features/project/issues/milestones.feature deleted file mode 100644 index 77c8ed6e5bf..00000000000 --- a/features/project/issues/milestones.feature +++ /dev/null @@ -1,43 +0,0 @@ -@project_issues -Feature: Project Issues Milestones - Background: - Given I sign in as a user - And I own project "Shop" - And project "Shop" has milestone "v2.2" - Given I visit project "Shop" milestones page - - Scenario: I should see active milestones - Then I should see milestone "v2.2" - - Scenario: I should see milestone - Given I click link "v2.2" - Then I should see milestone "v2.2" - - @javascript - Scenario: I create and delete new milestone - Given I click link "New Milestone" - And I submit new milestone "v2.3" - Then I should see milestone "v2.3" - Given I click button to remove milestone - And I confirm in modal - When I visit project "Shop" activity page - Then I should see deleted milestone activity - - @javascript - Scenario: I delete new milestone - Given I click button to remove milestone - And I confirm in modal - And I should see no milestones - - @javascript - Scenario: Listing closed issues - Given the milestone has open and closed issues - And I click link "v2.2" - Then I should see 3 issues - - # Markdown - - Scenario: Headers inside the description should have ids generated for them. - Given I click link "v2.2" - # PLEASE USE the `have_header_with_correct_id_and_link(level, text, id, parent)` matcher on migrating this spec to rspec. - Then Header "Description header" should have correct id and link diff --git a/features/project/project.feature b/features/project/project.feature deleted file mode 100644 index 23817ef3ac9..00000000000 --- a/features/project/project.feature +++ /dev/null @@ -1,86 +0,0 @@ -Feature: Project - Background: - Given I sign in as a user - And I own project "Shop" - And project "Shop" has push event - And I visit project "Shop" page - - Scenario: I edit the project avatar - Given I visit edit project "Shop" page - When I change the project avatar - And I should see new project avatar - And I should see the "Remove avatar" button - - Scenario: I remove the project avatar - Given I visit edit project "Shop" page - And I have an project avatar - When I remove my project avatar - Then I should see the default project avatar - And I should not see the "Remove avatar" button - - @javascript - Scenario: I should have readme on page - And I visit project "Shop" page - Then I should see project "Shop" README - - Scenario: I should see last commit with CI - Given project "Shop" has CI enabled - Given project "Shop" has CI build - And I visit project "Shop" page - And I should see last commit with CI status - - @javascript - Scenario: I should see project activity - When I visit project "Shop" activity page - Then I should see project "Shop" activity feed - - Scenario: I visit edit project - When I visit edit project "Shop" page - Then I should see project settings - - Scenario: I edit project - When I visit edit project "Shop" page - And change project settings - And I save project - Then I should see project with new settings - - Scenario: I change project path - When I visit edit project "Shop" page - And change project path settings - Then I should see project with new path settings - - Scenario: I should change project default branch - When I visit edit project "Shop" page - And change project default branch - And I save project - Then I should see project default branch changed - - Scenario: I tag a project - When I visit edit project "Shop" page - Then I should see project settings - And I add project tags - And I save project - Then I should see project tags - - Scenario: I should not see "New Issue" or "New Merge Request" buttons - Given I disable issues and merge requests in project - When I visit project "Shop" page - Then I should not see "New Issue" button - And I should not see "New Merge Request" button - - Scenario: I should not see Project snippets - Given I disable snippets in project - When I visit project "Shop" page - Then I should not see "Snippets" button - - @javascript - Scenario: I edit Project Notifications - Given I click notifications drop down button - When I choose Mention setting - Then I should see Notification saved message - - Scenario: I should see command line instructions - Given I own an empty project - And I visit my empty project page - And I create bare repo - Then I should see command line instructions diff --git a/features/steps/project/commits/branches.rb b/features/steps/project/commits/branches.rb index c3ae33d2aa9..3ecd4c8b672 100644 --- a/features/steps/project/commits/branches.rb +++ b/features/steps/project/commits/branches.rb @@ -7,37 +7,14 @@ class Spinach::Features::ProjectCommitsBranches < Spinach::FeatureSteps click_link "All" end - step 'I should see "Shop" all branches list' do - expect(page).to have_content "Branches" - expect(page).to have_content "master" - end - step 'I click link "Protected"' do click_link "Protected" end - step 'I should see "Shop" protected branches list' do - page.within ".protected-branches-list" do - expect(page).to have_content "stable" - expect(page).not_to have_content "master" - end - end - - step 'project "Shop" has protected branches' do - project = Project.find_by(name: "Shop") - create(:protected_branch, project: project, name: "stable") - end - step 'I click new branch link' do click_link "New branch" end - step 'I submit new branch form' do - fill_in 'branch_name', with: 'deploy_keys' - select_branch('master') - click_button 'Create branch' - end - step 'I submit new branch form with invalid name' do fill_in 'branch_name', with: '1.0 stable' page.find("body").click # defocus the branch_name input @@ -45,40 +22,6 @@ class Spinach::Features::ProjectCommitsBranches < Spinach::FeatureSteps click_button 'Create branch' end - step 'I submit new branch form with branch that already exists' do - fill_in 'branch_name', with: 'master' - select_branch('master') - click_button 'Create branch' - end - - step 'I should see new branch created' do - expect(page).to have_content 'deploy_keys' - end - - step 'I should see new an error that branch is invalid' do - expect(page).to have_content 'Branch name is invalid' - expect(page).to have_content "can't contain spaces" - end - - step 'I should see new an error that branch already exists' do - expect(page).to have_content 'Branch already exists' - end - - step 'I filter for branch improve/awesome' do - fill_in 'branch-search', with: 'improve/awesome' - find('#branch-search').native.send_keys(:enter) - end - - step "I click branch 'improve/awesome' delete link" do - page.within '.js-branch-improve\/awesome' do - accept_alert { find('.btn-remove').click } - end - end - - step "I should not see branch 'improve/awesome'" do - expect(page).to have_css('.js-branch-improve\\/awesome', visible: :hidden) - end - def select_branch(branch_name) find('.git-revision-dropdown-toggle').click diff --git a/features/steps/project/issues/milestones.rb b/features/steps/project/issues/milestones.rb index 4ce67aa651c..30927306a4f 100644 --- a/features/steps/project/issues/milestones.rb +++ b/features/steps/project/issues/milestones.rb @@ -4,35 +4,6 @@ class Spinach::Features::ProjectIssuesMilestones < Spinach::FeatureSteps include SharedPaths include SharedMarkdown - step 'I should see milestone "v2.2"' do - milestone = @project.milestones.find_by(title: "v2.2") - expect(page).to have_content(milestone.title[0..10]) - expect(page).to have_content(milestone.expires_at) - expect(page).to have_content("Issues") - end - - step 'I click link "v2.2"' do - click_link "v2.2" - end - - step 'I click link "New Milestone"' do - page.within('.nav-controls') do - click_link "New milestone" - end - end - - step 'I submit new milestone "v2.3"' do - fill_in "milestone_title", with: "v2.3" - click_button "Create milestone" - end - - step 'I should see milestone "v2.3"' do - milestone = @project.milestones.find_by(title: "v2.3") - expect(page).to have_content(milestone.title[0..10]) - expect(page).to have_content(milestone.expires_at) - expect(page).to have_content("Issues") - end - step 'project "Shop" has milestone "v2.2"' do project = Project.find_by(name: "Shop") milestone = create(:milestone, @@ -43,36 +14,7 @@ class Spinach::Features::ProjectIssuesMilestones < Spinach::FeatureSteps 3.times { create(:issue, project: project, milestone: milestone) } end - step 'the milestone has open and closed issues' do - project = Project.find_by(name: "Shop") - milestone = project.milestones.find_by(title: 'v2.2') - - # 3 Open issues created above; create one closed issue - create(:closed_issue, project: project, milestone: milestone) - end - - step 'I should see deleted milestone activity' do - expect(page).to have_content('opened milestone in') - expect(page).to have_content('destroyed milestone in') - end - When 'I click link "All Issues"' do click_link 'All Issues' end - - step 'I should see 3 issues' do - expect(page).to have_selector('#tab-issues li.issuable-row', count: 4) - end - - step 'I click button to remove milestone' do - click_button 'Delete' - end - - step 'I confirm in modal' do - click_button 'Delete milestone' - end - - step 'I should see no milestones' do - expect(page).to have_content('No milestones to show') - end end diff --git a/features/steps/project/project.rb b/features/steps/project/project.rb deleted file mode 100644 index bba30a72325..00000000000 --- a/features/steps/project/project.rb +++ /dev/null @@ -1,154 +0,0 @@ -class Spinach::Features::Project < Spinach::FeatureSteps - include SharedAuthentication - include SharedProject - include SharedPaths - include WaitForRequests - - step 'change project settings' do - fill_in 'project_name_edit', with: 'NewName' - end - - step 'I save project' do - page.within '.general-settings' do - click_button 'Save changes' - end - end - - step 'I should see project with new settings' do - expect(find_field('project_name').value).to eq 'NewName' - end - - step 'change project path settings' do - fill_in 'project_path', with: 'new-path' - click_button 'Rename' - end - - step 'I should see project with new path settings' do - expect(project.path).to eq 'new-path' - end - - step 'I change the project avatar' do - attach_file( - :project_avatar, - File.join(Rails.root, 'spec', 'fixtures', 'banana_sample.gif') - ) - page.within '.general-settings' do - click_button 'Save changes' - end - @project.reload - end - - step 'I should see new project avatar' do - expect(@project.avatar).to be_instance_of AvatarUploader - url = @project.avatar.url - expect(url).to eq "/uploads/-/system/project/avatar/#{@project.id}/banana_sample.gif" - end - - step 'I should see the "Remove avatar" button' do - expect(page).to have_link('Remove avatar') - end - - step 'I have an project avatar' do - attach_file( - :project_avatar, - File.join(Rails.root, 'spec', 'fixtures', 'banana_sample.gif') - ) - page.within '.general-settings' do - click_button 'Save changes' - end - @project.reload - end - - step 'I remove my project avatar' do - click_link 'Remove avatar' - @project.reload - end - - step 'I should see the default project avatar' do - expect(@project.avatar?).to eq false - end - - step 'I should not see the "Remove avatar" button' do - expect(page).not_to have_link('Remove avatar') - end - - step 'change project default branch' do - select 'fix', from: 'project_default_branch' - page.within '.general-settings' do - click_button 'Save changes' - end - end - - step 'I should see project default branch changed' do - expect(find(:css, 'select#project_default_branch').value).to eq 'fix' - end - - step 'I select project "Forum" README tab' do - click_link 'Readme' - end - - step 'I should see project "Forum" README' do - page.within('.readme-holder') do - expect(page).to have_content 'Sample repo for testing gitlab features' - end - end - - step 'I should see project "Shop" README' do - wait_for_requests - page.within('.readme-holder') do - expect(page).to have_content 'testme' - end - end - - step 'I add project tags' do - fill_in 'Tags', with: 'tag1, tag2' - end - - step 'I should see project tags' do - expect(find_field('Tags').value).to eq 'tag1, tag2' - end - - step 'I should not see "New Issue" button' do - expect(page).not_to have_link 'New Issue' - end - - step 'I should not see "New Merge Request" button' do - expect(page).not_to have_link 'New Merge Request' - end - - step 'I should not see "Snippets" button' do - page.within '.content' do - expect(page).not_to have_link 'Snippets' - end - end - - step 'project "Shop" belongs to group' do - group = create(:group) - @project.namespace = group - @project.save! - end - - step 'I click notifications drop down button' do - first('.notifications-btn').click - end - - step 'I choose Mention setting' do - click_link 'On mention' - end - - step 'I should see Notification saved message' do - page.within '#notifications-button' do - expect(page).to have_content 'On mention' - end - end - - step 'I create bare repo' do - click_link 'Create empty repository' - end - - step 'I should see command line instructions' do - page.within ".empty_wrapper" do - expect(page).to have_content("Command line instructions") - end - end -end diff --git a/features/steps/shared/markdown.rb b/features/steps/shared/markdown.rb index c66280127e9..9d522936fb6 100644 --- a/features/steps/shared/markdown.rb +++ b/features/steps/shared/markdown.rb @@ -10,10 +10,6 @@ module SharedMarkdown expect(find(:xpath, "#{node.path}/..").text).to eq text end - step 'Header "Description header" should have correct id and link' do - header_should_have_correct_id_and_link(1, 'Description header', 'description-header') - end - step 'I should not see the Markdown preview' do expect(find('.gfm-form .js-md-preview')).not_to be_visible end diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb index cc893b8391e..3b4c839bcef 100644 --- a/features/steps/shared/paths.rb +++ b/features/steps/shared/paths.rb @@ -264,10 +264,6 @@ module SharedPaths visit project_path(project) end - step 'I visit project "Shop" activity page' do - visit activity_project_path(project) - end - step 'I visit project "Forked Shop" merge requests page' do visit project_merge_requests_path(@forked_project) end @@ -276,14 +272,6 @@ module SharedPaths visit edit_project_path(project) end - step 'I visit project branches page' do - visit project_branches_path(@project) - end - - step 'I visit project protected branches page' do - visit project_protected_branches_path(@project) - end - step 'I visit compare refs page' do visit project_compare_index_path(@project) end @@ -381,10 +369,6 @@ module SharedPaths visit project_merge_requests_path(project) end - step 'I visit project "Shop" milestones page' do - visit project_milestones_path(project) - end - step 'I visit project "Shop" team page' do visit project_project_members_path(project) end diff --git a/features/steps/shared/project.rb b/features/steps/shared/project.rb index be848ebafa0..09969a6473f 100644 --- a/features/steps/shared/project.rb +++ b/features/steps/shared/project.rb @@ -25,72 +25,6 @@ module SharedProject @project.add_master(@user) end - step 'I disable snippets in project' do - @project.snippets_enabled = false - @project.save - end - - step 'I disable issues and merge requests in project' do - @project.issues_enabled = false - @project.merge_requests_enabled = false - @project.save - end - - # Add another user to project "Shop" - step 'I add a user to project "Shop"' do - @project = Project.find_by(name: "Shop") - other_user = create(:user, name: 'Alpha') - @project.add_master(other_user) - end - - # Create another specific project called "Forum" - step 'I own project "Forum"' do - @project = Project.find_by(name: "Forum") - @project ||= create(:project, :repository, name: "Forum", namespace: @user.namespace, path: 'forum_project') - @project.build_project_feature - @project.project_feature.save - @project.add_master(@user) - end - - # Create an empty project without caring about the name - step 'I own an empty project' do - @project = create(:project, name: 'Empty Project', namespace: @user.namespace) - @project.add_master(@user) - end - - step 'I visit my empty project page' do - project = Project.find_by(name: 'Empty Project') - visit project_path(project) - end - - step 'I visit project "Shop" activity page' do - project = Project.find_by(name: 'Shop') - visit project_path(project) - end - - step 'project "Shop" has push event' do - @project = Project.find_by(name: "Shop") - @event = create(:push_event, project: @project, author: @user) - - create(:push_event_payload, - event: @event, - action: :created, - commit_to: '6d394385cf567f80a8fd85055db1ab4c5295806f', - ref: 'fix', - commit_count: 1) - end - - step 'I should see project "Shop" activity feed' do - project = Project.find_by(name: "Shop") - expect(page).to have_content "#{@user.name} pushed new branch fix at #{project.full_name}" - end - - step 'I should see project settings' do - expect(current_path).to eq edit_project_path(@project) - expect(page).to have_content("Project name") - expect(page).to have_content("Permissions") - end - def current_project @project ||= Project.first end @@ -206,24 +140,6 @@ module SharedProject create(:label, project: project, title: 'enhancement') end - step 'project "Shop" has CI enabled' do - project = Project.find_by(name: "Shop") - project.enable_ci - end - - step 'project "Shop" has CI build' do - project = Project.find_by(name: "Shop") - pipeline = create :ci_pipeline, project: project, sha: project.commit.sha, ref: 'master' - pipeline.skip - end - - step 'I should see last commit with CI status' do - page.within ".blob-commit-info" do - expect(page).to have_content(project.commit.sha[0..6]) - expect(page).to have_link("Commit: skipped") - end - end - step 'The project is internal' do @project.update(visibility_level: Gitlab::VisibilityLevel::INTERNAL) end |