Commit c9b14b77 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'cngo-delete-due-date-tests' into 'master'

Delete due date specs for issues list

See merge request gitlab-org/gitlab!80198
parents 7a122dc2 63c1685e
......@@ -119,89 +119,6 @@ RSpec.describe "User sorts issues" do
end
end
describe 'filtering by due date', :js do
before do
issue1.update!(due_date: 1.day.from_now)
issue2.update!(due_date: 6.days.from_now)
end
it 'filters by none' do
visit project_issues_path(project, due_date: Issue::NoDueDate.name)
page.within '.issues-list' do
expect(page).not_to have_content('foo')
expect(page).not_to have_content('bar')
expect(page).to have_content('baz')
end
end
it 'filters by any' do
visit project_issues_path(project, due_date: Issue::AnyDueDate.name)
page.within '.issues-list' do
expect(page).to have_content('foo')
expect(page).to have_content('bar')
expect(page).not_to have_content('baz')
end
end
it 'filters by due this week' do
issue1.update!(due_date: Date.today.beginning_of_week + 2.days)
issue2.update!(due_date: Date.today.end_of_week)
issue3.update!(due_date: Date.today - 8.days)
visit project_issues_path(project, due_date: Issue::DueThisWeek.name)
page.within '.issues-list' do
expect(page).to have_content('foo')
expect(page).to have_content('bar')
expect(page).not_to have_content('baz')
end
end
it 'filters by due this month' do
issue1.update!(due_date: Date.today.beginning_of_month + 2.days)
issue2.update!(due_date: Date.today.end_of_month)
issue3.update!(due_date: Date.today - 50.days)
visit project_issues_path(project, due_date: Issue::DueThisMonth.name)
page.within '.issues-list' do
expect(page).to have_content('foo')
expect(page).to have_content('bar')
expect(page).not_to have_content('baz')
end
end
it 'filters by overdue' do
issue1.update!(due_date: Date.today + 2.days)
issue2.update!(due_date: Date.today + 20.days)
issue3.update!(due_date: Date.yesterday)
visit project_issues_path(project, due_date: Issue::Overdue.name)
page.within '.issues-list' do
expect(page).not_to have_content('foo')
expect(page).not_to have_content('bar')
expect(page).to have_content('baz')
end
end
it 'filters by due next month and previous two weeks' do
issue1.update!(due_date: Date.today - 4.weeks)
issue2.update!(due_date: (Date.today + 2.months).beginning_of_month)
issue3.update!(due_date: Date.yesterday)
visit project_issues_path(project, due_date: Issue::DueNextMonthAndPreviousTwoWeeks.name)
page.within '.issues-list' do
expect(page).not_to have_content('foo')
expect(page).not_to have_content('bar')
expect(page).to have_content('baz')
end
end
end
describe 'sorting by milestone', :js do
before do
issue1.milestone = newer_due_milestone
......
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