@wordpress/e2e-test-utils-playwright 1.37.0 → 1.37.1-next.06ee73755.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.
Files changed (228) hide show
  1. package/LICENSE.md +1 -1
  2. package/build/admin/create-new-post.cjs +51 -0
  3. package/build/admin/create-new-post.cjs.map +7 -0
  4. package/build/admin/create-new-post.js +28 -48
  5. package/build/admin/create-new-post.js.map +1 -7
  6. package/build/admin/edit-post.cjs +40 -0
  7. package/build/admin/edit-post.cjs.map +7 -0
  8. package/build/admin/edit-post.js +17 -37
  9. package/build/admin/edit-post.js.map +1 -7
  10. package/build/admin/get-page-error.cjs +36 -0
  11. package/build/admin/get-page-error.cjs.map +7 -0
  12. package/build/admin/get-page-error.js +23 -33
  13. package/build/admin/get-page-error.js.map +1 -7
  14. package/build/admin/index.cjs +59 -0
  15. package/build/admin/index.cjs.map +7 -0
  16. package/build/admin/index.js +36 -58
  17. package/build/admin/index.js.map +1 -7
  18. package/build/admin/visit-admin-page.cjs +47 -0
  19. package/build/admin/visit-admin-page.cjs.map +7 -0
  20. package/build/admin/visit-admin-page.js +29 -44
  21. package/build/admin/visit-admin-page.js.map +1 -7
  22. package/build/admin/visit-site-editor.cjs +77 -0
  23. package/build/admin/visit-site-editor.cjs.map +7 -0
  24. package/build/admin/visit-site-editor.js +64 -73
  25. package/build/admin/visit-site-editor.js.map +1 -7
  26. package/build/config.cjs +45 -0
  27. package/build/config.cjs.map +7 -0
  28. package/build/config.js +11 -43
  29. package/build/config.js.map +1 -7
  30. package/build/editor/click-block-options-menu-item.cjs +34 -0
  31. package/build/editor/click-block-options-menu-item.cjs.map +7 -0
  32. package/build/editor/click-block-options-menu-item.js +14 -31
  33. package/build/editor/click-block-options-menu-item.js.map +1 -7
  34. package/build/editor/click-block-toolbar-button.cjs +38 -0
  35. package/build/editor/click-block-toolbar-button.cjs.map +7 -0
  36. package/build/editor/click-block-toolbar-button.js +13 -35
  37. package/build/editor/click-block-toolbar-button.js.map +1 -7
  38. package/build/editor/get-blocks.cjs +64 -0
  39. package/build/editor/get-blocks.cjs.map +7 -0
  40. package/build/editor/get-blocks.js +43 -61
  41. package/build/editor/get-blocks.js.map +1 -7
  42. package/build/editor/get-edited-post-content.cjs +36 -0
  43. package/build/editor/get-edited-post-content.cjs.map +7 -0
  44. package/build/editor/get-edited-post-content.js +12 -33
  45. package/build/editor/get-edited-post-content.js.map +1 -7
  46. package/build/editor/index.cjs +97 -0
  47. package/build/editor/index.cjs.map +7 -0
  48. package/build/editor/index.js +74 -96
  49. package/build/editor/index.js.map +1 -7
  50. package/build/editor/insert-block.cjs +55 -0
  51. package/build/editor/insert-block.cjs.map +7 -0
  52. package/build/editor/insert-block.js +21 -52
  53. package/build/editor/insert-block.js.map +1 -7
  54. package/build/editor/open-document-settings-sidebar.cjs +42 -0
  55. package/build/editor/open-document-settings-sidebar.cjs.map +7 -0
  56. package/build/editor/open-document-settings-sidebar.js +24 -39
  57. package/build/editor/open-document-settings-sidebar.js.map +1 -7
  58. package/build/editor/preview.cjs +42 -0
  59. package/build/editor/preview.cjs.map +7 -0
  60. package/build/editor/preview.js +18 -39
  61. package/build/editor/preview.js.map +1 -7
  62. package/build/editor/publish-post.cjs +47 -0
  63. package/build/editor/publish-post.cjs.map +7 -0
  64. package/build/editor/publish-post.js +42 -44
  65. package/build/editor/publish-post.js.map +1 -7
  66. package/build/editor/save-draft.cjs +34 -0
  67. package/build/editor/save-draft.cjs.map +7 -0
  68. package/build/editor/save-draft.js +15 -31
  69. package/build/editor/save-draft.js.map +1 -7
  70. package/build/editor/select-blocks.cjs +51 -0
  71. package/build/editor/select-blocks.cjs.map +7 -0
  72. package/build/editor/select-blocks.js +25 -48
  73. package/build/editor/select-blocks.js.map +1 -7
  74. package/build/editor/set-content.cjs +39 -0
  75. package/build/editor/set-content.cjs.map +7 -0
  76. package/build/editor/set-content.js +14 -36
  77. package/build/editor/set-content.js.map +1 -7
  78. package/build/editor/set-is-fixed-toolbar.cjs +36 -0
  79. package/build/editor/set-is-fixed-toolbar.cjs.map +7 -0
  80. package/build/editor/set-is-fixed-toolbar.js +15 -33
  81. package/build/editor/set-is-fixed-toolbar.js.map +1 -7
  82. package/build/editor/set-preferences.cjs +43 -0
  83. package/build/editor/set-preferences.cjs.map +7 -0
  84. package/build/editor/set-preferences.js +18 -40
  85. package/build/editor/set-preferences.js.map +1 -7
  86. package/build/editor/show-block-toolbar.cjs +35 -0
  87. package/build/editor/show-block-toolbar.cjs.map +7 -0
  88. package/build/editor/show-block-toolbar.js +16 -32
  89. package/build/editor/show-block-toolbar.js.map +1 -7
  90. package/build/editor/site-editor.cjs +51 -0
  91. package/build/editor/site-editor.cjs.map +7 -0
  92. package/build/editor/site-editor.js +41 -48
  93. package/build/editor/site-editor.js.map +1 -7
  94. package/build/editor/switch-editor-tool.cjs +47 -0
  95. package/build/editor/switch-editor-tool.cjs.map +7 -0
  96. package/build/editor/switch-editor-tool.js +30 -44
  97. package/build/editor/switch-editor-tool.js.map +1 -7
  98. package/build/editor/switch-to-legacy-canvas.cjs +39 -0
  99. package/build/editor/switch-to-legacy-canvas.cjs.map +7 -0
  100. package/build/editor/switch-to-legacy-canvas.js +14 -35
  101. package/build/editor/switch-to-legacy-canvas.js.map +1 -7
  102. package/build/editor/transform-block-to.cjs +46 -0
  103. package/build/editor/transform-block-to.cjs.map +7 -0
  104. package/build/editor/transform-block-to.js +21 -43
  105. package/build/editor/transform-block-to.js.map +1 -7
  106. package/build/index.cjs +51 -0
  107. package/build/index.cjs.map +7 -0
  108. package/build/index.js +18 -53
  109. package/build/index.js.map +1 -7
  110. package/build/lighthouse/index.cjs +96 -0
  111. package/build/lighthouse/index.cjs.map +7 -0
  112. package/build/lighthouse/index.js +55 -93
  113. package/build/lighthouse/index.js.map +1 -7
  114. package/build/metrics/index.cjs +309 -0
  115. package/build/metrics/index.cjs.map +7 -0
  116. package/build/metrics/index.js +251 -302
  117. package/build/metrics/index.js.map +1 -7
  118. package/build/page-utils/drag-files.cjs +143 -0
  119. package/build/page-utils/drag-files.cjs.map +7 -0
  120. package/build/page-utils/drag-files.js +112 -136
  121. package/build/page-utils/drag-files.js.map +1 -7
  122. package/build/page-utils/emulate-network-conditions.cjs +99 -0
  123. package/build/page-utils/emulate-network-conditions.cjs.map +7 -0
  124. package/build/page-utils/emulate-network-conditions.js +67 -95
  125. package/build/page-utils/emulate-network-conditions.js.map +1 -7
  126. package/build/page-utils/index.cjs +59 -0
  127. package/build/page-utils/index.cjs.map +7 -0
  128. package/build/page-utils/index.js +36 -58
  129. package/build/page-utils/index.js.map +1 -7
  130. package/build/page-utils/is-current-url.cjs +36 -0
  131. package/build/page-utils/is-current-url.cjs.map +7 -0
  132. package/build/page-utils/is-current-url.js +18 -33
  133. package/build/page-utils/is-current-url.js.map +1 -7
  134. package/build/page-utils/keycodes.cjs +55 -0
  135. package/build/page-utils/keycodes.cjs.map +7 -0
  136. package/build/page-utils/keycodes.js +39 -53
  137. package/build/page-utils/keycodes.js.map +1 -7
  138. package/build/page-utils/press-keys.cjs +165 -0
  139. package/build/page-utils/press-keys.cjs.map +7 -0
  140. package/build/page-utils/press-keys.js +130 -153
  141. package/build/page-utils/press-keys.js.map +1 -7
  142. package/build/page-utils/set-browser-viewport.cjs +39 -0
  143. package/build/page-utils/set-browser-viewport.cjs.map +7 -0
  144. package/build/page-utils/set-browser-viewport.js +42 -35
  145. package/build/page-utils/set-browser-viewport.js.map +1 -7
  146. package/build/request-utils/blocks.cjs +56 -0
  147. package/build/request-utils/blocks.cjs.map +7 -0
  148. package/build/request-utils/blocks.js +40 -51
  149. package/build/request-utils/blocks.js.map +1 -7
  150. package/build/request-utils/comments.cjs +66 -0
  151. package/build/request-utils/comments.cjs.map +7 -0
  152. package/build/request-utils/comments.js +45 -59
  153. package/build/request-utils/comments.js.map +1 -7
  154. package/build/request-utils/gutenberg-experiments.cjs +66 -0
  155. package/build/request-utils/gutenberg-experiments.cjs.map +7 -0
  156. package/build/request-utils/gutenberg-experiments.js +38 -63
  157. package/build/request-utils/gutenberg-experiments.js.map +1 -7
  158. package/build/request-utils/index.cjs +194 -0
  159. package/build/request-utils/index.cjs.map +7 -0
  160. package/build/request-utils/index.js +155 -191
  161. package/build/request-utils/index.js.map +1 -7
  162. package/build/request-utils/login.cjs +48 -0
  163. package/build/request-utils/login.cjs.map +7 -0
  164. package/build/request-utils/login.js +18 -45
  165. package/build/request-utils/login.js.map +1 -7
  166. package/build/request-utils/media.cjs +83 -0
  167. package/build/request-utils/media.cjs.map +7 -0
  168. package/build/request-utils/media.js +64 -74
  169. package/build/request-utils/media.js.map +1 -7
  170. package/build/request-utils/menus.cjs +132 -0
  171. package/build/request-utils/menus.cjs.map +7 -0
  172. package/build/request-utils/menus.js +109 -121
  173. package/build/request-utils/menus.js.map +1 -7
  174. package/build/request-utils/pages.cjs +71 -0
  175. package/build/request-utils/pages.cjs.map +7 -0
  176. package/build/request-utils/pages.js +50 -63
  177. package/build/request-utils/pages.js.map +1 -7
  178. package/build/request-utils/patterns.cjs +44 -0
  179. package/build/request-utils/patterns.cjs.map +7 -0
  180. package/build/request-utils/patterns.js +24 -41
  181. package/build/request-utils/patterns.js.map +1 -7
  182. package/build/request-utils/plugins.cjs +81 -0
  183. package/build/request-utils/plugins.cjs.map +7 -0
  184. package/build/request-utils/plugins.js +74 -70
  185. package/build/request-utils/plugins.js.map +1 -7
  186. package/build/request-utils/posts.cjs +61 -0
  187. package/build/request-utils/posts.cjs.map +7 -0
  188. package/build/request-utils/posts.js +41 -55
  189. package/build/request-utils/posts.js.map +1 -7
  190. package/build/request-utils/preferences.cjs +41 -0
  191. package/build/request-utils/preferences.cjs.map +7 -0
  192. package/build/request-utils/preferences.js +17 -38
  193. package/build/request-utils/preferences.js.map +1 -7
  194. package/build/request-utils/rest.cjs +174 -0
  195. package/build/request-utils/rest.cjs.map +7 -0
  196. package/build/request-utils/rest.js +129 -155
  197. package/build/request-utils/rest.js.map +1 -7
  198. package/build/request-utils/site-settings.cjs +45 -0
  199. package/build/request-utils/site-settings.cjs.map +7 -0
  200. package/build/request-utils/site-settings.js +28 -40
  201. package/build/request-utils/site-settings.js.map +1 -7
  202. package/build/request-utils/templates.cjs +68 -0
  203. package/build/request-utils/templates.cjs.map +7 -0
  204. package/build/request-utils/templates.js +46 -60
  205. package/build/request-utils/templates.js.map +1 -7
  206. package/build/request-utils/themes.cjs +89 -0
  207. package/build/request-utils/themes.cjs.map +7 -0
  208. package/build/request-utils/themes.js +53 -80
  209. package/build/request-utils/themes.js.map +1 -7
  210. package/build/request-utils/users.cjs +83 -0
  211. package/build/request-utils/users.cjs.map +7 -0
  212. package/build/request-utils/users.js +72 -74
  213. package/build/request-utils/users.js.map +1 -7
  214. package/build/request-utils/widgets.cjs +79 -0
  215. package/build/request-utils/widgets.cjs.map +7 -0
  216. package/build/request-utils/widgets.js +55 -73
  217. package/build/request-utils/widgets.js.map +1 -7
  218. package/build/test.cjs +136 -0
  219. package/build/test.cjs.map +7 -0
  220. package/build/test.js +146 -130
  221. package/build/test.js.map +1 -7
  222. package/build/types.cjs +19 -0
  223. package/build/types.cjs.map +7 -0
  224. package/build/types.js +2 -18
  225. package/build/types.js.map +1 -7
  226. package/build-types/index.d.ts +1 -1
  227. package/build-types/index.d.ts.map +1 -1
  228. package/package.json +9 -5
