@wordpress/e2e-test-utils
Version:
End-To-End (E2E) test utils for WordPress.
14 lines • 569 B
JavaScript
/**
* The block toolbar is not always visible while typing.
* Call this function to reveal it.
*/
export async function showBlockToolbar() {
// Move the mouse to disable the isTyping mode. We need at least three
// mousemove events for it to work across windows (iframe). With three
// moves, it's a guarantee that at least two will be in the same window.
// Two events are required for the flag to be unset.
await page.mouse.move(50, 50);
await page.mouse.move(75, 75);
await page.mouse.move(100, 100);
}
//# sourceMappingURL=show-block-toolbar.js.map