diff options
Diffstat (limited to 'features')
-rw-r--r-- | features/groups.feature | 73 | ||||
-rw-r--r-- | features/steps/groups.rb | 147 |
2 files changed, 0 insertions, 220 deletions
diff --git a/features/groups.feature b/features/groups.feature deleted file mode 100644 index 4044bd9be79..00000000000 --- a/features/groups.feature +++ /dev/null @@ -1,73 +0,0 @@ -Feature: Groups - Background: - Given I sign in as "John Doe" - And "John Doe" is owner of group "Owned" - - Scenario: I should not see a group if it does not exist - When I visit group "NonExistentGroup" page - Then page status code should be 404 - - @javascript - Scenario: I should see group "Owned" dashboard list - When I visit group "Owned" page - Then I should see group "Owned" projects list - - @javascript - Scenario: I should see group "Owned" activity feed - When I visit group "Owned" activity page - And I should see projects activity feed - - Scenario: I should see group "Owned" issues list - Given project from group "Owned" has issues assigned to me - When I visit group "Owned" issues page - Then I should see issues from group "Owned" assigned to me - - Scenario: I should not see issues from archived project in "Owned" group issues list - Given Group "Owned" has archived project - And the archived project have some issues - When I visit group "Owned" issues page - Then I should not see issues from the archived project - - Scenario: I should see group "Owned" merge requests list - Given project from group "Owned" has merge requests assigned to me - When I visit group "Owned" merge requests page - Then I should see merge requests from group "Owned" assigned to me - - Scenario: I should not see merge requests from archived project in "Owned" group merge requests list - Given Group "Owned" has archived project - And the archived project have some merge_requests - When I visit group "Owned" merge requests page - Then I should not see merge requests from the archived project - - Scenario: I edit group "Owned" avatar - When I visit group "Owned" settings page - And I change group "Owned" avatar - And I visit group "Owned" settings page - Then I should see new group "Owned" avatar - And I should see the "Remove avatar" button - - Scenario: I remove group "Owned" avatar - When I visit group "Owned" settings page - And I have group "Owned" avatar - And I visit group "Owned" settings page - And I remove group "Owned" avatar - Then I should not see group "Owned" avatar - And I should not see the "Remove avatar" button - - # Group projects in settings - Scenario: I should see all projects in the project list in settings - Given Group "Owned" has archived project - When I visit group "Owned" projects page - Then I should see group "Owned" projects list - And I should see "archived" label - - # Public group - @javascript - Scenario: Signed out user should see group - Given "Mary Jane" is owner of group "Owned" - And I am a signed out user - And Group "Owned" has a public project "Public-project" - When I visit group "Owned" page - Then I should see group "Owned" - Then I should see project "Public-project" - diff --git a/features/steps/groups.rb b/features/steps/groups.rb deleted file mode 100644 index 753694a5392..00000000000 --- a/features/steps/groups.rb +++ /dev/null @@ -1,147 +0,0 @@ -class Spinach::Features::Groups < Spinach::FeatureSteps - include SharedAuthentication - include SharedPaths - include SharedGroup - include SharedUser - - step 'I should see group "Owned"' do - expect(page).to have_content 'Owned' - end - - step 'I am a signed out user' do - logout - end - - step 'Group "Owned" has a public project "Public-project"' do - group = owned_group - - @project = create :project, :public, - group: group, - name: "Public-project" - end - - step 'I should see project "Public-project"' do - expect(page).to have_content 'Public-project' - end - - step 'I should see group "Owned" projects list' do - owned_group.projects.each do |project| - expect(page).to have_link project.name - end - end - - step 'I should see projects activity feed' do - expect(page).to have_content 'joined project' - end - - step 'I should see issues from group "Owned" assigned to me' do - assigned_to_me(:issues).each do |issue| - expect(page).to have_content issue.title - end - end - - step 'I should not see issues from the archived project' do - @archived_project.issues.each do |issue| - expect(page).not_to have_content issue.title - end - end - - step 'I should not see merge requests from the archived project' do - @archived_project.merge_requests.each do |mr| - expect(page).not_to have_content mr.title - end - end - - step 'I should see merge requests from group "Owned" assigned to me' do - assigned_to_me(:merge_requests).each do |issue| - expect(page).to have_content issue.title[0..80] - end - end - - step 'project from group "Owned" has issues assigned to me' do - create :issue, - project: project, - assignees: [current_user], - author: current_user - end - - step 'project from group "Owned" has merge requests assigned to me' do - create :merge_request, - source_project: project, - target_project: project, - assignee: current_user, - author: current_user - end - - step 'I change group "Owned" avatar' do - attach_file(:group_avatar, File.join(Rails.root, 'spec', 'fixtures', 'banana_sample.gif')) - click_button "Save group" - owned_group.reload - end - - step 'I should see new group "Owned" avatar' do - expect(owned_group.avatar).to be_instance_of AvatarUploader - expect(owned_group.avatar.url).to eq "/uploads/-/system/group/avatar/#{Group.find_by(name: "Owned").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 group "Owned" avatar' do - attach_file(:group_avatar, File.join(Rails.root, 'spec', 'fixtures', 'banana_sample.gif')) - click_button "Save group" - owned_group.reload - end - - step 'I remove group "Owned" avatar' do - click_link "Remove avatar" - owned_group.reload - end - - step 'I should not see group "Owned" avatar' do - expect(owned_group.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 'Group "Owned" has archived project' do - group = Group.find_by(name: 'Owned') - @archived_project = create(:project, :archived, namespace: group, path: "archived-project") - end - - step 'I should see "archived" label' do - expect(page).to have_xpath("//span[@class='label label-warning']", text: 'archived') - end - - step 'I visit group "NonExistentGroup" page' do - visit group_path("NonExistentGroup") - end - - step 'the archived project have some issues' do - create :issue, - project: @archived_project, - assignees: [current_user], - author: current_user - end - - step 'the archived project have some merge requests' do - create :merge_request, - source_project: @archived_project, - target_project: @archived_project, - assignee: current_user, - author: current_user - end - - private - - def assigned_to_me(key) - project.send(key).assigned_to(current_user) - end - - def project - owned_group.projects.first - end -end |