@@ -0,0 +1,47 @@
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/admin/visit-admin-page.ts
21
+ var visit_admin_page_exports = {};
22
+ __export(visit_admin_page_exports, {
23
+ visitAdminPage: () => visitAdminPage
24
+ });
25
+ module.exports = __toCommonJS(visit_admin_page_exports);
26
+ var import_path = require("path");
27
+ async function visitAdminPage(adminPath, query) {
28
+ await this.page.goto(
29
+ (0, import_path.join)("wp-admin", adminPath) + (query ? `?${query}` : "")
30
+ );
31
+ if (this.pageUtils.isCurrentURL("wp-admin/upgrade.php")) {
32
+ await this.page.click(".button.button-large.button-primary");
33
+ await this.page.click(".button.button-large");
34
+ }
35
+ if (this.pageUtils.isCurrentURL("wp-login.php")) {
36
+ throw new Error("Not logged in");
37
+ }
38
+ const error = await this.getPageError();
39
+ if (error) {
40
+ throw new Error("Unexpected error in page content: " + error);
41
+ }
42
+ }
43
+ // Annotate the CommonJS export names for ESM import in node:
44
+ 0 && (module.exports = {
45
+ visitAdminPage
46
+ });
47
+ //# sourceMappingURL=visit-admin-page.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/admin/visit-admin-page.ts"],
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport { join } from 'path';\n\n/**\n * Internal dependencies\n */\nimport type { Admin } from './';\n\n/**\n * Visits admin page and handle errors.\n *\n * @param this\n * @param adminPath String to be serialized as pathname.\n * @param query String to be serialized as query portion of URL.\n */\nexport async function visitAdminPage(\n\tthis: Admin,\n\tadminPath: string,\n\tquery?: string\n) {\n\tawait this.page.goto(\n\t\tjoin( 'wp-admin', adminPath ) + ( query ? `?${ query }` : '' )\n\t);\n\n\t// Handle upgrade required screen\n\tif ( this.pageUtils.isCurrentURL( 'wp-admin/upgrade.php' ) ) {\n\t\t// Click update\n\t\tawait this.page.click( '.button.button-large.button-primary' );\n\t\t// Click continue\n\t\tawait this.page.click( '.button.button-large' );\n\t}\n\n\tif ( this.pageUtils.isCurrentURL( 'wp-login.php' ) ) {\n\t\tthrow new Error( 'Not logged in' );\n\t}\n\n\tconst error = await this.getPageError();\n\tif ( error ) {\n\t\tthrow new Error( 'Unexpected error in page content: ' + error );\n\t}\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAqB;AAcrB,eAAsB,eAErB,WACA,OACC;AACD,QAAM,KAAK,KAAK;AAAA,QACf,kBAAM,YAAY,SAAU,KAAM,QAAQ,IAAK,KAAM,KAAK;AAAA,EAC3D;AAGA,MAAK,KAAK,UAAU,aAAc,sBAAuB,GAAI;AAE5D,UAAM,KAAK,KAAK,MAAO,qCAAsC;AAE7D,UAAM,KAAK,KAAK,MAAO,sBAAuB;AAAA,EAC/C;AAEA,MAAK,KAAK,UAAU,aAAc,cAAe,GAAI;AACpD,UAAM,IAAI,MAAO,eAAgB;AAAA,EAClC;AAEA,QAAM,QAAQ,MAAM,KAAK,aAAa;AACtC,MAAK,OAAQ;AACZ,UAAM,IAAI,MAAO,uCAAuC,KAAM;AAAA,EAC/D;AACD;",
6
+ "names": []
7
+ }
@@ -1,47 +1,32 @@
1
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/admin/visit-admin-page.ts
21
- var visit_admin_page_exports = {};
22
- __export(visit_admin_page_exports, {
23
- visitAdminPage: () => visitAdminPage
24
- });
25
- module.exports = __toCommonJS(visit_admin_page_exports);
26
- var import_path = require("path");
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.visitAdminPage = visitAdminPage;
4
+ /**
5
+ * External dependencies
6
+ */
7
+ const path_1 = require("path");
8
+ /**
9
+ * Visits admin page and handle errors.
10
+ *
11
+ * @param this
12
+ * @param adminPath String to be serialized as pathname.
13
+ * @param query String to be serialized as query portion of URL.
14
+ */
27
15
  async function visitAdminPage(adminPath, query) {
28
- await this.page.goto(
29
- (0, import_path.join)("wp-admin", adminPath) + (query ? `?${query}` : "")
30
- );
31
- if (this.pageUtils.isCurrentURL("wp-admin/upgrade.php")) {
32
- await this.page.click(".button.button-large.button-primary");
33
- await this.page.click(".button.button-large");
34
- }
35
- if (this.pageUtils.isCurrentURL("wp-login.php")) {
36
- throw new Error("Not logged in");
37
- }
38
- const error = await this.getPageError();
39
- if (error) {
40
- throw new Error("Unexpected error in page content: " + error);
41
- }
16
+ await this.page.goto((0, path_1.join)('wp-admin', adminPath) + (query ? `?${query}` : ''));
17
+ // Handle upgrade required screen
18
+ if (this.pageUtils.isCurrentURL('wp-admin/upgrade.php')) {
19
+ // Click update
20
+ await this.page.click('.button.button-large.button-primary');
21
+ // Click continue
22
+ await this.page.click('.button.button-large');
23
+ }
24
+ if (this.pageUtils.isCurrentURL('wp-login.php')) {
25
+ throw new Error('Not logged in');
26
+ }
27
+ const error = await this.getPageError();
28
+ if (error) {
29
+ throw new Error('Unexpected error in page content: ' + error);
30
+ }
42
31
  }
