diff options
author | blackst0ne <blackst0ne.ru@gmail.com> | 2018-04-11 11:47:23 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-04-11 11:47:23 +0000 |
commit | 90cccf0f9feabfdc963c9bb8638e12548b4d179b (patch) | |
tree | 66b99636abac3e3c6e20ab74a7c1a8d0aef4fab5 /features | |
parent | 5566bc86b1634d4455ee74ab16464ccdd8d4c594 (diff) | |
download | gitlab-ce-90cccf0f9feabfdc963c9bb8638e12548b4d179b.tar.gz |
Replace the `project/issues/milestones.feature` spinach test with an rspec analog
Diffstat (limited to 'features')
-rw-r--r-- | features/project/issues/milestones.feature | 43 | ||||
-rw-r--r-- | features/steps/project/issues/milestones.rb | 58 | ||||
-rw-r--r-- | features/steps/shared/markdown.rb | 4 | ||||
-rw-r--r-- | features/steps/shared/paths.rb | 8 |
4 files changed, 0 insertions, 113 deletions
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/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/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 4ba83499e3c..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 @@ -373,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 |