Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions modules/backlogs/spec/features/burndown/show_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
planning_page.click_in_sprint_menu(sprint, "Burndown chart")

expect(page)
.to have_content(sprint.name)
.to have_heading(sprint.name, level: 2)
expect(page)
.to have_content "#{format_date(sprint.start_date)} – #{format_date(sprint.finish_date)}"
.to have_content "#{sprint.start_date.strftime('%m/%d/%Y')} – #{sprint.finish_date.strftime('%m/%d/%Y')}"
expect(page)
.to have_css "opce-burndown-chart"
.to have_element :"opce-burndown-chart"
end
end
18 changes: 8 additions & 10 deletions modules/backlogs/spec/models/burndown_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ def set_attribute_journalized(story, attribute, value, day)

let!(:non_working_days) do
[
create(:non_working_day, date: Date.new(2011, 4, 2)),
create(:non_working_day, date: Date.new(2011, 4, 3)),
create(:non_working_day, date: Date.new(2011, 4, 9)),
create(:non_working_day, date: Date.new(2011, 4, 10))
create(:non_working_day, date: Date.new(2011, 4, 2)), # Saturday
create(:non_working_day, date: Date.new(2011, 4, 3)), # Sunday
create(:non_working_day, date: Date.new(2011, 4, 9)), # Saturday
create(:non_working_day, date: Date.new(2011, 4, 10)) # Sunday
]
end

Expand All @@ -72,9 +72,8 @@ def set_attribute_journalized(story, attribute, value, day)
end

describe "WITH the today date fixed to April 4th, 2011 and having a 10 (working days) sprint" do
before do
allow(Time).to receive(:now).and_return(Time.utc(2011, "apr", 4, 20, 15, 1))
allow(Date).to receive(:today).and_return(Date.civil(2011, 4, 4))
around do |example|
travel_to(Time.utc(2011, "apr", 4, 20, 15, 1)) { example.run }
end

describe "WITH having a version in the future" do
Expand Down Expand Up @@ -196,9 +195,8 @@ def set_attribute_journalized(story, attribute, value, day)
let(:sprint) { create(:agile_sprint, project:) }

describe "WITH the today date fixed to April 4th, 2011 and having a 10 (working days) sprint" do
before do
allow(Time).to receive(:now).and_return(Time.utc(2011, "apr", 4, 20, 15, 1))
allow(Date).to receive(:today).and_return(Date.civil(2011, 4, 4))
around do |example|
travel_to(Time.utc(2011, "apr", 4, 20, 15, 1)) { example.run }
end

describe "WITH having a sprint in the future" do
Expand Down
Loading