43
- // Annotate the CommonJS export names for ESM import in node:
44
- 0 && (module.exports = {
45
- visitAdminPage
46
- });
47
- //# sourceMappingURL=visit-admin-page.js.map
32
+ //# sourceMappingURL=visit-admin-page.js.map
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/admin/visit-admin-page.ts"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport { join } from 'path';\n\n/**\n * Internal dependencies\n */\nimport type { Admin } from './';\n\n/**\n * Visits admin page and handle errors.\n *\n * @param this\n * @param adminPath String to be serialized as pathname.\n * @param query String to be serialized as query portion of URL.\n */\nexport async function visitAdminPage(\n\tthis: Admin,\n\tadminPath: string,\n\tquery?: string\n) {\n\tawait this.page.goto(\n\t\tjoin( 'wp-admin', adminPath ) + ( query ? `?${ query }` : '' )\n\t);\n\n\t// Handle upgrade required screen\n\tif ( this.pageUtils.isCurrentURL( 'wp-admin/upgrade.php' ) ) {\n\t\t// Click update\n\t\tawait this.page.click( '.button.button-large.button-primary' );\n\t\t// Click continue\n\t\tawait this.page.click( '.button.button-large' );\n\t}\n\n\tif ( this.pageUtils.isCurrentURL( 'wp-login.php' ) ) {\n\t\tthrow new Error( 'Not logged in' );\n\t}\n\n\tconst error = await this.getPageError();\n\tif ( error ) {\n\t\tthrow new Error( 'Unexpected error in page content: ' + error );\n\t}\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAqB;AAcrB,eAAsB,eAErB,WACA,OACC;AACD,QAAM,KAAK,KAAK;AAAA,QACf,kBAAM,YAAY,SAAU,KAAM,QAAQ,IAAK,KAAM,KAAK;AAAA,EAC3D;AAGA,MAAK,KAAK,UAAU,aAAc,sBAAuB,GAAI;AAE5D,UAAM,KAAK,KAAK,MAAO,qCAAsC;AAE7D,UAAM,KAAK,KAAK,MAAO,sBAAuB;AAAA,EAC/C;AAEA,MAAK,KAAK,UAAU,aAAc,cAAe,GAAI;AACpD,UAAM,IAAI,MAAO,eAAgB;AAAA,EAClC;AAEA,QAAM,QAAQ,MAAM,KAAK,aAAa;AACtC,MAAK,OAAQ;AACZ,UAAM,IAAI,MAAO,uCAAuC,KAAM;AAAA,EAC/D;AACD;",
6
- "names": []
7
- }
1
+ {"version":3,"file":"visit-admin-page.js","sourceRoot":"","sources":["../../src/admin/visit-admin-page.ts"],"names":[],"mappings":";;AAiBA,wCAyBC;AA1CD;;GAEG;AACH,+BAA4B;AAO5B;;;;;;GAMG;AACI,KAAK,UAAU,cAAc,CAEnC,SAAiB,EACjB,KAAc;IAEd,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CACnB,IAAA,WAAI,EAAE,UAAU,EAAE,SAAS,CAAE,GAAG,CAAE,KAAK,CAAC,CAAC,CAAC,IAAK,KAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAE,CAC9D,CAAC;IAEF,iCAAiC;IACjC,IAAK,IAAI,CAAC,SAAS,CAAC,YAAY,CAAE,sBAAsB,CAAE,EAAG,CAAC;QAC7D,eAAe;QACf,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,CAAE,qCAAqC,CAAE,CAAC;QAC/D,iBAAiB;QACjB,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,CAAE,sBAAsB,CAAE,CAAC;IACjD,CAAC;IAED,IAAK,IAAI,CAAC,SAAS,CAAC,YAAY,CAAE,cAAc,CAAE,EAAG,CAAC;QACrD,MAAM,IAAI,KAAK,CAAE,eAAe,CAAE,CAAC;IACpC,CAAC;IAED,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,YAAY,EAAE,CAAC;IACxC,IAAK,KAAK,EAAG,CAAC;QACb,MAAM,IAAI,KAAK,CAAE,oCAAoC,GAAG,KAAK,CAAE,CAAC;IACjE,CAAC;AACF,CAAC"}
@@ -0,0 +1,77 @@
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/admin/visit-site-editor.ts
21
+ var visit_site_editor_exports = {};
22
+ __export(visit_site_editor_exports, {
23
+ visitSiteEditor: () => visitSiteEditor
24
+ });
25
+ module.exports = __toCommonJS(visit_site_editor_exports);
26
+ async function visitSiteEditor(options = {}) {
27
+ const { postId, postType, path, canvas, activeView } = options;
28
+ const query = new URLSearchParams();
29
+ if (postId) {
30
+ query.set("postId", String(postId));
31
+ }
32
+ if (postType) {
33
+ query.set("postType", postType);
34
+ }
35
+ if (path) {
36
+ query.set("path", path);
37
+ }
38
+ if (canvas) {
39
+ query.set("canvas", canvas);
40
+ }
41
+ if (activeView) {
42
+ query.set("activeView", activeView);
43
+ }
44
+ await this.visitAdminPage("site-editor.php", query.toString());
45
+ if (!options.showWelcomeGuide) {
46
+ await this.editor.setPreferences("core/edit-site", {
47
+ welcomeGuide: false,
48
+ welcomeGuideStyles: false,
49
+ welcomeGuidePage: false,
50
+ welcomeGuideTemplate: false
51
+ });
52
+ }
53
+ if (!query.size || postId || canvas === "edit") {
54
+ const canvasLoader = this.page.locator(
55
+ // Spinner was used instead of the progress bar in an earlier
56
+ // version of the site editor.
57
+ ".edit-site-canvas-loader, .edit-site-canvas-spinner"
58
+ );
59
+ try {
60
+ await canvasLoader.waitFor({ state: "visible", timeout: 6e4 });
61
+ await canvasLoader.waitFor({
62
+ state: "hidden",
63
+ // Bigger timeout is needed for larger entities, like the Large Post
64
+ // HTML fixture that we load for performance tests, which often
65
+ // doesn't make it under the default timeout value.
66
+ timeout: 6e4
67
+ });
68
+ } catch (error) {
69
+ await this.page.getByRole("region", { name: "Editor content" }).waitFor();
70
+ }
71
+ }
72
+ }
73
+ // Annotate the CommonJS export names for ESM import in node:
74
+ 0 && (module.exports = {
75
+ visitSiteEditor
76
+ });
77
+ //# sourceMappingURL=visit-site-editor.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/admin/visit-site-editor.ts"],
4
+ "sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Admin } from './';\n\ninterface SiteEditorOptions {\n\tpostId?: string | number;\n\tpostType?: string;\n\tpath?: string;\n\tcanvas?: string;\n\tactiveView?: string;\n\tshowWelcomeGuide?: boolean;\n}\n\n/**\n * Visits the Site Editor main page.\n *\n * @param this\n * @param options Options to visit the site editor.\n */\nexport async function visitSiteEditor(\n\tthis: Admin,\n\toptions: SiteEditorOptions = {}\n) {\n\tconst { postId, postType, path, canvas, activeView } = options;\n\tconst query = new URLSearchParams();\n\n\tif ( postId ) {\n\t\tquery.set( 'postId', String( postId ) );\n\t}\n\tif ( postType ) {\n\t\tquery.set( 'postType', postType );\n\t}\n\tif ( path ) {\n\t\tquery.set( 'path', path );\n\t}\n\tif ( canvas ) {\n\t\tquery.set( 'canvas', canvas );\n\t}\n\tif ( activeView ) {\n\t\tquery.set( 'activeView', activeView );\n\t}\n\n\tawait this.visitAdminPage( 'site-editor.php', query.toString() );\n\n\tif ( ! options.showWelcomeGuide ) {\n\t\tawait this.editor.setPreferences( 'core/edit-site', {\n\t\t\twelcomeGuide: false,\n\t\t\twelcomeGuideStyles: false,\n\t\t\twelcomeGuidePage: false,\n\t\t\twelcomeGuideTemplate: false,\n\t\t} );\n\t}\n\n\t/**\n\t * @todo This is a workaround for the fact that the editor canvas is seen as\n\t * ready and visible before the loading spinner is hidden. Ideally, the\n\t * content underneath the loading overlay should be marked inert until the\n\t * loading is done.\n\t */\n\tif ( ! query.size || postId || canvas === 'edit' ) {\n\t\tconst canvasLoader = this.page.locator(\n\t\t\t// Spinner was used instead of the progress bar in an earlier\n\t\t\t// version of the site editor.\n\t\t\t'.edit-site-canvas-loader, .edit-site-canvas-spinner'\n\t\t);\n\n\t\ttry {\n\t\t\t// Wait for the canvas loader to appear first, so that the locator that\n\t\t\t// waits for the hidden state doesn't resolve prematurely.\n\t\t\tawait canvasLoader.waitFor( { state: 'visible', timeout: 60_000 } );\n\t\t\tawait canvasLoader.waitFor( {\n\t\t\t\tstate: 'hidden',\n\t\t\t\t// Bigger timeout is needed for larger entities, like the Large Post\n\t\t\t\t// HTML fixture that we load for performance tests, which often\n\t\t\t\t// doesn't make it under the default timeout value.\n\t\t\t\ttimeout: 60_000,\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\t// If the canvas loader is already disappeared, skip the waiting.\n\t\t\tawait this.page\n\t\t\t\t.getByRole( 'region', { name: 'Editor content' } )\n\t\t\t\t.waitFor();\n\t\t}\n\t}\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBA,eAAsB,gBAErB,UAA6B,CAAC,GAC7B;AACD,QAAM,EAAE,QAAQ,UAAU,MAAM,QAAQ,WAAW,IAAI;AACvD,QAAM,QAAQ,IAAI,gBAAgB;AAElC,MAAK,QAAS;AACb,UAAM,IAAK,UAAU,OAAQ,MAAO,CAAE;AAAA,EACvC;AACA,MAAK,UAAW;AACf,UAAM,IAAK,YAAY,QAAS;AAAA,EACjC;AACA,MAAK,MAAO;AACX,UAAM,IAAK,QAAQ,IAAK;AAAA,EACzB;AACA,MAAK,QAAS;AACb,UAAM,IAAK,UAAU,MAAO;AAAA,EAC7B;AACA,MAAK,YAAa;AACjB,UAAM,IAAK,cAAc,UAAW;AAAA,EACrC;AAEA,QAAM,KAAK,eAAgB,mBAAmB,MAAM,SAAS,CAAE;AAE/D,MAAK,CAAE,QAAQ,kBAAmB;AACjC,UAAM,KAAK,OAAO,eAAgB,kBAAkB;AAAA,MACnD,cAAc;AAAA,MACd,oBAAoB;AAAA,MACpB,kBAAkB;AAAA,MAClB,sBAAsB;AAAA,IACvB,CAAE;AAAA,EACH;AAQA,MAAK,CAAE,MAAM,QAAQ,UAAU,WAAW,QAAS;AAClD,UAAM,eAAe,KAAK,KAAK;AAAA;AAAA;AAAA,MAG9B;AAAA,IACD;AAEA,QAAI;AAGH,YAAM,aAAa,QAAS,EAAE,OAAO,WAAW,SAAS,IAAO,CAAE;AAClE,YAAM,aAAa,QAAS;AAAA,QAC3B,OAAO;AAAA;AAAA;AAAA;AAAA,QAIP,SAAS;AAAA,MACV,CAAE;AAAA,IACH,SAAU,OAAQ;AAEjB,YAAM,KAAK,KACT,UAAW,UAAU,EAAE,MAAM,iBAAiB,CAAE,EAChD,QAAQ;AAAA,IACX;AAAA,EACD;AACD;",
6
+ "names": []
7
+ }
@@ -1,77 +1,68 @@
1
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/admin/visit-site-editor.ts
21
- var visit_site_editor_exports = {};
22
- __export(visit_site_editor_exports, {
23
- visitSiteEditor: () => visitSiteEditor
24
- });
25
- module.exports = __toCommonJS(visit_site_editor_exports);
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.visitSiteEditor = visitSiteEditor;
4
+ /**
5
+ * Visits the Site Editor main page.
6
+ *
7
+ * @param this
8
+ * @param options Options to visit the site editor.
9
+ */
26
10
  async function visitSiteEditor(options = {}) {
27
- const { postId, postType, path, canvas, activeView } = options;
28
- const query = new URLSearchParams();
29
- if (postId) {
30
- query.set("postId", String(postId));
31
- }
32
- if (postType) {
33
- query.set("postType", postType);
34
- }
35
- if (path) {
36
- query.set("path", path);
37
- }
38
- if (canvas) {
39
- query.set("canvas", canvas);
40
- }
41
- if (activeView) {
42
- query.set("activeView", activeView);
43
- }
44
- await this.visitAdminPage("site-editor.php", query.toString());
45
- if (!options.showWelcomeGuide) {
46
- await this.editor.setPreferences("core/edit-site", {
47
- welcomeGuide: false,
48
- welcomeGuideStyles: false,
49
- welcomeGuidePage: false,
50
- welcomeGuideTemplate: false
51
- });
52
- }
53
- if (!query.size || postId || canvas === "edit") {
54
- const canvasLoader = this.page.locator(
55
- // Spinner was used instead of the progress bar in an earlier
56
- // version of the site editor.
57
- ".edit-site-canvas-loader, .edit-site-canvas-spinner"
58
- );
59
- try {
60
- await canvasLoader.waitFor({ state: "visible", timeout: 6e4 });
61
- await canvasLoader.waitFor({
62
- state: "hidden",
63
- // Bigger timeout is needed for larger entities, like the Large Post
64
- // HTML fixture that we load for performance tests, which often
65
- // doesn't make it under the default timeout value.
66
- timeout: 6e4
67
- });
68
- } catch (error) {
69
- await this.page.getByRole("region", { name: "Editor content" }).waitFor();
11
+ const { postId, postType, path, canvas, activeView } = options;
12
+ const query = new URLSearchParams();
13
+ if (postId) {
14
+ query.set('postId', String(postId));
15
+ }
16
+ if (postType) {
17
+ query.set('postType', postType);
18
+ }
19
+ if (path) {
20
+ query.set('path', path);
21
+ }
22
+ if (canvas) {
23
+ query.set('canvas', canvas);
24
+ }
25
+ if (activeView) {
26
+ query.set('activeView', activeView);
27
+ }
28
+ await this.visitAdminPage('site-editor.php', query.toString());
29
+ if (!options.showWelcomeGuide) {
30
+ await this.editor.setPreferences('core/edit-site', {
31
+ welcomeGuide: false,
32
+ welcomeGuideStyles: false,
33
+ welcomeGuidePage: false,
34
+ welcomeGuideTemplate: false,
35
+ });
36
+ }
37
+ /**
38
+ * @todo This is a workaround for the fact that the editor canvas is seen as
39
+ * ready and visible before the loading spinner is hidden. Ideally, the
40
+ * content underneath the loading overlay should be marked inert until the
41
+ * loading is done.
42
+ */
43
+ if (!query.size || postId || canvas === 'edit') {
44
+ const canvasLoader = this.page.locator(
45
+ // Spinner was used instead of the progress bar in an earlier
46
+ // version of the site editor.
47
+ '.edit-site-canvas-loader, .edit-site-canvas-spinner');
48
+ try {
49
+ // Wait for the canvas loader to appear first, so that the locator that
50
+ // waits for the hidden state doesn't resolve prematurely.
51
+ await canvasLoader.waitFor({ state: 'visible', timeout: 60_000 });
52
+ await canvasLoader.waitFor({
53
+ state: 'hidden',
54
+ // Bigger timeout is needed for larger entities, like the Large Post
55
+ // HTML fixture that we load for performance tests, which often
56
+ // doesn't make it under the default timeout value.
57
+ timeout: 60_000,
58
+ });
59
+ }
60
+ catch (error) {
61
+ // If the canvas loader is already disappeared, skip the waiting.
62
+ await this.page
63
+ .getByRole('region', { name: 'Editor content' })
64
+ .waitFor();
65
+ }
70
66
  }
71
- }
72
67
  }
73
- // Annotate the CommonJS export names for ESM import in node:
74
- 0 && (module.exports = {
75
- visitSiteEditor
76
- });
77
- //# sourceMappingURL=visit-site-editor.js.map
68
+ //# sourceMappingURL=visit-site-editor.js.map
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/admin/visit-site-editor.ts"],
4
- "sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Admin } from './';\n\ninterface SiteEditorOptions {\n\tpostId?: string | number;\n\tpostType?: string;\n\tpath?: string;\n\tcanvas?: string;\n\tactiveView?: string;\n\tshowWelcomeGuide?: boolean;\n}\n\n/**\n * Visits the Site Editor main page.\n *\n * @param this\n * @param options Options to visit the site editor.\n */\nexport async function visitSiteEditor(\n\tthis: Admin,\n\toptions: SiteEditorOptions = {}\n) {\n\tconst { postId, postType, path, canvas, activeView } = options;\n\tconst query = new URLSearchParams();\n\n\tif ( postId ) {\n\t\tquery.set( 'postId', String( postId ) );\n\t}\n\tif ( postType ) {\n\t\tquery.set( 'postType', postType );\n\t}\n\tif ( path ) {\n\t\tquery.set( 'path', path );\n\t}\n\tif ( canvas ) {\n\t\tquery.set( 'canvas', canvas );\n\t}\n\tif ( activeView ) {\n\t\tquery.set( 'activeView', activeView );\n\t}\n\n\tawait this.visitAdminPage( 'site-editor.php', query.toString() );\n\n\tif ( ! options.showWelcomeGuide ) {\n\t\tawait this.editor.setPreferences( 'core/edit-site', {\n\t\t\twelcomeGuide: false,\n\t\t\twelcomeGuideStyles: false,\n\t\t\twelcomeGuidePage: false,\n\t\t\twelcomeGuideTemplate: false,\n\t\t} );\n\t}\n\n\t/**\n\t * @todo This is a workaround for the fact that the editor canvas is seen as\n\t * ready and visible before the loading spinner is hidden. Ideally, the\n\t * content underneath the loading overlay should be marked inert until the\n\t * loading is done.\n\t */\n\tif ( ! query.size || postId || canvas === 'edit' ) {\n\t\tconst canvasLoader = this.page.locator(\n\t\t\t// Spinner was used instead of the progress bar in an earlier\n\t\t\t// version of the site editor.\n\t\t\t'.edit-site-canvas-loader, .edit-site-canvas-spinner'\n\t\t);\n\n\t\ttry {\n\t\t\t// Wait for the canvas loader to appear first, so that the locator that\n\t\t\t// waits for the hidden state doesn't resolve prematurely.\n\t\t\tawait canvasLoader.waitFor( { state: 'visible', timeout: 60_000 } );\n\t\t\tawait canvasLoader.waitFor( {\n\t\t\t\tstate: 'hidden',\n\t\t\t\t// Bigger timeout is needed for larger entities, like the Large Post\n\t\t\t\t// HTML fixture that we load for performance tests, which often\n\t\t\t\t// doesn't make it under the default timeout value.\n\t\t\t\ttimeout: 60_000,\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\t// If the canvas loader is already disappeared, skip the waiting.\n\t\t\tawait this.page\n\t\t\t\t.getByRole( 'region', { name: 'Editor content' } )\n\t\t\t\t.waitFor();\n\t\t}\n\t}\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBA,eAAsB,gBAErB,UAA6B,CAAC,GAC7B;AACD,QAAM,EAAE,QAAQ,UAAU,MAAM,QAAQ,WAAW,IAAI;AACvD,QAAM,QAAQ,IAAI,gBAAgB;AAElC,MAAK,QAAS;AACb,UAAM,IAAK,UAAU,OAAQ,MAAO,CAAE;AAAA,EACvC;AACA,MAAK,UAAW;AACf,UAAM,IAAK,YAAY,QAAS;AAAA,EACjC;AACA,MAAK,MAAO;AACX,UAAM,IAAK,QAAQ,IAAK;AAAA,EACzB;AACA,MAAK,QAAS;AACb,UAAM,IAAK,UAAU,MAAO;AAAA,EAC7B;AACA,MAAK,YAAa;AACjB,UAAM,IAAK,cAAc,UAAW;AAAA,EACrC;AAEA,QAAM,KAAK,eAAgB,mBAAmB,MAAM,SAAS,CAAE;AAE/D,MAAK,CAAE,QAAQ,kBAAmB;AACjC,UAAM,KAAK,OAAO,eAAgB,kBAAkB;AAAA,MACnD,cAAc;AAAA,MACd,oBAAoB;AAAA,MACpB,kBAAkB;AAAA,MAClB,sBAAsB;AAAA,IACvB,CAAE;AAAA,EACH;AAQA,MAAK,CAAE,MAAM,QAAQ,UAAU,WAAW,QAAS;AAClD,UAAM,eAAe,KAAK,KAAK;AAAA;AAAA;AAAA,MAG9B;AAAA,IACD;AAEA,QAAI;AAGH,YAAM,aAAa,QAAS,EAAE,OAAO,WAAW,SAAS,IAAO,CAAE;AAClE,YAAM,aAAa,QAAS;AAAA,QAC3B,OAAO;AAAA;AAAA;AAAA;AAAA,QAIP,SAAS;AAAA,MACV,CAAE;AAAA,IACH,SAAU,OAAQ;AAEjB,YAAM,KAAK,KACT,UAAW,UAAU,EAAE,MAAM,iBAAiB,CAAE,EAChD,QAAQ;AAAA,IACX;AAAA,EACD;AACD;",
6
- "names": []
7
- }
1
+ {"version":3,"file":"visit-site-editor.js","sourceRoot":"","sources":["../../src/admin/visit-site-editor.ts"],"names":[],"mappings":";;AAoBA,0CAiEC;AAvED;;;;;GAKG;AACI,KAAK,UAAU,eAAe,CAEpC,UAA6B,EAAE;IAE/B,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;IAC/D,MAAM,KAAK,GAAG,IAAI,eAAe,EAAE,CAAC;IAEpC,IAAK,MAAM,EAAG,CAAC;QACd,KAAK,CAAC,GAAG,CAAE,QAAQ,EAAE,MAAM,CAAE,MAAM,CAAE,CAAE,CAAC;IACzC,CAAC;IACD,IAAK,QAAQ,EAAG,CAAC;QAChB,KAAK,CAAC,GAAG,CAAE,UAAU,EAAE,QAAQ,CAAE,CAAC;IACnC,CAAC;IACD,IAAK,IAAI,EAAG,CAAC;QACZ,KAAK,CAAC,GAAG,CAAE,MAAM,EAAE,IAAI,CAAE,CAAC;IAC3B,CAAC;IACD,IAAK,MAAM,EAAG,CAAC;QACd,KAAK,CAAC,GAAG,CAAE,QAAQ,EAAE,MAAM,CAAE,CAAC;IAC/B,CAAC;IACD,IAAK,UAAU,EAAG,CAAC;QAClB,KAAK,CAAC,GAAG,CAAE,YAAY,EAAE,UAAU,CAAE,CAAC;IACvC,CAAC;IAED,MAAM,IAAI,CAAC,cAAc,CAAE,iBAAiB,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAE,CAAC;IAEjE,IAAK,CAAE,OAAO,CAAC,gBAAgB,EAAG,CAAC;QAClC,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAE,gBAAgB,EAAE;YACnD,YAAY,EAAE,KAAK;YACnB,kBAAkB,EAAE,KAAK;YACzB,gBAAgB,EAAE,KAAK;YACvB,oBAAoB,EAAE,KAAK;SAC3B,CAAE,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,IAAK,CAAE,KAAK,CAAC,IAAI,IAAI,MAAM,IAAI,MAAM,KAAK,MAAM,EAAG,CAAC;QACnD,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO;QACrC,6DAA6D;QAC7D,8BAA8B;QAC9B,qDAAqD,CACrD,CAAC;QAEF,IAAI,CAAC;YACJ,uEAAuE;YACvE,0DAA0D;YAC1D,MAAM,YAAY,CAAC,OAAO,CAAE,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,CAAE,CAAC;YACpE,MAAM,YAAY,CAAC,OAAO,CAAE;gBAC3B,KAAK,EAAE,QAAQ;gBACf,oEAAoE;gBACpE,+DAA+D;gBAC/D,mDAAmD;gBACnD,OAAO,EAAE,MAAM;aACf,CAAE,CAAC;QACL,CAAC;QAAC,OAAQ,KAAK,EAAG,CAAC;YAClB,iEAAiE;YACjE,MAAM,IAAI,CAAC,IAAI;iBACb,SAAS,CAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAE;iBACjD,OAAO,EAAE,CAAC;QACb,CAAC;IACF,CAAC;AACF,CAAC"}
@@ -0,0 +1,45 @@
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/config.ts
21
+ var config_exports = {};
22
+ __export(config_exports, {
23
+ WP_ADMIN_USER: () => WP_ADMIN_USER,
24
+ WP_BASE_URL: () => WP_BASE_URL,
25
+ WP_PASSWORD: () => WP_PASSWORD,
26
+ WP_USERNAME: () => WP_USERNAME
27
+ });
28
+ module.exports = __toCommonJS(config_exports);
29
+ var {
30
+ WP_USERNAME = "admin",
31
+ WP_PASSWORD = "password",
32
+ WP_BASE_URL = "http://localhost:8889"
33
+ } = process.env;
34
+ var WP_ADMIN_USER = {
35
+ username: WP_USERNAME,
36
+ password: WP_PASSWORD
37
+ };
38
+ // Annotate the CommonJS export names for ESM import in node:
39
+ 0 && (module.exports = {
40
+ WP_ADMIN_USER,
41
+ WP_BASE_URL,
42
+ WP_PASSWORD,
43
+ WP_USERNAME
44
+ });
45
+ //# sourceMappingURL=config.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/config.ts"],
4
+ "sourcesContent": ["const {\n\tWP_USERNAME = 'admin',\n\tWP_PASSWORD = 'password',\n\tWP_BASE_URL = 'http://localhost:8889',\n} = process.env;\n\nconst WP_ADMIN_USER = {\n\tusername: WP_USERNAME,\n\tpassword: WP_PASSWORD,\n} as const;\n\nexport { WP_ADMIN_USER, WP_USERNAME, WP_PASSWORD, WP_BASE_URL };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAM;AAAA,EACL,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AACf,IAAI,QAAQ;AAEZ,IAAM,gBAAgB;AAAA,EACrB,UAAU;AAAA,EACV,UAAU;AACX;",
6
+ "names": []
7
+ }
package/build/config.js CHANGED
@@ -1,45 +1,13 @@
1
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 });
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WP_BASE_URL = exports.WP_PASSWORD = exports.WP_USERNAME = exports.WP_ADMIN_USER = void 0;
4
+ const { WP_USERNAME = 'admin', WP_PASSWORD = 'password', WP_BASE_URL = 'http://localhost:8889', } = process.env;
5
+ exports.WP_USERNAME = WP_USERNAME;
6
+ exports.WP_PASSWORD = WP_PASSWORD;
7
+ exports.WP_BASE_URL = WP_BASE_URL;
8
+ const WP_ADMIN_USER = {
9
+ username: WP_USERNAME,
10
+ password: WP_PASSWORD,
9
11
  };
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/config.ts
21
- var config_exports = {};
22
- __export(config_exports, {
23
- WP_ADMIN_USER: () => WP_ADMIN_USER,
24
- WP_BASE_URL: () => WP_BASE_URL,
25
- WP_PASSWORD: () => WP_PASSWORD,
26
- WP_USERNAME: () => WP_USERNAME
27
- });
28
- module.exports = __toCommonJS(config_exports);
29
- var {
30
- WP_USERNAME = "admin",
31
- WP_PASSWORD = "password",
32
- WP_BASE_URL = "http://localhost:8889"
33
- } = process.env;
34
- var WP_ADMIN_USER = {
35
- username: WP_USERNAME,
36
- password: WP_PASSWORD
37
- };
38
- // Annotate the CommonJS export names for ESM import in node:
39
- 0 && (module.exports = {
40
- WP_ADMIN_USER,
41
- WP_BASE_URL,
42
- WP_PASSWORD,
43
- WP_USERNAME
44
- });
45
- //# sourceMappingURL=config.js.map
12
+ exports.WP_ADMIN_USER = WP_ADMIN_USER;
13
+ //# sourceMappingURL=config.js.map
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/config.ts"],
4
- "sourcesContent": ["const {\n\tWP_USERNAME = 'admin',\n\tWP_PASSWORD = 'password',\n\tWP_BASE_URL = 'http://localhost:8889',\n} = process.env;\n\nconst WP_ADMIN_USER = {\n\tusername: WP_USERNAME,\n\tpassword: WP_PASSWORD,\n} as const;\n\nexport { WP_ADMIN_USER, WP_USERNAME, WP_PASSWORD, WP_BASE_URL };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAM;AAAA,EACL,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AACf,IAAI,QAAQ;AAEZ,IAAM,gBAAgB;AAAA,EACrB,UAAU;AAAA,EACV,UAAU;AACX;",
6
- "names": []
7
- }
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;AAAA,MAAM,EACL,WAAW,GAAG,OAAO,EACrB,WAAW,GAAG,UAAU,EACxB,WAAW,GAAG,uBAAuB,GACrC,GAAG,OAAO,CAAC,GAAG,CAAC;AAOQ,kCAAW;AAAE,kCAAW;AAAE,kCAAW;AAL7D,MAAM,aAAa,GAAG;IACrB,QAAQ,EAAE,WAAW;IACrB,QAAQ,EAAE,WAAW;CACZ,CAAC;AAEF,sCAAa"}
@@ -0,0 +1,34 @@
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/click-block-options-menu-item.ts
21
+ var click_block_options_menu_item_exports = {};
22
+ __export(click_block_options_menu_item_exports, {
23
+ clickBlockOptionsMenuItem: () => clickBlockOptionsMenuItem
24
+ });
25
+ module.exports = __toCommonJS(click_block_options_menu_item_exports);
26
+ async function clickBlockOptionsMenuItem(label) {
27
+ await this.clickBlockToolbarButton("Options");
28
+ await this.page.getByRole("menu", { name: "Options" }).getByRole("menuitem", { name: label }).click();
29
+ }
30
+ // Annotate the CommonJS export names for ESM import in node:
31
+ 0 && (module.exports = {
32
+ clickBlockOptionsMenuItem
33
+ });
34
+ //# sourceMappingURL=click-block-options-menu-item.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/editor/click-block-options-menu-item.ts"],
4
+ "sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Editor } from './index';\n\n/**\n * Clicks a block toolbar button.\n *\n * @param this\n * @param label The text string of the button label.\n */\nexport async function clickBlockOptionsMenuItem( this: Editor, label: string ) {\n\tawait this.clickBlockToolbarButton( 'Options' );\n\tawait this.page\n\t\t.getByRole( 'menu', { name: 'Options' } )\n\t\t.getByRole( 'menuitem', { name: label } )\n\t\t.click();\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,eAAsB,0BAAyC,OAAgB;AAC9E,QAAM,KAAK,wBAAyB,SAAU;AAC9C,QAAM,KAAK,KACT,UAAW,QAAQ,EAAE,MAAM,UAAU,CAAE,EACvC,UAAW,YAAY,EAAE,MAAM,MAAM,CAAE,EACvC,MAAM;AACT;",
6
+ "names": []
7
+ }
@@ -1,34 +1,17 @@
1
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/click-block-options-menu-item.ts
21
- var click_block_options_menu_item_exports = {};
22
- __export(click_block_options_menu_item_exports, {
23
- clickBlockOptionsMenuItem: () => clickBlockOptionsMenuItem
24
- });
25
- module.exports = __toCommonJS(click_block_options_menu_item_exports);
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.clickBlockOptionsMenuItem = clickBlockOptionsMenuItem;
4
+ /**
5
+ * Clicks a block toolbar button.
6
+ *
7
+ * @param this
8
+ * @param label The text string of the button label.
9
+ */
26
10
  async function clickBlockOptionsMenuItem(label) {
27
- await this.clickBlockToolbarButton("Options");
28
- await this.page.getByRole("menu", { name: "Options" }).getByRole("menuitem", { name: label }).click();
11
+ await this.clickBlockToolbarButton('Options');
12
+ await this.page
13
+ .getByRole('menu', { name: 'Options' })
14
+ .getByRole('menuitem', { name: label })
15
+ .click();
29
16
  }
