Commit 098ad0a5 authored by Robert Speicher's avatar Robert Speicher

Remove "mystery guest" from Milestone filtering features

parent cf7c57aa
require 'spec_helper' require 'rails_helper'
feature 'Issue filtering by Milestone', feature: true do feature 'Issue filtering by Milestone', feature: true do
include Select2Helper include Select2Helper
let(:project) { create(:project) } scenario 'filters by no Milestone', js: true do
project = create(:project, :public)
before do
login_as(:admin)
end
scenario 'User filters by Issues without a Milestone', js: true do
create(:issue, project: project) create(:issue, project: project)
visit_issues visit_issues(project)
filter_by_milestone(Milestone::None.title) filter_by_milestone(Milestone::None.title)
expect(page).to have_css('.issue-title', count: 1) expect(page).to have_css('.issue-title', count: 1)
end end
scenario 'User filters by Issues with a specific Milestone', js: true do scenario 'filters by a specific Milestone', js: true do
project = create(:project, :public)
milestone = create(:milestone, project: project) milestone = create(:milestone, project: project)
create(:issue, project: project, milestone: milestone) create(:issue, project: project, milestone: milestone)
visit_issues visit_issues(project)
filter_by_milestone(milestone.title) filter_by_milestone(milestone.title)
expect(page).to have_css('.issue-title', count: 1) expect(page).to have_css('.issue-title', count: 1)
end end
def visit_issues def visit_issues(project)
visit namespace_project_issues_path(project.namespace, project) visit namespace_project_issues_path(project.namespace, project)
end end
......
require 'spec_helper' require 'rails_helper'
feature 'Merge Request filtering by Milestone', feature: true do feature 'Merge Request filtering by Milestone', feature: true do
include Select2Helper include Select2Helper
let(:project) { create(:project) } scenario 'filters by no Milestone', js: true do
project = create(:project, :public)
create(:merge_request, :with_diffs, source_project: project)
before do visit_merge_requests(project)
login_as(:admin)
end
scenario 'User filters by Merge Requests without a Milestone', js: true do
create(:merge_request, :simple, source_project: project)
visit_merge_requests
filter_by_milestone(Milestone::None.title) filter_by_milestone(Milestone::None.title)
expect(page).to have_css('.merge-request-title', count: 1) expect(page).to have_css('.merge-request-title', count: 1)
end end
scenario 'User filters by Merge Requests with a specific Milestone', js: true do scenario 'filters by a specific Milestone', js: true do
project = create(:project, :public)
milestone = create(:milestone, project: project) milestone = create(:milestone, project: project)
create(:merge_request, :simple, source_project: project, milestone: milestone) create(:merge_request, :with_diffs, source_project: project, milestone: milestone)
visit_merge_requests visit_merge_requests(project)
filter_by_milestone(milestone.title) filter_by_milestone(milestone.title)
expect(page).to have_css('.merge-request-title', count: 1) expect(page).to have_css('.merge-request-title', count: 1)
end end
def visit_merge_requests def visit_merge_requests(project)
visit namespace_project_merge_requests_path(project.namespace, project) visit namespace_project_merge_requests_path(project.namespace, project)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment