Merge pull request #19950 from timvandermeij/intermittent-all-await
Fix missing `await` for asynchronous method calls in the integration tests
This commit is contained in:
commit
60574fb7e3
@ -669,7 +669,7 @@ describe("FreeText Editor", () => {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
page.evaluate(() => {
|
await page.evaluate(() => {
|
||||||
window.PDFViewerApplication.eventBus.dispatch(
|
window.PDFViewerApplication.eventBus.dispatch(
|
||||||
"switchannotationeditorparams",
|
"switchannotationeditorparams",
|
||||||
{
|
{
|
||||||
@ -1290,7 +1290,7 @@ describe("FreeText Editor", () => {
|
|||||||
".selectedEditor .internal"
|
".selectedEditor .internal"
|
||||||
);
|
);
|
||||||
|
|
||||||
page.evaluate(() => {
|
await page.evaluate(() => {
|
||||||
window.PDFViewerApplication.eventBus.dispatch(
|
window.PDFViewerApplication.eventBus.dispatch(
|
||||||
"switchannotationeditorparams",
|
"switchannotationeditorparams",
|
||||||
{
|
{
|
||||||
|
|||||||
@ -626,7 +626,7 @@ describe("Highlight Editor", () => {
|
|||||||
const { width: prevWidth } = await getRect(page, editorSelector);
|
const { width: prevWidth } = await getRect(page, editorSelector);
|
||||||
|
|
||||||
value = 24;
|
value = 24;
|
||||||
page.evaluate(val => {
|
await page.evaluate(val => {
|
||||||
window.PDFViewerApplication.eventBus.dispatch(
|
window.PDFViewerApplication.eventBus.dispatch(
|
||||||
"switchannotationeditorparams",
|
"switchannotationeditorparams",
|
||||||
{
|
{
|
||||||
@ -763,7 +763,7 @@ describe("Highlight Editor", () => {
|
|||||||
|
|
||||||
const { width: prevWidth } = await getRect(page, editorSelector);
|
const { width: prevWidth } = await getRect(page, editorSelector);
|
||||||
|
|
||||||
page.evaluate(val => {
|
await page.evaluate(val => {
|
||||||
window.PDFViewerApplication.eventBus.dispatch(
|
window.PDFViewerApplication.eventBus.dispatch(
|
||||||
"switchannotationeditorparams",
|
"switchannotationeditorparams",
|
||||||
{
|
{
|
||||||
|
|||||||
@ -302,7 +302,7 @@ describe("Ink Editor", () => {
|
|||||||
await page.mouse.up();
|
await page.mouse.up();
|
||||||
await awaitPromise(clickHandle);
|
await awaitPromise(clickHandle);
|
||||||
|
|
||||||
page.mouse.click(rect.x - 10, rect.y + 10);
|
await page.mouse.click(rect.x - 10, rect.y + 10);
|
||||||
await page.waitForSelector(`${getEditorSelector(0)}.disabled`);
|
await page.waitForSelector(`${getEditorSelector(0)}.disabled`);
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@ -583,7 +583,7 @@ describe("Ink Editor", () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const red = "#ff0000";
|
const red = "#ff0000";
|
||||||
page.evaluate(value => {
|
await page.evaluate(value => {
|
||||||
window.PDFViewerApplication.eventBus.dispatch(
|
window.PDFViewerApplication.eventBus.dispatch(
|
||||||
"switchannotationeditorparams",
|
"switchannotationeditorparams",
|
||||||
{
|
{
|
||||||
@ -763,7 +763,7 @@ describe("Ink Editor", () => {
|
|||||||
await selectEditor(page, pdfjsA);
|
await selectEditor(page, pdfjsA);
|
||||||
|
|
||||||
const red = "#ff0000";
|
const red = "#ff0000";
|
||||||
page.evaluate(value => {
|
await page.evaluate(value => {
|
||||||
window.PDFViewerApplication.eventBus.dispatch(
|
window.PDFViewerApplication.eventBus.dispatch(
|
||||||
"switchannotationeditorparams",
|
"switchannotationeditorparams",
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user