|
|
|
@ -164,7 +164,7 @@ describe("Readerfooter module", function()
|
|
|
|
|
local timeinfo = footer.textGeneratorMap.time(footer)
|
|
|
|
|
local page_count = readerui.document:getPageCount()
|
|
|
|
|
-- stats has not been initialized here, so we get na TB and TC
|
|
|
|
|
assert.are.same('1 / '..page_count..' | '..timeinfo..' | ⇒ 0 | 0% | ⤠ 0% | ⏳ na | ⤻ na',
|
|
|
|
|
assert.are.same('1 / '..page_count..' | '..timeinfo..' | ⇒ 0 | 0% | ⤠ 0% | ⏳ na | ⤻ na',
|
|
|
|
|
footer.footer_text.text)
|
|
|
|
|
end)
|
|
|
|
|
|
|
|
|
@ -179,7 +179,7 @@ describe("Readerfooter module", function()
|
|
|
|
|
local footer = readerui.view.footer
|
|
|
|
|
readerui.view.footer:updateFooter()
|
|
|
|
|
local timeinfo = readerui.view.footer.textGeneratorMap.time(footer)
|
|
|
|
|
assert.are.same('1 / 2 | '..timeinfo..' | ⇒ 1 | 0% | ⤠ 50% | ⏳ na | ⤻ na',
|
|
|
|
|
assert.are.same('1 / 2 | '..timeinfo..' | ⇒ 1 | 0% | ⤠ 50% | ⏳ na | ⤻ na',
|
|
|
|
|
readerui.view.footer.footer_text.text)
|
|
|
|
|
end)
|
|
|
|
|
|
|
|
|
@ -197,7 +197,7 @@ describe("Readerfooter module", function()
|
|
|
|
|
footer:resetLayout()
|
|
|
|
|
footer:updateFooter()
|
|
|
|
|
local timeinfo = footer.textGeneratorMap.time(footer)
|
|
|
|
|
assert.are.same('1 / 2 | '..timeinfo..' | ⇒ 1 | 0% | ⤠ 50% | ⏳ na | ⤻ na',
|
|
|
|
|
assert.are.same('1 / 2 | '..timeinfo..' | ⇒ 1 | 0% | ⤠ 50% | ⏳ na | ⤻ na',
|
|
|
|
|
footer.footer_text.text)
|
|
|
|
|
|
|
|
|
|
-- disable show all at once, page progress should be on the first
|
|
|
|
@ -214,10 +214,10 @@ describe("Readerfooter module", function()
|
|
|
|
|
|
|
|
|
|
-- disable page left, battery should follow
|
|
|
|
|
tapFooterMenu(fake_menu, "Pages left in chapter".." (⇒)")
|
|
|
|
|
assert.are.same('0%', footer.footer_text.text)
|
|
|
|
|
assert.are.same('0%', footer.footer_text.text)
|
|
|
|
|
|
|
|
|
|
-- disable battery, percentage should follow
|
|
|
|
|
tapFooterMenu(fake_menu, "Battery status".." ()")
|
|
|
|
|
tapFooterMenu(fake_menu, "Battery status".." ()")
|
|
|
|
|
assert.are.same('⤠ 50%', footer.footer_text.text)
|
|
|
|
|
|
|
|
|
|
-- disable percentage, book time to read should follow
|
|
|
|
|