[api-minor] Implement securityHandler in the scripting API (bug 1731578)

This commit is contained in:
Jane-Kotovich 2021-10-26 00:09:26 +10:00
parent 1ab9a6e36e
commit 91fc643ff9
7 changed files with 32 additions and 1 deletions

View file

@ -896,4 +896,26 @@ describe("Interaction", () => {
);
});
});
describe("in secHandler.pdf", () => {
let pages;
beforeAll(async () => {
pages = await loadAndWait("secHandler.pdf", "#\\32 5R");
});
afterAll(async () => {
await closePages(pages);
});
it("must print securityHandler value in a text field", async () => {
await Promise.all(
pages.map(async ([browserName, page]) => {
const text = await actAndWaitForInput(page, "#\\32 5R", async () => {
await page.click("[data-annotation-id='26R']");
});
expect(text).withContext(`In ${browserName}`).toEqual("Standard");
})
);
});
});
});