Update readerhighlight_spec.lua (#10515)

This commit is contained in:
hius07
2023-05-31 18:57:01 +03:00
committed by GitHub
parent 1944f54aa0
commit 66b661b726

View File

@@ -154,6 +154,13 @@ describe("Readerhighlight module", function()
after_each(function()
readerui.highlight:clear()
end)
it("should response on tap gesture", function()
tap_highlight_text(readerui,
Geom:new{ x = 260, y = 70 },
Geom:new{ x = 260, y = 150 },
Geom:new{ x = 280, y = 110 })
Screen:shot("screenshots/reader_tap_highlight_text_pdf.png")
end)
it("should highlight single word", function()
highlight_single_word(readerui, Geom:new{ x = 260, y = 70 })
Screen:shot("screenshots/reader_highlight_single_word_pdf.png")
@@ -162,13 +169,6 @@ describe("Readerhighlight module", function()
highlight_text(readerui, Geom:new{ x = 260, y = 170 }, Geom:new{ x = 260, y = 250 })
Screen:shot("screenshots/reader_highlight_text_pdf.png")
end)
it("should response on tap gesture", function()
tap_highlight_text(readerui,
Geom:new{ x = 260, y = 70 },
Geom:new{ x = 260, y = 150 },
Geom:new{ x = 280, y = 110 })
Screen:shot("screenshots/reader_tap_highlight_text_pdf.png")
end)
end)
describe("for scanned page without text layer", function()
before_each(function()
@@ -179,6 +179,10 @@ describe("Readerhighlight module", function()
after_each(function()
readerui.highlight:clear()
end)
it("should respond to tap gesture", function()
tap_highlight_text(readerui, Geom:new{ x = 260, y = 70 }, Geom:new{ x = 260, y = 150 }, Geom:new{ x = 280, y = 110 })
Screen:shot("screenshots/reader_tap_highlight_text_pdf_scanned.png")
end)
it("should highlight single word", function()
highlight_single_word(readerui, Geom:new{ x = 260, y = 70 })
Screen:shot("screenshots/reader_highlight_single_word_pdf_scanned.png")
@@ -187,10 +191,6 @@ describe("Readerhighlight module", function()
highlight_text(readerui, Geom:new{ x = 260, y = 70 }, Geom:new{ x = 260, y = 150 })
Screen:shot("screenshots/reader_highlight_text_pdf_scanned.png")
end)
it("should respond to tap gesture", function()
tap_highlight_text(readerui, Geom:new{ x = 260, y = 70 }, Geom:new{ x = 260, y = 150 }, Geom:new{ x = 280, y = 110 })
Screen:shot("screenshots/reader_tap_highlight_text_pdf_scanned.png")
end)
end)
describe("for reflowed page", function()
before_each(function()
@@ -206,6 +206,10 @@ describe("Readerhighlight module", function()
-- We haven't torn it down yet
ReaderUI.instance = readerui
end)
it("should response on tap gesture", function()
tap_highlight_text(readerui, Geom:new{ x = 260, y = 70 }, Geom:new{ x = 260, y = 150 }, Geom:new{ x = 280, y = 110 })
Screen:shot("screenshots/reader_tap_highlight_text_pdf_reflowed.png")
end)
it("should highlight single word", function()
highlight_single_word(readerui, Geom:new{ x = 260, y = 70 })
Screen:shot("screenshots/reader_highlight_single_word_pdf_reflowed.png")
@@ -214,10 +218,6 @@ describe("Readerhighlight module", function()
highlight_text(readerui, Geom:new{ x = 260, y = 70 }, Geom:new{ x = 260, y = 150 })
Screen:shot("screenshots/reader_highlight_text_pdf_reflowed.png")
end)
it("should response on tap gesture", function()
tap_highlight_text(readerui, Geom:new{ x = 260, y = 70 }, Geom:new{ x = 260, y = 150 }, Geom:new{ x = 280, y = 110 })
Screen:shot("screenshots/reader_tap_highlight_text_pdf_reflowed.png")
end)
end)
end)