30
- // Annotate the CommonJS export names for ESM import in node:
31
- 0 && (module.exports = {
32
- clickBlockOptionsMenuItem
33
- });
34
- //# sourceMappingURL=click-block-options-menu-item.js.map
17
+ //# sourceMappingURL=click-block-options-menu-item.js.map
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/editor/click-block-options-menu-item.ts"],
4
- "sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Editor } from './index';\n\n/**\n * Clicks a block toolbar button.\n *\n * @param this\n * @param label The text string of the button label.\n */\nexport async function clickBlockOptionsMenuItem( this: Editor, label: string ) {\n\tawait this.clickBlockToolbarButton( 'Options' );\n\tawait this.page\n\t\t.getByRole( 'menu', { name: 'Options' } )\n\t\t.getByRole( 'menuitem', { name: label } )\n\t\t.click();\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,eAAsB,0BAAyC,OAAgB;AAC9E,QAAM,KAAK,wBAAyB,SAAU;AAC9C,QAAM,KAAK,KACT,UAAW,QAAQ,EAAE,MAAM,UAAU,CAAE,EACvC,UAAW,YAAY,EAAE,MAAM,MAAM,CAAE,EACvC,MAAM;AACT;",
6
- "names": []
7
- }
1
+ {"version":3,"file":"click-block-options-menu-item.js","sourceRoot":"","sources":["../../src/editor/click-block-options-menu-item.ts"],"names":[],"mappings":";;AAWA,8DAMC;AAZD;;;;;GAKG;AACI,KAAK,UAAU,yBAAyB,CAAgB,KAAa;IAC3E,MAAM,IAAI,CAAC,uBAAuB,CAAE,SAAS,CAAE,CAAC;IAChD,MAAM,IAAI,CAAC,IAAI;SACb,SAAS,CAAE,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAE;SACxC,SAAS,CAAE,UAAU,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAE;SACxC,KAAK,EAAE,CAAC;AACX,CAAC"}