1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00
pdf.js/test/integration
Tim van der Meij 253a7333d8
Fix the "must highlight text in the right position" integration test
This commit implements the following improvements for the test:

- Replace the hardcoded highlight padding with a dynamic calculation. It
  turns out that the amount of padding can differ per system, possibly
  due to e.g. local (font) settings, which could cause the test to fail.
  The test now no longer implicitly depends on the environment.
- Remove the page offset subtraction. It's only needed for one assertion,
  and we can simply add the page offset there once.
- Improve the "magic" numbers in the test. The number 5 is removed now
  that the padding calculation made it obsolete, the number 28 is changed
  to 30 because that's the actual value in the PDF data and the number 4
  is explained a bit more to state that the space also counts as a glyph.
- Annotate the steps and checks to improve readability of the test and
  to explain why certain calculations have to be performed.
2024-04-11 13:42:08 +02:00
..
.eslintrc Implement a linting rule to discourage using waitForTimeout for new tests 2024-04-09 16:12:15 +02:00
accessibility_spec.mjs Convert the integration test-files to JavaScript modules 2023-10-12 13:18:20 +02:00
annotation_spec.mjs Implement a linting rule to discourage using waitForTimeout for new tests 2024-04-09 16:12:15 +02:00
caret_browsing_spec.mjs [Editor] Add the possibility to create an highlight from the context menu when some text is selected (bug 1867739) 2024-02-23 16:18:03 +01:00
copy_paste_spec.mjs Simplify the copy & paste integration test 2024-03-19 22:29:59 +01:00
find_spec.mjs Fix the "must highlight text in the right position" integration test 2024-04-11 13:42:08 +02:00
freetext_editor_spec.mjs Implement a linting rule to discourage using waitForTimeout for new tests 2024-04-09 16:12:15 +02:00
highlight_editor_spec.mjs [Editor] Remove the mark from the highlight element and set its role to mark (bug 1889623) 2024-04-04 18:06:05 +02:00
ink_editor_spec.mjs [Editor] Don't add an already added editor (bug 1890367) 2024-04-08 19:50:55 +02:00
scripting_spec.mjs Merge pull request #17915 from timvandermeij/lint-waitfortimeout 2024-04-11 12:19:36 +02:00
stamp_editor_spec.mjs [Editor] Correctly handle lines when pasting some text in a freetext 2024-03-27 17:48:43 +01:00
test_utils.mjs Merge pull request #17915 from timvandermeij/lint-waitfortimeout 2024-04-11 12:19:36 +02:00
text_field_spec.mjs Remove terminal white spaces when extracting text from annotation appearances 2024-01-09 10:42:53 +01:00
viewer_spec.mjs Avoid wrong scrolling when calling zoomReset 2024-03-21 16:04:36 +01:00