mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
quit uimanager before run uimanager in test
This commit is contained in:
@@ -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{
|
||||
document = DocumentRegistry:openDocument(sample_epub),
|
||||
}
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user