From 66b661b72679173071d290658527dd1e8910de31 Mon Sep 17 00:00:00 2001 From: hius07 <62179190+hius07@users.noreply.github.com> Date: Wed, 31 May 2023 18:57:01 +0300 Subject: [PATCH] Update readerhighlight_spec.lua (#10515) --- spec/unit/readerhighlight_spec.lua | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/spec/unit/readerhighlight_spec.lua b/spec/unit/readerhighlight_spec.lua index 85d77a72d..153335350 100644 --- a/spec/unit/readerhighlight_spec.lua +++ b/spec/unit/readerhighlight_spec.lua @@ -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)