Skip to content

Commit

Permalink
Merge pull request #18574 from calixteman/add_window_uimanager_test
Browse files Browse the repository at this point in the history
[Editor] Add the uiManager to the window object when testing
  • Loading branch information
calixteman authored Aug 7, 2024
2 parents 341a0b6 + e037c57 commit 3cad8d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
1 change: 1 addition & 0 deletions src/display/editor/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,7 @@ class AnnotationEditorUIManager {
this.isShiftKeyDown = false;

if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("TESTING")) {
window.uiManager = this;
Object.defineProperty(this, "reset", {
value: () => {
this.selectAll();
Expand Down
12 changes: 1 addition & 11 deletions test/integration/highlight_editor_spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -997,17 +997,7 @@ describe("Highlight Editor", () => {
"tracemonkey.pdf",
".annotationEditorLayer",
null,
async page => {
await page.evaluate(async () => {
await window.PDFViewerApplication.initializedPromise;
window.PDFViewerApplication.eventBus.on(
"annotationeditoruimanager",
({ uiManager }) => {
window.uiManager = uiManager;
}
);
});
},
null,
{
highlightEditorColors: "red=#AB0000",
supportsCaretBrowsingMode: true,
Expand Down

0 comments on commit 3cad8d1

Please sign in to comment.