mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-08 23:18:18 -07:00
Refactor construct_graph_row_presenter to return negative values for x-offset and extract percentage method
This commit is contained in:
parent
1782ef3482
commit
810a702333
3 changed files with 25 additions and 18 deletions
|
|
@ -77,7 +77,7 @@ RSpec.describe "construct graph row presenter" do
|
|||
end
|
||||
|
||||
it('returns an x-offset equal to the bar width') do
|
||||
expect(presenter.x_offset).to eq 29
|
||||
expect(presenter.x_offset).to eq -29
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -95,7 +95,7 @@ RSpec.describe "construct graph row presenter" do
|
|||
end
|
||||
|
||||
it('returns an x-offset equal to the bar width') do
|
||||
expect(presenter.x_offset).to be > 0
|
||||
expect(presenter.x_offset).to eq -216
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -113,7 +113,7 @@ RSpec.describe "construct graph row presenter" do
|
|||
end
|
||||
|
||||
it('returns an x-offset equal to the bar width') do
|
||||
expect(presenter.x_offset).to eq 424
|
||||
expect(presenter.x_offset).to eq -424
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue