[Editor] Add the uiManager to the window object when testing
This commit is contained in:
parent
341a0b6d47
commit
e037c5711d
@ -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();
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user