|
|
|
@ -7,9 +7,12 @@ local DEBUG = require("dbg")
|
|
|
|
|
|
|
|
|
|
describe("Readerui module", function()
|
|
|
|
|
local sample_epub = "spec/front/unit/data/leaves.epub"
|
|
|
|
|
local readerui = ReaderUI:new{
|
|
|
|
|
local readerui
|
|
|
|
|
setup(function()
|
|
|
|
|
readerui = ReaderUI:new{
|
|
|
|
|
document = DocumentRegistry:openDocument(sample_epub),
|
|
|
|
|
}
|
|
|
|
|
end)
|
|
|
|
|
it("should save settings", function()
|
|
|
|
|
-- remove history settings and sidecar settings
|
|
|
|
|
DocSettings:open(sample_epub):clear()
|
|
|
|
@ -23,6 +26,7 @@ describe("Readerui module", function()
|
|
|
|
|
readerui.doc_settings.data.last_xpointer)
|
|
|
|
|
end)
|
|
|
|
|
it("should show reader", function()
|
|
|
|
|
UIManager:quit()
|
|
|
|
|
UIManager:show(readerui)
|
|
|
|
|
UIManager:scheduleIn(1, function() UIManager:close(readerui) end)
|
|
|
|
|
UIManager:run()
|
|
|
|
|