[fix, spec] re-enable ReaderView tests (#4970)

It's not clear to me where the value is set as expected when running all tests linearly because it doesn't seem to be ReaderFooter.
pull/4974/head
Frans de Jonge 5 years ago committed by GitHub
parent e869041632
commit 4dc116ed6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -47,8 +47,9 @@ describe("Readerview module", function()
end
end)
-- TODO FIX THESE TESTS THEY'RE BROKEN!!!
it("should return and restore view context in page mode #notest", function()
it("should return and restore view context in page mode", function()
-- we don't want a footer for this test
G_reader_settings:saveSetting("reader_footer_mode", 0)
local sample_pdf = "spec/front/unit/data/2col.pdf"
local readerui = ReaderUI:new{
document = DocumentRegistry:openDocument(sample_pdf),
@ -94,9 +95,12 @@ describe("Readerview module", function()
assert.is.same(view.state.page, 2)
assert.is.same(view.visible_area.x, 0)
assert.is.same(view.visible_area.y, 10)
G_reader_settings:delSetting("reader_footer_mode")
end)
it("should return and restore view context in scroll mode #notest", function()
it("should return and restore view context in scroll mode", function()
-- we don't want a footer for this test
G_reader_settings:saveSetting("reader_footer_mode", 0)
local sample_pdf = "spec/front/unit/data/2col.pdf"
local readerui = ReaderUI:new{
document = DocumentRegistry:openDocument(sample_pdf),
@ -142,5 +146,6 @@ describe("Readerview module", function()
assert.is.same(view.page_states[1].page, 2)
assert.is.same(view.page_states[1].visible_area.x, 0)
assert.is.same(view.page_states[1].visible_area.y, 10)
G_reader_settings:delSetting("reader_footer_mode")
end)
end)

Loading…
Cancel
Save