1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Rename the toolbar buttons in order to free their current names

which can then be used for their future parent container.
This patch aims to simplify a bit the patch in #18385.
This commit is contained in:
Calixte Denizet 2024-09-17 18:08:03 +02:00
parent f68310b7b1
commit ee89bd1c39
8 changed files with 49 additions and 49 deletions

View file

@ -96,7 +96,7 @@ describe("accessibility", () => {
.toBeTrue();
const handle = await waitForPageRendered(page);
await page.click(`#zoom${i < 4 ? "In" : "Out"}`);
await page.click(`#zoom${i < 4 ? "In" : "Out"}Button`);
await awaitPromise(handle);
}
})

View file

@ -40,8 +40,8 @@ describe("find bar", () => {
await Promise.all(
pages.map(async ([browserName, page]) => {
// Highlight all occurrences of the letter A (case insensitive).
await page.click("#viewFind");
await page.waitForSelector("#viewFind", { hidden: false });
await page.click("#viewFindButton");
await page.waitForSelector("#viewFindButton", { hidden: false });
await page.type("#findInput", "a");
await page.click("#findHighlightAll");
await page.waitForSelector(".textLayer .highlight");
@ -100,8 +100,8 @@ describe("find bar", () => {
it("must search xfa correctly", async () => {
await Promise.all(
pages.map(async ([browserName, page]) => {
await page.click("#viewFind");
await page.waitForSelector("#viewFind", { hidden: false });
await page.click("#viewFindButton");
await page.waitForSelector("#viewFindButton", { hidden: false });
await page.type("#findInput", "preferences");
await page.waitForSelector("#findInput[data-status='']");
await page.waitForSelector(".xfaLayer .highlight");

View file

@ -2741,7 +2741,7 @@ describe("FreeText Editor", () => {
it("must create an editor from the toolbar", async () => {
await Promise.all(
pages.map(async ([browserName, page]) => {
await page.focus("#editorFreeText");
await page.focus("#editorFreeTextButton");
await page.keyboard.press("Enter");
let selectorEditor = getEditorSelector(0);
@ -2772,7 +2772,7 @@ describe("FreeText Editor", () => {
// Disable editing mode.
await switchToFreeText(page, /* disable = */ true);
await page.focus("#editorFreeText");
await page.focus("#editorFreeTextButton");
await page.keyboard.press(" ");
selectorEditor = getEditorSelector(1);
await page.waitForSelector(selectorEditor, {

View file

@ -462,7 +462,7 @@ describe("Interaction", () => {
page,
getSelector("47R"),
async () => {
await page.click("#print");
await page.click("#printButton");
}
);
expect(text).withContext(`In ${browserName}`).toEqual("WillPrint");
@ -509,7 +509,7 @@ describe("Interaction", () => {
page,
getSelector("47R"),
async () => {
await page.click("#download");
await page.click("#downloadButton");
}
);
expect(text).withContext(`In ${browserName}`).toEqual("WillSave");

View file

@ -749,7 +749,7 @@ async function switchToEditor(name, page, disable = false) {
{ once: true }
);
});
await page.click(`#editor${name}`);
await page.click(`#editor${name}Button`);
name = name.toLowerCase();
await page.waitForSelector(
".annotationEditorLayer" +