1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00
pdf.js/test
Tim van der Meij 9d09c56014
Remove the getSelectedEditors integration test helper function
The `getSelectedEditors` function is largely a copy of the `getEditors`
function, with three small differences:

1. `getEditors` allows getting any kind of editor whereas
   `getSelectedEditors` is harcoded to only getting selected editors.
2. `getEditors` returns editor selectors (strings) whereas
   `getSelectedEditors` returns editor IDs (integers).
3. `getSelectedEditors` returns a sorted array of editor IDs whereas
   `getEditors` does not ensure that the array is sorted.

This commit makes the `getEditors` function a drop-in replacement for
the `getSelectedEditors` function to deduplicate the code and to have a
unified way of getting editors.

Note that we don't actually use the contents of the returned array
(only its length), so we can safely change `getEditors` to return a
sorted array of integer editor IDs instead. Sorting the array makes the
return value deterministic, which is a nice property for test stability,
and integer IDs are also easier to handle in test assertions. Note that
the corresponding selector strings can also easily be obtained from the
integer IDs using the `getEditorSelector` function if needed.
2025-01-01 15:58:09 +01:00
..
chromium Enable the import/no-commonjs ESLint plugin rule 2023-10-14 12:49:17 +02:00
font Update the page title/favicon of the test runner HTML files 2024-12-22 14:08:56 +01:00
fuzz Migrate to ESLint flat config 2024-11-12 16:15:17 +01:00
images [Editor] Avoid to have a selected stamp annotation on top of the secondary toolbar (bug 1911980) 2024-09-26 17:48:02 +02:00
integration Remove the getSelectedEditors integration test helper function 2025-01-01 15:58:09 +01:00
pdfs For images that include SMask/Mask entries, ignore an SMask defined in the current graphics state 2024-12-30 14:25:07 +01:00
resources Update the page title/favicon of the test runner HTML files 2024-12-22 14:08:56 +01:00
stats Enable the import/no-commonjs ESLint plugin rule 2023-10-14 12:49:17 +02:00
types Install and use the most recent Node types for the types tests 2024-11-03 13:40:55 +01:00
unit Update the page title/favicon of the test runner HTML files 2024-12-22 14:08:56 +01:00
.gitignore Ignore test snapshots directory. 2013-03-15 11:24:08 -07:00
add_test.mjs [ESM] Convert *most* of test-folder to use standard modules 2023-07-08 13:13:04 +02:00
annotation_layer_builder_overrides.css Use CSS nesting in the annotationLayer 2023-10-27 18:46:47 +02:00
downloadutils.mjs Do not stringify errors when logging them 2024-12-06 14:47:22 +01:00
draw_layer_test.css [Editor] Add a way to extract the outlines of a union of rectangles 2023-11-20 18:45:19 +01:00
driver.js Add a ref test for setting disableFontFace to true 2024-12-08 16:06:25 +01:00
reporter.js Move the reporter file to the test root folder 2024-12-22 14:08:56 +01:00
test.mjs Move the integration tests boot file to the integration tests folder 2024-12-22 14:08:55 +01:00
test_manifest.json For images that include SMask/Mask entries, ignore an SMask defined in the current graphics state 2024-12-30 14:25:07 +01:00
test_slave.html [api-minor] Move to Fluent for the localization (bug 1858715) 2023-10-19 11:20:41 +02:00
testutils.mjs Remove the rimraf dependency in favor of the built-in Node.js fs.rmSync in the test folder 2024-04-14 16:41:59 +02:00
text_layer_test.css Use CSS nesting in the textLayer 2023-10-27 17:38:01 +02:00
webserver.mjs Ensure that a missing/invalid "Content-Range" header is handled in PDFNetworkStream (issue 19075) 2024-12-06 12:09:34 +01:00
xfa_layer_builder_overrides.css Remove unnecessary alpha-value from CSS rgb colors 2023-10-06 09:50:03 +02:00