@wordpress/e2e-test-utils-playwright 1.46.0 → 1.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build-types/admin/index.d.ts +3 -0
- package/build-types/admin/index.d.ts.map +1 -1
- package/build-types/admin/visit-site-editor.d.ts.map +1 -1
- package/build-types/admin/wait-for-site-editor.d.ts +12 -0
- package/build-types/admin/wait-for-site-editor.d.ts.map +1 -0
- package/build-types/metrics/index.d.ts +22 -5
- package/build-types/metrics/index.d.ts.map +1 -1
- package/build-types/request-utils/index.d.ts +3 -1
- package/build-types/request-utils/index.d.ts.map +1 -1
- package/build-types/request-utils/preferences.d.ts +11 -0
- package/build-types/request-utils/preferences.d.ts.map +1 -1
- package/package.json +4 -5
- package/src/admin/create-new-post.ts +47 -0
- package/src/admin/edit-post.ts +24 -0
- package/{build/admin/get-page-error.js → src/admin/get-page-error.ts} +12 -9
- package/src/admin/index.ts +52 -0
- package/src/admin/visit-admin-page.ts +43 -0
- package/src/admin/visit-site-editor.ts +62 -0
- package/src/admin/wait-for-site-editor.ts +52 -0
- package/src/config.ts +12 -0
- package/src/editor/click-block-options-menu-item.ts +18 -0
- package/src/editor/click-block-toolbar-button.ts +21 -0
- package/src/editor/get-blocks.ts +75 -0
- package/src/editor/get-edited-post-content.ts +19 -0
- package/src/editor/index.ts +95 -0
- package/src/editor/insert-block.ts +54 -0
- package/src/editor/open-document-settings-sidebar.ts +31 -0
- package/src/editor/preview.ts +32 -0
- package/src/editor/publish-post.ts +51 -0
- package/src/editor/save-draft.ts +20 -0
- package/src/editor/select-blocks.ts +48 -0
- package/src/editor/set-content.ts +24 -0
- package/src/editor/set-is-fixed-toolbar.ts +20 -0
- package/src/editor/set-preferences.ts +37 -0
- package/src/editor/show-block-toolbar.ts +20 -0
- package/src/editor/site-editor.ts +55 -0
- package/src/editor/switch-editor-tool.ts +34 -0
- package/src/editor/switch-to-legacy-canvas.ts +20 -0
- package/src/editor/transform-block-to.ts +34 -0
- package/src/index.ts +8 -0
- package/src/lighthouse/index.ts +75 -0
- package/src/metrics/index.ts +441 -0
- package/src/page-utils/drag-files.ts +173 -0
- package/src/page-utils/emulate-network-conditions.ts +101 -0
- package/src/page-utils/index.ts +54 -0
- package/src/page-utils/is-current-url.ts +20 -0
- package/src/page-utils/keycodes.ts +48 -0
- package/src/page-utils/press-keys.ts +195 -0
- package/{build → src}/page-utils/set-browser-viewport.js +14 -12
- package/src/request-utils/blocks.ts +58 -0
- package/src/request-utils/comments.ts +80 -0
- package/src/request-utils/gutenberg-experiments.ts +62 -0
- package/src/request-utils/index.ts +222 -0
- package/src/request-utils/login.ts +34 -0
- package/src/request-utils/media.ts +102 -0
- package/src/request-utils/menus.ts +145 -0
- package/src/request-utils/pages.ts +75 -0
- package/src/request-utils/patterns.ts +31 -0
- package/src/request-utils/plugins.ts +103 -0
- package/src/request-utils/posts.ts +69 -0
- package/src/request-utils/preferences.ts +63 -0
- package/{build/request-utils/records.js → src/request-utils/records.ts} +15 -10
- package/src/request-utils/rest.ts +222 -0
- package/src/request-utils/site-settings.ts +58 -0
- package/src/request-utils/templates.ts +83 -0
- package/src/request-utils/themes.ts +110 -0
- package/src/request-utils/users.ts +125 -0
- package/src/request-utils/widgets.js +68 -0
- package/src/test.ts +204 -0
- package/src/types.ts +13 -0
- package/build/admin/create-new-post.cjs +0 -51
- package/build/admin/create-new-post.cjs.map +0 -7
- package/build/admin/create-new-post.js +0 -31
- package/build/admin/create-new-post.js.map +0 -1
- package/build/admin/edit-post.cjs +0 -40
- package/build/admin/edit-post.cjs.map +0 -7
- package/build/admin/edit-post.js +0 -20
- package/build/admin/edit-post.js.map +0 -1
- package/build/admin/get-page-error.cjs +0 -36
- package/build/admin/get-page-error.cjs.map +0 -7
- package/build/admin/get-page-error.js.map +0 -1
- package/build/admin/index.cjs +0 -59
- package/build/admin/index.cjs.map +0 -7
- package/build/admin/index.js +0 -37
- package/build/admin/index.js.map +0 -1
- package/build/admin/visit-admin-page.cjs +0 -47
- package/build/admin/visit-admin-page.cjs.map +0 -7
- package/build/admin/visit-admin-page.js +0 -32
- package/build/admin/visit-admin-page.js.map +0 -1
- package/build/admin/visit-site-editor.cjs +0 -90
- package/build/admin/visit-site-editor.cjs.map +0 -7
- package/build/admin/visit-site-editor.js +0 -73
- package/build/admin/visit-site-editor.js.map +0 -1
- package/build/config.cjs +0 -45
- package/build/config.cjs.map +0 -7
- package/build/config.js +0 -13
- package/build/config.js.map +0 -1
- package/build/editor/click-block-options-menu-item.cjs +0 -34
- package/build/editor/click-block-options-menu-item.cjs.map +0 -7
- package/build/editor/click-block-options-menu-item.js +0 -17
- package/build/editor/click-block-options-menu-item.js.map +0 -1
- package/build/editor/click-block-toolbar-button.cjs +0 -38
- package/build/editor/click-block-toolbar-button.cjs.map +0 -7
- package/build/editor/click-block-toolbar-button.js +0 -16
- package/build/editor/click-block-toolbar-button.js.map +0 -1
- package/build/editor/get-blocks.cjs +0 -64
- package/build/editor/get-blocks.cjs.map +0 -7
- package/build/editor/get-blocks.js +0 -45
- package/build/editor/get-blocks.js.map +0 -1
- package/build/editor/get-edited-post-content.cjs +0 -36
- package/build/editor/get-edited-post-content.cjs.map +0 -7
- package/build/editor/get-edited-post-content.js +0 -15
- package/build/editor/get-edited-post-content.js.map +0 -1
- package/build/editor/index.cjs +0 -97
- package/build/editor/index.cjs.map +0 -7
- package/build/editor/index.js +0 -75
- package/build/editor/index.js.map +0 -1
- package/build/editor/insert-block.cjs +0 -55
- package/build/editor/insert-block.cjs.map +0 -7
- package/build/editor/insert-block.js +0 -23
- package/build/editor/insert-block.js.map +0 -1
- package/build/editor/open-document-settings-sidebar.cjs +0 -42
- package/build/editor/open-document-settings-sidebar.cjs.map +0 -7
- package/build/editor/open-document-settings-sidebar.js +0 -27
- package/build/editor/open-document-settings-sidebar.js.map +0 -1
- package/build/editor/preview.cjs +0 -42
- package/build/editor/preview.cjs.map +0 -7
- package/build/editor/preview.js +0 -21
- package/build/editor/preview.js.map +0 -1
- package/build/editor/publish-post.cjs +0 -47
- package/build/editor/publish-post.cjs.map +0 -7
- package/build/editor/publish-post.js +0 -45
- package/build/editor/publish-post.js.map +0 -1
- package/build/editor/save-draft.cjs +0 -34
- package/build/editor/save-draft.cjs.map +0 -7
- package/build/editor/save-draft.js +0 -18
- package/build/editor/save-draft.js.map +0 -1
- package/build/editor/select-blocks.cjs +0 -51
- package/build/editor/select-blocks.cjs.map +0 -7
- package/build/editor/select-blocks.js +0 -28
- package/build/editor/select-blocks.js.map +0 -1
- package/build/editor/set-content.cjs +0 -39
- package/build/editor/set-content.cjs.map +0 -7
- package/build/editor/set-content.js +0 -17
- package/build/editor/set-content.js.map +0 -1
- package/build/editor/set-is-fixed-toolbar.cjs +0 -36
- package/build/editor/set-is-fixed-toolbar.cjs.map +0 -7
- package/build/editor/set-is-fixed-toolbar.js +0 -18
- package/build/editor/set-is-fixed-toolbar.js.map +0 -1
- package/build/editor/set-preferences.cjs +0 -43
- package/build/editor/set-preferences.cjs.map +0 -7
- package/build/editor/set-preferences.js +0 -21
- package/build/editor/set-preferences.js.map +0 -1
- package/build/editor/show-block-toolbar.cjs +0 -35
- package/build/editor/show-block-toolbar.cjs.map +0 -7
- package/build/editor/show-block-toolbar.js +0 -19
- package/build/editor/show-block-toolbar.js.map +0 -1
- package/build/editor/site-editor.cjs +0 -51
- package/build/editor/site-editor.cjs.map +0 -7
- package/build/editor/site-editor.js +0 -44
- package/build/editor/site-editor.js.map +0 -1
- package/build/editor/switch-editor-tool.cjs +0 -47
- package/build/editor/switch-editor-tool.cjs.map +0 -7
- package/build/editor/switch-editor-tool.js +0 -33
- package/build/editor/switch-editor-tool.js.map +0 -1
- package/build/editor/switch-to-legacy-canvas.cjs +0 -39
- package/build/editor/switch-to-legacy-canvas.cjs.map +0 -7
- package/build/editor/switch-to-legacy-canvas.js +0 -18
- package/build/editor/switch-to-legacy-canvas.js.map +0 -1
- package/build/editor/transform-block-to.cjs +0 -46
- package/build/editor/transform-block-to.cjs.map +0 -7
- package/build/editor/transform-block-to.js +0 -24
- package/build/editor/transform-block-to.js.map +0 -1
- package/build/index.cjs +0 -51
- package/build/index.cjs.map +0 -7
- package/build/index.js +0 -19
- package/build/index.js.map +0 -1
- package/build/lighthouse/index.cjs +0 -96
- package/build/lighthouse/index.cjs.map +0 -7
- package/build/lighthouse/index.js +0 -61
- package/build/lighthouse/index.js.map +0 -1
- package/build/metrics/index.cjs +0 -309
- package/build/metrics/index.cjs.map +0 -7
- package/build/metrics/index.js +0 -258
- package/build/metrics/index.js.map +0 -1
- package/build/page-utils/drag-files.cjs +0 -143
- package/build/page-utils/drag-files.cjs.map +0 -7
- package/build/page-utils/drag-files.js +0 -119
- package/build/page-utils/drag-files.js.map +0 -1
- package/build/page-utils/emulate-network-conditions.cjs +0 -99
- package/build/page-utils/emulate-network-conditions.cjs.map +0 -7
- package/build/page-utils/emulate-network-conditions.js +0 -71
- package/build/page-utils/emulate-network-conditions.js.map +0 -1
- package/build/page-utils/index.cjs +0 -59
- package/build/page-utils/index.cjs.map +0 -7
- package/build/page-utils/index.js +0 -37
- package/build/page-utils/index.js.map +0 -1
- package/build/page-utils/is-current-url.cjs +0 -36
- package/build/page-utils/is-current-url.cjs.map +0 -7
- package/build/page-utils/is-current-url.js +0 -21
- package/build/page-utils/is-current-url.js.map +0 -1
- package/build/page-utils/keycodes.cjs +0 -55
- package/build/page-utils/keycodes.cjs.map +0 -7
- package/build/page-utils/keycodes.js +0 -41
- package/build/page-utils/keycodes.js.map +0 -1
- package/build/page-utils/press-keys.cjs +0 -165
- package/build/page-utils/press-keys.cjs.map +0 -7
- package/build/page-utils/press-keys.js +0 -141
- package/build/page-utils/press-keys.js.map +0 -1
- package/build/page-utils/set-browser-viewport.cjs +0 -39
- package/build/page-utils/set-browser-viewport.cjs.map +0 -7
- package/build/page-utils/set-browser-viewport.js.map +0 -1
- package/build/request-utils/blocks.cjs +0 -51
- package/build/request-utils/blocks.cjs.map +0 -7
- package/build/request-utils/blocks.js +0 -40
- package/build/request-utils/blocks.js.map +0 -1
- package/build/request-utils/comments.cjs +0 -66
- package/build/request-utils/comments.cjs.map +0 -7
- package/build/request-utils/comments.js +0 -52
- package/build/request-utils/comments.js.map +0 -1
- package/build/request-utils/gutenberg-experiments.cjs +0 -56
- package/build/request-utils/gutenberg-experiments.cjs.map +0 -7
- package/build/request-utils/gutenberg-experiments.js +0 -47
- package/build/request-utils/gutenberg-experiments.js.map +0 -1
- package/build/request-utils/index.cjs +0 -199
- package/build/request-utils/index.cjs.map +0 -7
- package/build/request-utils/index.js +0 -194
- package/build/request-utils/index.js.map +0 -1
- package/build/request-utils/login.cjs +0 -48
- package/build/request-utils/login.cjs.map +0 -7
- package/build/request-utils/login.js +0 -21
- package/build/request-utils/login.js.map +0 -1
- package/build/request-utils/media.cjs +0 -83
- package/build/request-utils/media.cjs.map +0 -7
- package/build/request-utils/media.js +0 -106
- package/build/request-utils/media.js.map +0 -1
- package/build/request-utils/menus.cjs +0 -128
- package/build/request-utils/menus.cjs.map +0 -7
- package/build/request-utils/menus.js +0 -116
- package/build/request-utils/menus.js.map +0 -1
- package/build/request-utils/pages.cjs +0 -66
- package/build/request-utils/pages.cjs.map +0 -7
- package/build/request-utils/pages.js +0 -53
- package/build/request-utils/pages.js.map +0 -1
- package/build/request-utils/patterns.cjs +0 -44
- package/build/request-utils/patterns.cjs.map +0 -7
- package/build/request-utils/patterns.js +0 -27
- package/build/request-utils/patterns.js.map +0 -1
- package/build/request-utils/plugins.cjs +0 -81
- package/build/request-utils/plugins.cjs.map +0 -7
- package/build/request-utils/plugins.js +0 -85
- package/build/request-utils/plugins.js.map +0 -1
- package/build/request-utils/posts.cjs +0 -56
- package/build/request-utils/posts.cjs.map +0 -7
- package/build/request-utils/posts.js +0 -42
- package/build/request-utils/posts.js.map +0 -1
- package/build/request-utils/preferences.cjs +0 -41
- package/build/request-utils/preferences.cjs.map +0 -7
- package/build/request-utils/preferences.js +0 -20
- package/build/request-utils/preferences.js.map +0 -1
- package/build/request-utils/records.cjs +0 -37
- package/build/request-utils/records.cjs.map +0 -7
- package/build/request-utils/records.js.map +0 -1
- package/build/request-utils/rest.cjs +0 -174
- package/build/request-utils/rest.cjs.map +0 -7
- package/build/request-utils/rest.js +0 -181
- package/build/request-utils/rest.js.map +0 -1
- package/build/request-utils/site-settings.cjs +0 -45
- package/build/request-utils/site-settings.cjs.map +0 -7
- package/build/request-utils/site-settings.js +0 -33
- package/build/request-utils/site-settings.js.map +0 -1
- package/build/request-utils/templates.cjs +0 -68
- package/build/request-utils/templates.cjs.map +0 -7
- package/build/request-utils/templates.js +0 -54
- package/build/request-utils/templates.js.map +0 -1
- package/build/request-utils/themes.cjs +0 -92
- package/build/request-utils/themes.cjs.map +0 -7
- package/build/request-utils/themes.js +0 -69
- package/build/request-utils/themes.js.map +0 -1
- package/build/request-utils/users.cjs +0 -83
- package/build/request-utils/users.cjs.map +0 -7
- package/build/request-utils/users.js +0 -81
- package/build/request-utils/users.js.map +0 -1
- package/build/request-utils/widgets.cjs +0 -79
- package/build/request-utils/widgets.cjs.map +0 -7
- package/build/request-utils/widgets.js +0 -61
- package/build/request-utils/widgets.js.map +0 -1
- package/build/test.cjs +0 -136
- package/build/test.cjs.map +0 -7
- package/build/test.js +0 -189
- package/build/test.js.map +0 -1
- package/build/types.cjs +0 -19
- package/build/types.cjs.map +0 -7
- package/build/types.js +0 -3
- package/build/types.js.map +0 -1
package/build/editor/preview.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.openPreviewPage = openPreviewPage;
|
|
4
|
-
/**
|
|
5
|
-
* Opens the preview page of an edited post.
|
|
6
|
-
*
|
|
7
|
-
* @param this
|
|
8
|
-
*
|
|
9
|
-
* @return preview page.
|
|
10
|
-
*/
|
|
11
|
-
async function openPreviewPage() {
|
|
12
|
-
const editorTopBar = this.page.locator('role=region[name="Editor top bar"i]');
|
|
13
|
-
const previewButton = editorTopBar.locator('role=button[name="View"i]');
|
|
14
|
-
await previewButton.click();
|
|
15
|
-
const [previewPage] = await Promise.all([
|
|
16
|
-
this.context.waitForEvent('page'),
|
|
17
|
-
this.page.click('role=menuitem[name="Preview in new tab"i]'),
|
|
18
|
-
]);
|
|
19
|
-
return previewPage;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=preview.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preview.js","sourceRoot":"","sources":["../../src/editor/preview.ts"],"names":[],"mappings":";;;AAUA;;;;;;GAMG;AACI,KAAK;IACX,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CACrC,qCAAqC,CACrC,CAAC;IACF,MAAM,aAAa,GAAG,YAAY,CAAC,OAAO,CAAE,2BAA2B,CAAE,CAAC;IAE1E,MAAM,aAAa,CAAC,KAAK,EAAE,CAAC;IAE5B,MAAM,CAAE,WAAW,CAAE,GAAG,MAAM,OAAO,CAAC,GAAG,CAAE;QAC1C,IAAI,CAAC,OAAO,CAAC,YAAY,CAAE,MAAM,CAAE;QACnC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAE,2CAA2C,CAAE;KAC9D,CAAE,CAAC;IAEJ,OAAO,WAAW,CAAC;AACpB,CAAC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// packages/e2e-test-utils-playwright/src/editor/publish-post.ts
|
|
21
|
-
var publish_post_exports = {};
|
|
22
|
-
__export(publish_post_exports, {
|
|
23
|
-
publishPost: () => publishPost
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(publish_post_exports);
|
|
26
|
-
async function publishPost() {
|
|
27
|
-
const saveButton = this.page.getByRole("region", { name: "Editor top bar" }).getByRole("button", { name: "Save", exact: true });
|
|
28
|
-
const publishButton = this.page.getByRole("region", { name: "Editor top bar" }).getByRole("button", { name: "Publish", exact: true });
|
|
29
|
-
const buttonToClick = await saveButton.isVisible() ? saveButton : publishButton;
|
|
30
|
-
await buttonToClick.click();
|
|
31
|
-
const entitiesSaveButton = this.page.getByRole("region", { name: "Editor publish" }).getByRole("button", { name: "Save", exact: true });
|
|
32
|
-
const isEntitiesSavePanelVisible = await entitiesSaveButton.isVisible();
|
|
33
|
-
if (isEntitiesSavePanelVisible) {
|
|
34
|
-
await entitiesSaveButton.click();
|
|
35
|
-
}
|
|
36
|
-
await this.page.getByRole("region", {
|
|
37
|
-
name: "Editor publish"
|
|
38
|
-
}).getByRole("button", { name: "Publish", exact: true }).click();
|
|
39
|
-
await this.page.getByRole("button", { name: "Dismiss this notice" }).filter({ hasText: "published" }).waitFor();
|
|
40
|
-
const postId = new URL(this.page.url()).searchParams.get("post");
|
|
41
|
-
return typeof postId === "string" ? parseInt(postId, 10) : null;
|
|
42
|
-
}
|
|
43
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
-
0 && (module.exports = {
|
|
45
|
-
publishPost
|
|
46
|
-
});
|
|
47
|
-
//# sourceMappingURL=publish-post.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/editor/publish-post.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Editor } from './index';\n\n/**\n * Publishes the post, resolving once the request is complete (once a notice\n * is displayed).\n *\n * @param this\n */\nexport async function publishPost( this: Editor ) {\n\t// If we have changes in other entities, the label is `Save` instead of `Publish`.\n\tconst saveButton = this.page\n\t\t.getByRole( 'region', { name: 'Editor top bar' } )\n\t\t.getByRole( 'button', { name: 'Save', exact: true } );\n\tconst publishButton = this.page\n\t\t.getByRole( 'region', { name: 'Editor top bar' } )\n\t\t.getByRole( 'button', { name: 'Publish', exact: true } );\n\tconst buttonToClick = ( await saveButton.isVisible() )\n\t\t? saveButton\n\t\t: publishButton;\n\tawait buttonToClick.click();\n\n\tconst entitiesSaveButton = this.page\n\t\t.getByRole( 'region', { name: 'Editor publish' } )\n\t\t.getByRole( 'button', { name: 'Save', exact: true } );\n\tconst isEntitiesSavePanelVisible = await entitiesSaveButton.isVisible();\n\n\t// Save any entities.\n\tif ( isEntitiesSavePanelVisible ) {\n\t\t// Handle saving entities.\n\t\tawait entitiesSaveButton.click();\n\t}\n\n\t// Handle saving just the post.\n\tawait this.page\n\t\t.getByRole( 'region', {\n\t\t\tname: 'Editor publish',\n\t\t} )\n\t\t.getByRole( 'button', { name: 'Publish', exact: true } )\n\t\t.click();\n\n\tawait this.page\n\t\t.getByRole( 'button', { name: 'Dismiss this notice' } )\n\t\t.filter( { hasText: 'published' } )\n\t\t.waitFor();\n\tconst postId = new URL( this.page.url() ).searchParams.get( 'post' );\n\n\treturn typeof postId === 'string' ? parseInt( postId, 10 ) : null;\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,eAAsB,cAA4B;AAEjD,QAAM,aAAa,KAAK,KACtB,UAAW,UAAU,EAAE,MAAM,iBAAiB,CAAE,EAChD,UAAW,UAAU,EAAE,MAAM,QAAQ,OAAO,KAAK,CAAE;AACrD,QAAM,gBAAgB,KAAK,KACzB,UAAW,UAAU,EAAE,MAAM,iBAAiB,CAAE,EAChD,UAAW,UAAU,EAAE,MAAM,WAAW,OAAO,KAAK,CAAE;AACxD,QAAM,gBAAkB,MAAM,WAAW,UAAU,IAChD,aACA;AACH,QAAM,cAAc,MAAM;AAE1B,QAAM,qBAAqB,KAAK,KAC9B,UAAW,UAAU,EAAE,MAAM,iBAAiB,CAAE,EAChD,UAAW,UAAU,EAAE,MAAM,QAAQ,OAAO,KAAK,CAAE;AACrD,QAAM,6BAA6B,MAAM,mBAAmB,UAAU;AAGtE,MAAK,4BAA6B;AAEjC,UAAM,mBAAmB,MAAM;AAAA,EAChC;AAGA,QAAM,KAAK,KACT,UAAW,UAAU;AAAA,IACrB,MAAM;AAAA,EACP,CAAE,EACD,UAAW,UAAU,EAAE,MAAM,WAAW,OAAO,KAAK,CAAE,EACtD,MAAM;AAER,QAAM,KAAK,KACT,UAAW,UAAU,EAAE,MAAM,sBAAsB,CAAE,EACrD,OAAQ,EAAE,SAAS,YAAY,CAAE,EACjC,QAAQ;AACV,QAAM,SAAS,IAAI,IAAK,KAAK,KAAK,IAAI,CAAE,EAAE,aAAa,IAAK,MAAO;AAEnE,SAAO,OAAO,WAAW,WAAW,SAAU,QAAQ,EAAG,IAAI;AAC9D;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.publishPost = publishPost;
|
|
4
|
-
/**
|
|
5
|
-
* Publishes the post, resolving once the request is complete (once a notice
|
|
6
|
-
* is displayed).
|
|
7
|
-
*
|
|
8
|
-
* @param this
|
|
9
|
-
*/
|
|
10
|
-
async function publishPost() {
|
|
11
|
-
// If we have changes in other entities, the label is `Save` instead of `Publish`.
|
|
12
|
-
const saveButton = this.page
|
|
13
|
-
.getByRole('region', { name: 'Editor top bar' })
|
|
14
|
-
.getByRole('button', { name: 'Save', exact: true });
|
|
15
|
-
const publishButton = this.page
|
|
16
|
-
.getByRole('region', { name: 'Editor top bar' })
|
|
17
|
-
.getByRole('button', { name: 'Publish', exact: true });
|
|
18
|
-
const buttonToClick = (await saveButton.isVisible())
|
|
19
|
-
? saveButton
|
|
20
|
-
: publishButton;
|
|
21
|
-
await buttonToClick.click();
|
|
22
|
-
const entitiesSaveButton = this.page
|
|
23
|
-
.getByRole('region', { name: 'Editor publish' })
|
|
24
|
-
.getByRole('button', { name: 'Save', exact: true });
|
|
25
|
-
const isEntitiesSavePanelVisible = await entitiesSaveButton.isVisible();
|
|
26
|
-
// Save any entities.
|
|
27
|
-
if (isEntitiesSavePanelVisible) {
|
|
28
|
-
// Handle saving entities.
|
|
29
|
-
await entitiesSaveButton.click();
|
|
30
|
-
}
|
|
31
|
-
// Handle saving just the post.
|
|
32
|
-
await this.page
|
|
33
|
-
.getByRole('region', {
|
|
34
|
-
name: 'Editor publish',
|
|
35
|
-
})
|
|
36
|
-
.getByRole('button', { name: 'Publish', exact: true })
|
|
37
|
-
.click();
|
|
38
|
-
await this.page
|
|
39
|
-
.getByRole('button', { name: 'Dismiss this notice' })
|
|
40
|
-
.filter({ hasText: 'published' })
|
|
41
|
-
.waitFor();
|
|
42
|
-
const postId = new URL(this.page.url()).searchParams.get('post');
|
|
43
|
-
return typeof postId === 'string' ? parseInt(postId, 10) : null;
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=publish-post.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"publish-post.js","sourceRoot":"","sources":["../../src/editor/publish-post.ts"],"names":[],"mappings":";;;AAKA;;;;;GAKG;AACI,KAAK;IACX,kFAAkF;IAClF,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI;SAC1B,SAAS,CAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAE;SACjD,SAAS,CAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAE,CAAC;IACvD,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI;SAC7B,SAAS,CAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAE;SACjD,SAAS,CAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,CAAE,CAAC;IAC1D,MAAM,aAAa,GAAG,CAAE,MAAM,UAAU,CAAC,SAAS,EAAE,CAAE;QACrD,CAAC,CAAC,UAAU;QACZ,CAAC,CAAC,aAAa,CAAC;IACjB,MAAM,aAAa,CAAC,KAAK,EAAE,CAAC;IAE5B,MAAM,kBAAkB,GAAG,IAAI,CAAC,IAAI;SAClC,SAAS,CAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAE;SACjD,SAAS,CAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAE,CAAC;IACvD,MAAM,0BAA0B,GAAG,MAAM,kBAAkB,CAAC,SAAS,EAAE,CAAC;IAExE,qBAAqB;IACrB,IAAK,0BAA0B,EAAG,CAAC;QAClC,0BAA0B;QAC1B,MAAM,kBAAkB,CAAC,KAAK,EAAE,CAAC;IAClC,CAAC;IAED,+BAA+B;IAC/B,MAAM,IAAI,CAAC,IAAI;SACb,SAAS,CAAE,QAAQ,EAAE;QACrB,IAAI,EAAE,gBAAgB;KACtB,CAAE;SACF,SAAS,CAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,CAAE;SACvD,KAAK,EAAE,CAAC;IAEV,MAAM,IAAI,CAAC,IAAI;SACb,SAAS,CAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,qBAAqB,EAAE,CAAE;SACtD,MAAM,CAAE,EAAE,OAAO,EAAE,WAAW,EAAE,CAAE;SAClC,OAAO,EAAE,CAAC;IACZ,MAAM,MAAM,GAAG,IAAI,GAAG,CAAE,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAE,CAAC,YAAY,CAAC,GAAG,CAAE,MAAM,CAAE,CAAC;IAErE,OAAO,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAE,MAAM,EAAE,EAAE,CAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACnE,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// packages/e2e-test-utils-playwright/src/editor/save-draft.ts
|
|
21
|
-
var save_draft_exports = {};
|
|
22
|
-
__export(save_draft_exports, {
|
|
23
|
-
saveDraft: () => saveDraft
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(save_draft_exports);
|
|
26
|
-
async function saveDraft() {
|
|
27
|
-
await this.page.getByRole("region", { name: "Editor top bar" }).getByRole("button", { name: "Save draft" }).click();
|
|
28
|
-
await this.page.getByRole("button", { name: "Dismiss this notice" }).filter({ hasText: "Draft saved" }).waitFor();
|
|
29
|
-
}
|
|
30
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
-
0 && (module.exports = {
|
|
32
|
-
saveDraft
|
|
33
|
-
});
|
|
34
|
-
//# sourceMappingURL=save-draft.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/editor/save-draft.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Editor } from './index';\n\n/**\n * Saves the post as a draft, resolving once the request is complete (once a notice\n * is displayed).\n */\nexport async function saveDraft( this: Editor ) {\n\tawait this.page\n\t\t.getByRole( 'region', { name: 'Editor top bar' } )\n\t\t.getByRole( 'button', { name: 'Save draft' } )\n\t\t.click();\n\n\tawait this.page\n\t\t.getByRole( 'button', { name: 'Dismiss this notice' } )\n\t\t.filter( { hasText: 'Draft saved' } )\n\t\t.waitFor();\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,eAAsB,YAA0B;AAC/C,QAAM,KAAK,KACT,UAAW,UAAU,EAAE,MAAM,iBAAiB,CAAE,EAChD,UAAW,UAAU,EAAE,MAAM,aAAa,CAAE,EAC5C,MAAM;AAER,QAAM,KAAK,KACT,UAAW,UAAU,EAAE,MAAM,sBAAsB,CAAE,EACrD,OAAQ,EAAE,SAAS,cAAc,CAAE,EACnC,QAAQ;AACX;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.saveDraft = saveDraft;
|
|
4
|
-
/**
|
|
5
|
-
* Saves the post as a draft, resolving once the request is complete (once a notice
|
|
6
|
-
* is displayed).
|
|
7
|
-
*/
|
|
8
|
-
async function saveDraft() {
|
|
9
|
-
await this.page
|
|
10
|
-
.getByRole('region', { name: 'Editor top bar' })
|
|
11
|
-
.getByRole('button', { name: 'Save draft' })
|
|
12
|
-
.click();
|
|
13
|
-
await this.page
|
|
14
|
-
.getByRole('button', { name: 'Dismiss this notice' })
|
|
15
|
-
.filter({ hasText: 'Draft saved' })
|
|
16
|
-
.waitFor();
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=save-draft.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"save-draft.js","sourceRoot":"","sources":["../../src/editor/save-draft.ts"],"names":[],"mappings":";;;AAKA;;;GAGG;AACI,KAAK;IACX,MAAM,IAAI,CAAC,IAAI;SACb,SAAS,CAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAE;SACjD,SAAS,CAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,CAAE;SAC7C,KAAK,EAAE,CAAC;IAEV,MAAM,IAAI,CAAC,IAAI;SACb,SAAS,CAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,qBAAqB,EAAE,CAAE;SACtD,MAAM,CAAE,EAAE,OAAO,EAAE,aAAa,EAAE,CAAE;SACpC,OAAO,EAAE,CAAC;AACb,CAAC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// packages/e2e-test-utils-playwright/src/editor/select-blocks.ts
|
|
21
|
-
var select_blocks_exports = {};
|
|
22
|
-
__export(select_blocks_exports, {
|
|
23
|
-
selectBlocks: () => selectBlocks
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(select_blocks_exports);
|
|
26
|
-
async function selectBlocks(startSelectorOrLocator, endSelectorOrLocator) {
|
|
27
|
-
const startBlock = typeof startSelectorOrLocator === "string" ? this.canvas.locator(startSelectorOrLocator) : startSelectorOrLocator;
|
|
28
|
-
const endBlock = typeof endSelectorOrLocator === "string" ? this.canvas.locator(endSelectorOrLocator) : endSelectorOrLocator;
|
|
29
|
-
const startClientId = await startBlock.getAttribute("data-block");
|
|
30
|
-
const endClientId = await endBlock?.getAttribute("data-block");
|
|
31
|
-
if (endClientId) {
|
|
32
|
-
await this.page.evaluate(
|
|
33
|
-
([startId, endId]) => {
|
|
34
|
-
wp.data.dispatch("core/block-editor").multiSelect(startId, endId);
|
|
35
|
-
},
|
|
36
|
-
[startClientId, endClientId]
|
|
37
|
-
);
|
|
38
|
-
} else {
|
|
39
|
-
await this.page.evaluate(
|
|
40
|
-
([clientId]) => {
|
|
41
|
-
wp.data.dispatch("core/block-editor").selectBlock(clientId);
|
|
42
|
-
},
|
|
43
|
-
[startClientId]
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
-
0 && (module.exports = {
|
|
49
|
-
selectBlocks
|
|
50
|
-
});
|
|
51
|
-
//# sourceMappingURL=select-blocks.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/editor/select-blocks.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport type { Locator } from '@playwright/test';\n\n/**\n * Internal dependencies\n */\nimport type { Editor } from './index';\n\nexport async function selectBlocks(\n\tthis: Editor,\n\tstartSelectorOrLocator: string | Locator,\n\tendSelectorOrLocator?: string | Locator\n) {\n\tconst startBlock =\n\t\ttypeof startSelectorOrLocator === 'string'\n\t\t\t? this.canvas.locator( startSelectorOrLocator )\n\t\t\t: startSelectorOrLocator;\n\n\tconst endBlock =\n\t\ttypeof endSelectorOrLocator === 'string'\n\t\t\t? this.canvas.locator( endSelectorOrLocator )\n\t\t\t: endSelectorOrLocator;\n\n\tconst startClientId = await startBlock.getAttribute( 'data-block' );\n\tconst endClientId = await endBlock?.getAttribute( 'data-block' );\n\n\tif ( endClientId ) {\n\t\tawait this.page.evaluate(\n\t\t\t( [ startId, endId ] ) => {\n\t\t\t\t// @ts-ignore\n\t\t\t\twp.data\n\t\t\t\t\t.dispatch( 'core/block-editor' )\n\t\t\t\t\t.multiSelect( startId, endId );\n\t\t\t},\n\t\t\t[ startClientId, endClientId ]\n\t\t);\n\t} else {\n\t\tawait this.page.evaluate(\n\t\t\t( [ clientId ] ) => {\n\t\t\t\t// @ts-ignore\n\t\t\t\twp.data.dispatch( 'core/block-editor' ).selectBlock( clientId );\n\t\t\t},\n\t\t\t[ startClientId ]\n\t\t);\n\t}\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,eAAsB,aAErB,wBACA,sBACC;AACD,QAAM,aACL,OAAO,2BAA2B,WAC/B,KAAK,OAAO,QAAS,sBAAuB,IAC5C;AAEJ,QAAM,WACL,OAAO,yBAAyB,WAC7B,KAAK,OAAO,QAAS,oBAAqB,IAC1C;AAEJ,QAAM,gBAAgB,MAAM,WAAW,aAAc,YAAa;AAClE,QAAM,cAAc,MAAM,UAAU,aAAc,YAAa;AAE/D,MAAK,aAAc;AAClB,UAAM,KAAK,KAAK;AAAA,MACf,CAAE,CAAE,SAAS,KAAM,MAAO;AAEzB,WAAG,KACD,SAAU,mBAAoB,EAC9B,YAAa,SAAS,KAAM;AAAA,MAC/B;AAAA,MACA,CAAE,eAAe,WAAY;AAAA,IAC9B;AAAA,EACD,OAAO;AACN,UAAM,KAAK,KAAK;AAAA,MACf,CAAE,CAAE,QAAS,MAAO;AAEnB,WAAG,KAAK,SAAU,mBAAoB,EAAE,YAAa,QAAS;AAAA,MAC/D;AAAA,MACA,CAAE,aAAc;AAAA,IACjB;AAAA,EACD;AACD;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.selectBlocks = selectBlocks;
|
|
4
|
-
async function selectBlocks(startSelectorOrLocator, endSelectorOrLocator) {
|
|
5
|
-
const startBlock = typeof startSelectorOrLocator === 'string'
|
|
6
|
-
? this.canvas.locator(startSelectorOrLocator)
|
|
7
|
-
: startSelectorOrLocator;
|
|
8
|
-
const endBlock = typeof endSelectorOrLocator === 'string'
|
|
9
|
-
? this.canvas.locator(endSelectorOrLocator)
|
|
10
|
-
: endSelectorOrLocator;
|
|
11
|
-
const startClientId = await startBlock.getAttribute('data-block');
|
|
12
|
-
const endClientId = await endBlock?.getAttribute('data-block');
|
|
13
|
-
if (endClientId) {
|
|
14
|
-
await this.page.evaluate(([startId, endId]) => {
|
|
15
|
-
// @ts-ignore
|
|
16
|
-
wp.data
|
|
17
|
-
.dispatch('core/block-editor')
|
|
18
|
-
.multiSelect(startId, endId);
|
|
19
|
-
}, [startClientId, endClientId]);
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
await this.page.evaluate(([clientId]) => {
|
|
23
|
-
// @ts-ignore
|
|
24
|
-
wp.data.dispatch('core/block-editor').selectBlock(clientId);
|
|
25
|
-
}, [startClientId]);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=select-blocks.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"select-blocks.js","sourceRoot":"","sources":["../../src/editor/select-blocks.ts"],"names":[],"mappings":";;;AAUO,KAAK,uBAEX,sBAAwC,EACxC,oBAAuC;IAEvC,MAAM,UAAU,GACf,OAAO,sBAAsB,KAAK,QAAQ;QACzC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAE,sBAAsB,CAAE;QAC/C,CAAC,CAAC,sBAAsB,CAAC;IAE3B,MAAM,QAAQ,GACb,OAAO,oBAAoB,KAAK,QAAQ;QACvC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAE,oBAAoB,CAAE;QAC7C,CAAC,CAAC,oBAAoB,CAAC;IAEzB,MAAM,aAAa,GAAG,MAAM,UAAU,CAAC,YAAY,CAAE,YAAY,CAAE,CAAC;IACpE,MAAM,WAAW,GAAG,MAAM,QAAQ,EAAE,YAAY,CAAE,YAAY,CAAE,CAAC;IAEjE,IAAK,WAAW,EAAG,CAAC;QACnB,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,CACvB,CAAE,CAAE,OAAO,EAAE,KAAK,CAAE,EAAG,EAAE;YACxB,aAAa;YACb,EAAE,CAAC,IAAI;iBACL,QAAQ,CAAE,mBAAmB,CAAE;iBAC/B,WAAW,CAAE,OAAO,EAAE,KAAK,CAAE,CAAC;QACjC,CAAC,EACD,CAAE,aAAa,EAAE,WAAW,CAAE,CAC9B,CAAC;IACH,CAAC;SAAM,CAAC;QACP,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,CACvB,CAAE,CAAE,QAAQ,CAAE,EAAG,EAAE;YAClB,aAAa;YACb,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAE,mBAAmB,CAAE,CAAC,WAAW,CAAE,QAAQ,CAAE,CAAC;QACjE,CAAC,EACD,CAAE,aAAa,CAAE,CACjB,CAAC;IACH,CAAC;AACF,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// packages/e2e-test-utils-playwright/src/editor/set-content.ts
|
|
21
|
-
var set_content_exports = {};
|
|
22
|
-
__export(set_content_exports, {
|
|
23
|
-
setContent: () => setContent
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(set_content_exports);
|
|
26
|
-
async function setContent(html) {
|
|
27
|
-
await this.page.waitForFunction(
|
|
28
|
-
() => window?.wp?.blocks && window?.wp?.data
|
|
29
|
-
);
|
|
30
|
-
await this.page.evaluate((_html) => {
|
|
31
|
-
const blocks = window.wp.blocks.parse(_html);
|
|
32
|
-
window.wp.data.dispatch("core/block-editor").resetBlocks(blocks);
|
|
33
|
-
}, html);
|
|
34
|
-
}
|
|
35
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
36
|
-
0 && (module.exports = {
|
|
37
|
-
setContent
|
|
38
|
-
});
|
|
39
|
-
//# sourceMappingURL=set-content.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/editor/set-content.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Editor } from './index';\n\n/**\n * Set the content of the editor.\n *\n * @param this\n * @param html Serialized block HTML.\n */\nasync function setContent( this: Editor, html: string ) {\n\tawait this.page.waitForFunction(\n\t\t() => window?.wp?.blocks && window?.wp?.data\n\t);\n\n\tawait this.page.evaluate( ( _html ) => {\n\t\tconst blocks = window.wp.blocks.parse( _html );\n\n\t\twindow.wp.data.dispatch( 'core/block-editor' ).resetBlocks( blocks );\n\t}, html );\n}\n\nexport { setContent };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,eAAe,WAA0B,MAAe;AACvD,QAAM,KAAK,KAAK;AAAA,IACf,MAAM,QAAQ,IAAI,UAAU,QAAQ,IAAI;AAAA,EACzC;AAEA,QAAM,KAAK,KAAK,SAAU,CAAE,UAAW;AACtC,UAAM,SAAS,OAAO,GAAG,OAAO,MAAO,KAAM;AAE7C,WAAO,GAAG,KAAK,SAAU,mBAAoB,EAAE,YAAa,MAAO;AAAA,EACpE,GAAG,IAAK;AACT;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setContent = setContent;
|
|
4
|
-
/**
|
|
5
|
-
* Set the content of the editor.
|
|
6
|
-
*
|
|
7
|
-
* @param this
|
|
8
|
-
* @param html Serialized block HTML.
|
|
9
|
-
*/
|
|
10
|
-
async function setContent(html) {
|
|
11
|
-
await this.page.waitForFunction(() => window?.wp?.blocks && window?.wp?.data);
|
|
12
|
-
await this.page.evaluate((_html) => {
|
|
13
|
-
const blocks = window.wp.blocks.parse(_html);
|
|
14
|
-
window.wp.data.dispatch('core/block-editor').resetBlocks(blocks);
|
|
15
|
-
}, html);
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=set-content.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"set-content.js","sourceRoot":"","sources":["../../src/editor/set-content.ts"],"names":[],"mappings":";;QAuBS,UAAU;AAlBnB;;;;;GAKG;AACH,KAAK,UAAU,UAAU,CAAgB,IAAY;IACpD,MAAM,IAAI,CAAC,IAAI,CAAC,eAAe,CAC9B,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,EAAE,MAAM,IAAI,MAAM,EAAE,EAAE,EAAE,IAAI,CAC5C,CAAC;IAEF,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAE,CAAE,KAAK,EAAG,EAAE;QACrC,MAAM,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAE,KAAK,CAAE,CAAC;QAE/C,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAE,mBAAmB,CAAE,CAAC,WAAW,CAAE,MAAM,CAAE,CAAC;IACtE,CAAC,EAAE,IAAI,CAAE,CAAC;AACX,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// packages/e2e-test-utils-playwright/src/editor/set-is-fixed-toolbar.ts
|
|
21
|
-
var set_is_fixed_toolbar_exports = {};
|
|
22
|
-
__export(set_is_fixed_toolbar_exports, {
|
|
23
|
-
setIsFixedToolbar: () => setIsFixedToolbar
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(set_is_fixed_toolbar_exports);
|
|
26
|
-
async function setIsFixedToolbar(isFixed) {
|
|
27
|
-
await this.page.waitForFunction(() => window?.wp?.data);
|
|
28
|
-
await this.page.evaluate((_isFixed) => {
|
|
29
|
-
window.wp.data.dispatch("core/preferences").set("core", "fixedToolbar", _isFixed);
|
|
30
|
-
}, isFixed);
|
|
31
|
-
}
|
|
32
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
-
0 && (module.exports = {
|
|
34
|
-
setIsFixedToolbar
|
|
35
|
-
});
|
|
36
|
-
//# sourceMappingURL=set-is-fixed-toolbar.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/editor/set-is-fixed-toolbar.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Editor } from './index';\n\n/**\n * Toggles the fixed toolbar option.\n *\n * @param this\n * @param isFixed Boolean value true/false for on/off.\n */\nexport async function setIsFixedToolbar( this: Editor, isFixed: boolean ) {\n\tawait this.page.waitForFunction( () => window?.wp?.data );\n\n\tawait this.page.evaluate( ( _isFixed ) => {\n\t\twindow.wp.data\n\t\t\t.dispatch( 'core/preferences' )\n\t\t\t.set( 'core', 'fixedToolbar', _isFixed );\n\t}, isFixed );\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,eAAsB,kBAAiC,SAAmB;AACzE,QAAM,KAAK,KAAK,gBAAiB,MAAM,QAAQ,IAAI,IAAK;AAExD,QAAM,KAAK,KAAK,SAAU,CAAE,aAAc;AACzC,WAAO,GAAG,KACR,SAAU,kBAAmB,EAC7B,IAAK,QAAQ,gBAAgB,QAAS;AAAA,EACzC,GAAG,OAAQ;AACZ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setIsFixedToolbar = setIsFixedToolbar;
|
|
4
|
-
/**
|
|
5
|
-
* Toggles the fixed toolbar option.
|
|
6
|
-
*
|
|
7
|
-
* @param this
|
|
8
|
-
* @param isFixed Boolean value true/false for on/off.
|
|
9
|
-
*/
|
|
10
|
-
async function setIsFixedToolbar(isFixed) {
|
|
11
|
-
await this.page.waitForFunction(() => window?.wp?.data);
|
|
12
|
-
await this.page.evaluate((_isFixed) => {
|
|
13
|
-
window.wp.data
|
|
14
|
-
.dispatch('core/preferences')
|
|
15
|
-
.set('core', 'fixedToolbar', _isFixed);
|
|
16
|
-
}, isFixed);
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=set-is-fixed-toolbar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"set-is-fixed-toolbar.js","sourceRoot":"","sources":["../../src/editor/set-is-fixed-toolbar.ts"],"names":[],"mappings":";;;AAKA;;;;;GAKG;AACI,KAAK,4BAA2C,OAAgB;IACtE,MAAM,IAAI,CAAC,IAAI,CAAC,eAAe,CAAE,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,CAAE,CAAC;IAE1D,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAE,CAAE,QAAQ,EAAG,EAAE;QACxC,MAAM,CAAC,EAAE,CAAC,IAAI;aACZ,QAAQ,CAAE,kBAAkB,CAAE;aAC9B,GAAG,CAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,CAAE,CAAC;IAC3C,CAAC,EAAE,OAAO,CAAE,CAAC;AACd,CAAC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// packages/e2e-test-utils-playwright/src/editor/set-preferences.ts
|
|
21
|
-
var set_preferences_exports = {};
|
|
22
|
-
__export(set_preferences_exports, {
|
|
23
|
-
setPreferences: () => setPreferences
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(set_preferences_exports);
|
|
26
|
-
async function setPreferences(context, preferences) {
|
|
27
|
-
await this.page.waitForFunction(() => window?.wp?.data);
|
|
28
|
-
await this.page.evaluate(
|
|
29
|
-
async (props) => {
|
|
30
|
-
for (const [key, value] of Object.entries(
|
|
31
|
-
props.preferences
|
|
32
|
-
)) {
|
|
33
|
-
await window.wp.data.dispatch("core/preferences").set(props.context, key, value);
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
{ context, preferences }
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
-
0 && (module.exports = {
|
|
41
|
-
setPreferences
|
|
42
|
-
});
|
|
43
|
-
//# sourceMappingURL=set-preferences.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/editor/set-preferences.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Editor } from './index';\n\ntype PreferencesContext =\n\t| 'core/edit-post'\n\t| 'core/edit-site'\n\t| 'core/customize-widgets';\n\n/**\n * Set the preferences of the editor.\n *\n * @param this\n * @param context Context to set preferences for.\n * @param preferences Preferences to set.\n */\nexport async function setPreferences(\n\tthis: Editor,\n\tcontext: PreferencesContext,\n\tpreferences: Record< string, any >\n) {\n\tawait this.page.waitForFunction( () => window?.wp?.data );\n\n\tawait this.page.evaluate(\n\t\tasync ( props ) => {\n\t\t\tfor ( const [ key, value ] of Object.entries(\n\t\t\t\tprops.preferences\n\t\t\t) ) {\n\t\t\t\tawait window.wp.data\n\t\t\t\t\t.dispatch( 'core/preferences' )\n\t\t\t\t\t.set( props.context, key, value );\n\t\t\t}\n\t\t},\n\t\t{ context, preferences }\n\t);\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBA,eAAsB,eAErB,SACA,aACC;AACD,QAAM,KAAK,KAAK,gBAAiB,MAAM,QAAQ,IAAI,IAAK;AAExD,QAAM,KAAK,KAAK;AAAA,IACf,OAAQ,UAAW;AAClB,iBAAY,CAAE,KAAK,KAAM,KAAK,OAAO;AAAA,QACpC,MAAM;AAAA,MACP,GAAI;AACH,cAAM,OAAO,GAAG,KACd,SAAU,kBAAmB,EAC7B,IAAK,MAAM,SAAS,KAAK,KAAM;AAAA,MAClC;AAAA,IACD;AAAA,IACA,EAAE,SAAS,YAAY;AAAA,EACxB;AACD;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setPreferences = setPreferences;
|
|
4
|
-
/**
|
|
5
|
-
* Set the preferences of the editor.
|
|
6
|
-
*
|
|
7
|
-
* @param this
|
|
8
|
-
* @param context Context to set preferences for.
|
|
9
|
-
* @param preferences Preferences to set.
|
|
10
|
-
*/
|
|
11
|
-
async function setPreferences(context, preferences) {
|
|
12
|
-
await this.page.waitForFunction(() => window?.wp?.data);
|
|
13
|
-
await this.page.evaluate(async (props) => {
|
|
14
|
-
for (const [key, value] of Object.entries(props.preferences)) {
|
|
15
|
-
await window.wp.data
|
|
16
|
-
.dispatch('core/preferences')
|
|
17
|
-
.set(props.context, key, value);
|
|
18
|
-
}
|
|
19
|
-
}, { context, preferences });
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=set-preferences.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"set-preferences.js","sourceRoot":"","sources":["../../src/editor/set-preferences.ts"],"names":[],"mappings":";;;AAUA;;;;;;GAMG;AACI,KAAK,yBAEX,OAA2B,EAC3B,WAAkC;IAElC,MAAM,IAAI,CAAC,IAAI,CAAC,eAAe,CAAE,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,CAAE,CAAC;IAE1D,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,CACvB,KAAK,EAAG,KAAK,EAAG,EAAE;QACjB,KAAM,MAAM,CAAE,GAAG,EAAE,KAAK,CAAE,IAAI,MAAM,CAAC,OAAO,CAC3C,KAAK,CAAC,WAAW,CACjB,EAAG,CAAC;YACJ,MAAM,MAAM,CAAC,EAAE,CAAC,IAAI;iBAClB,QAAQ,CAAE,kBAAkB,CAAE;iBAC9B,GAAG,CAAE,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,KAAK,CAAE,CAAC;QACpC,CAAC;IACF,CAAC,EACD,EAAE,OAAO,EAAE,WAAW,EAAE,CACxB,CAAC;AACH,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// packages/e2e-test-utils-playwright/src/editor/show-block-toolbar.ts
|
|
21
|
-
var show_block_toolbar_exports = {};
|
|
22
|
-
__export(show_block_toolbar_exports, {
|
|
23
|
-
showBlockToolbar: () => showBlockToolbar
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(show_block_toolbar_exports);
|
|
26
|
-
async function showBlockToolbar() {
|
|
27
|
-
await this.page.mouse.move(50, 50);
|
|
28
|
-
await this.page.mouse.move(75, 75);
|
|
29
|
-
await this.page.mouse.move(100, 100);
|
|
30
|
-
}
|
|
31
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
-
0 && (module.exports = {
|
|
33
|
-
showBlockToolbar
|
|
34
|
-
});
|
|
35
|
-
//# sourceMappingURL=show-block-toolbar.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/editor/show-block-toolbar.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Editor } from './index';\n\n/**\n * The block toolbar is not always visible while typing.\n * Call this function to reveal it.\n *\n * @param this\n */\nexport async function showBlockToolbar( this: Editor ) {\n\t// Move the mouse to disable the isTyping mode. We need at least three\n\t// mousemove events for it to work across windows (iframe). With three\n\t// moves, it's a guarantee that at least two will be in the same window.\n\t// Two events are required for the flag to be unset.\n\tawait this.page.mouse.move( 50, 50 );\n\tawait this.page.mouse.move( 75, 75 );\n\tawait this.page.mouse.move( 100, 100 );\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,eAAsB,mBAAiC;AAKtD,QAAM,KAAK,KAAK,MAAM,KAAM,IAAI,EAAG;AACnC,QAAM,KAAK,KAAK,MAAM,KAAM,IAAI,EAAG;AACnC,QAAM,KAAK,KAAK,MAAM,KAAM,KAAK,GAAI;AACtC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.showBlockToolbar = showBlockToolbar;
|
|
4
|
-
/**
|
|
5
|
-
* The block toolbar is not always visible while typing.
|
|
6
|
-
* Call this function to reveal it.
|
|
7
|
-
*
|
|
8
|
-
* @param this
|
|
9
|
-
*/
|
|
10
|
-
async function showBlockToolbar() {
|
|
11
|
-
// Move the mouse to disable the isTyping mode. We need at least three
|
|
12
|
-
// mousemove events for it to work across windows (iframe). With three
|
|
13
|
-
// moves, it's a guarantee that at least two will be in the same window.
|
|
14
|
-
// Two events are required for the flag to be unset.
|
|
15
|
-
await this.page.mouse.move(50, 50);
|
|
16
|
-
await this.page.mouse.move(75, 75);
|
|
17
|
-
await this.page.mouse.move(100, 100);
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=show-block-toolbar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"show-block-toolbar.js","sourceRoot":"","sources":["../../src/editor/show-block-toolbar.ts"],"names":[],"mappings":";;;AAKA;;;;;GAKG;AACI,KAAK;IACX,sEAAsE;IACtE,sEAAsE;IACtE,wEAAwE;IACxE,oDAAoD;IACpD,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAE,EAAE,EAAE,EAAE,CAAE,CAAC;IACrC,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAE,EAAE,EAAE,EAAE,CAAE,CAAC;IACrC,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAE,GAAG,EAAE,GAAG,CAAE,CAAC;AACxC,CAAC"}
|