2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
koreader/spec/unit/widget_progresswidget_spec.lua
Frans de Jonge 9eb073a524 [travis] Add protection against unscaled sizes
As pointed out by @poire-z

* [fix, UX] SkimToWidget scaling

* [fix] Button scaling

* [fix, UX] Scale ProgressWidget

* [fix, UX] Scale confirmbox

* [fix, UX] Scale just about everything
2017-09-23 20:24:45 +02:00

19 lines
560 B
Lua

describe("ProgressWidget widget", function()
local ProgressWidget, Screen
setup(function()
require("commonrequire")
ProgressWidget = require("ui/widget/progresswidget")
Screen = require("device").screen
end)
it("should not crash with nil self.last", function()
local progress = ProgressWidget:new{
width = Screen:scaleBySize(100),
height = Screen:scaleBySize(50),
percentage = 5/100,
ticks = {1},
}
progress:paintTo(Screen.bb, 0, 0)
end)
end)