Commit 098ced4f authored by Stan Hu's avatar Stan Hu Committed by Robert Speicher

Improve features to ensure Ajax filter has actually executed

parent 098ad0a5
...@@ -3,9 +3,12 @@ require 'rails_helper' ...@@ -3,9 +3,12 @@ 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, :public) }
let(:milestone) { create(:milestone, project: project) }
scenario 'filters by no Milestone', js: true do scenario 'filters by no Milestone', js: true do
project = create(:project, :public)
create(:issue, project: project) create(:issue, project: project)
create(:issue, project: project, milestone: milestone)
visit_issues(project) visit_issues(project)
filter_by_milestone(Milestone::None.title) filter_by_milestone(Milestone::None.title)
...@@ -14,9 +17,8 @@ feature 'Issue filtering by Milestone', feature: true do ...@@ -14,9 +17,8 @@ feature 'Issue filtering by Milestone', feature: true do
end end
scenario 'filters by a specific Milestone', js: true do scenario 'filters by a specific Milestone', js: true do
project = create(:project, :public)
milestone = create(:milestone, project: project)
create(:issue, project: project, milestone: milestone) create(:issue, project: project, milestone: milestone)
create(:issue, project: project)
visit_issues(project) visit_issues(project)
filter_by_milestone(milestone.title) filter_by_milestone(milestone.title)
......
...@@ -3,9 +3,12 @@ require 'rails_helper' ...@@ -3,9 +3,12 @@ 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, :public) }
let(:milestone) { create(:milestone, project: project) }
scenario 'filters by no Milestone', js: true do scenario 'filters by no Milestone', js: true do
project = create(:project, :public)
create(:merge_request, :with_diffs, source_project: project) create(:merge_request, :with_diffs, source_project: project)
create(:merge_request, :simple, source_project: project, milestone: milestone)
visit_merge_requests(project) visit_merge_requests(project)
filter_by_milestone(Milestone::None.title) filter_by_milestone(Milestone::None.title)
...@@ -14,9 +17,8 @@ feature 'Merge Request filtering by Milestone', feature: true do ...@@ -14,9 +17,8 @@ feature 'Merge Request filtering by Milestone', feature: true do
end end
scenario 'filters by a specific Milestone', js: true do scenario 'filters by a specific Milestone', js: true do
project = create(:project, :public)
milestone = create(:milestone, project: project)
create(:merge_request, :with_diffs, source_project: project, milestone: milestone) create(:merge_request, :with_diffs, source_project: project, milestone: milestone)
create(:merge_request, :simple, source_project: project)
visit_merge_requests(project) visit_merge_requests(project)
filter_by_milestone(milestone.title) filter_by_milestone(milestone.title)
......
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