JS - Collect and execute actions at doc and pages level

* the goal is to execute actions like Open or OpenAction
 * can be tested with issue6106.pdf (auto-print)
 * once #12701 is merged, we can add page actions
This commit is contained in:
Calixte Denizet 2020-12-07 19:22:14 +01:00
parent 142f131ee1
commit 1e2173f038
18 changed files with 829 additions and 125 deletions

View file

@ -27,6 +27,20 @@ describe("Interaction", () => {
await closePages(pages);
});
it("must check that first text field has focus", async () => {
await Promise.all(
pages.map(async ([browserName, page]) => {
// The document has an open action in order to give
// the focus to 401R.
await page.waitForTimeout(1000);
const id = await page.evaluate(
() => window.document.activeElement.id
);
expect(id).withContext(`In ${browserName}`).toEqual("401R");
})
);
});
it("must show a text field and then make in invisible when content is removed", async () => {
await Promise.all(
pages.map(async ([browserName, page]) => {