@wordpress/e2e-test-utils-playwright 1.32.0 → 1.32.1-next.ff1cebbba.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 (113) hide show
  1. package/build/admin/create-new-post.js +46 -28
  2. package/build/admin/create-new-post.js.map +7 -1
  3. package/build/admin/edit-post.js +35 -17
  4. package/build/admin/edit-post.js.map +7 -1
  5. package/build/admin/get-page-error.js +30 -22
  6. package/build/admin/get-page-error.js.map +7 -1
  7. package/build/admin/index.js +54 -34
  8. package/build/admin/index.js.map +7 -1
  9. package/build/admin/visit-admin-page.js +42 -29
  10. package/build/admin/visit-admin-page.js.map +7 -1
  11. package/build/admin/visit-site-editor.js +71 -64
  12. package/build/admin/visit-site-editor.js.map +7 -1
  13. package/build/config.js +40 -10
  14. package/build/config.js.map +7 -1
  15. package/build/editor/click-block-options-menu-item.js +29 -14
  16. package/build/editor/click-block-options-menu-item.js.map +7 -1
  17. package/build/editor/click-block-toolbar-button.js +33 -13
  18. package/build/editor/click-block-toolbar-button.js.map +7 -1
  19. package/build/editor/get-blocks.js +59 -43
  20. package/build/editor/get-blocks.js.map +7 -1
  21. package/build/editor/get-edited-post-content.js +31 -12
  22. package/build/editor/get-edited-post-content.js.map +7 -1
  23. package/build/editor/index.js +92 -72
  24. package/build/editor/index.js.map +7 -1
  25. package/build/editor/insert-block.js +50 -21
  26. package/build/editor/insert-block.js.map +7 -1
  27. package/build/editor/open-document-settings-sidebar.js +37 -24
  28. package/build/editor/open-document-settings-sidebar.js.map +7 -1
  29. package/build/editor/preview.js +37 -18
  30. package/build/editor/preview.js.map +7 -1
  31. package/build/editor/publish-post.js +42 -42
  32. package/build/editor/publish-post.js.map +7 -1
  33. package/build/editor/save-draft.js +29 -15
  34. package/build/editor/save-draft.js.map +7 -1
  35. package/build/editor/select-blocks.js +46 -25
  36. package/build/editor/select-blocks.js.map +7 -1
  37. package/build/editor/set-content.js +34 -14
  38. package/build/editor/set-content.js.map +7 -1
  39. package/build/editor/set-is-fixed-toolbar.js +31 -15
  40. package/build/editor/set-is-fixed-toolbar.js.map +7 -1
  41. package/build/editor/set-preferences.js +38 -18
  42. package/build/editor/set-preferences.js.map +7 -1
  43. package/build/editor/show-block-toolbar.js +30 -16
  44. package/build/editor/show-block-toolbar.js.map +7 -1
  45. package/build/editor/site-editor.js +46 -41
  46. package/build/editor/site-editor.js.map +7 -1
  47. package/build/editor/switch-editor-tool.js +42 -30
  48. package/build/editor/switch-editor-tool.js.map +7 -1
  49. package/build/editor/switch-to-legacy-canvas.js +33 -14
  50. package/build/editor/switch-to-legacy-canvas.js.map +7 -1
  51. package/build/editor/transform-block-to.js +41 -21
  52. package/build/editor/transform-block-to.js.map +7 -1
  53. package/build/index.js +50 -32
  54. package/build/index.js.map +7 -1
  55. package/build/lighthouse/index.js +89 -53
  56. package/build/lighthouse/index.js.map +7 -1
  57. package/build/metrics/index.js +298 -249
  58. package/build/metrics/index.js.map +7 -1
  59. package/build/page-utils/drag-files.js +134 -112
  60. package/build/page-utils/drag-files.js.map +7 -1
  61. package/build/page-utils/emulate-network-conditions.js +92 -66
  62. package/build/page-utils/emulate-network-conditions.js.map +7 -1
  63. package/build/page-utils/index.js +54 -34
  64. package/build/page-utils/index.js.map +7 -1
  65. package/build/page-utils/is-current-url.js +31 -18
  66. package/build/page-utils/is-current-url.js.map +7 -1
  67. package/build/page-utils/keycodes.js +51 -39
  68. package/build/page-utils/keycodes.js.map +7 -1
  69. package/build/page-utils/press-keys.js +148 -127
  70. package/build/page-utils/press-keys.js.map +7 -1
  71. package/build/page-utils/set-browser-viewport.js +32 -41
  72. package/build/page-utils/set-browser-viewport.js.map +7 -1
  73. package/build/request-utils/blocks.js +49 -40
  74. package/build/request-utils/blocks.js.map +7 -1
  75. package/build/request-utils/comments.js +57 -45
  76. package/build/request-utils/comments.js.map +7 -1
  77. package/build/request-utils/gutenberg-experiments.js +48 -26
  78. package/build/request-utils/gutenberg-experiments.js.map +7 -1
  79. package/build/request-utils/index.js +187 -153
  80. package/build/request-utils/index.js.map +7 -1
  81. package/build/request-utils/login.js +43 -18
  82. package/build/request-utils/login.js.map +7 -1
  83. package/build/request-utils/media.js +72 -64
  84. package/build/request-utils/media.js.map +7 -1
  85. package/build/request-utils/menus.js +119 -109
  86. package/build/request-utils/menus.js.map +7 -1
  87. package/build/request-utils/pages.js +60 -49
  88. package/build/request-utils/pages.js.map +7 -1
  89. package/build/request-utils/patterns.js +39 -24
  90. package/build/request-utils/patterns.js.map +7 -1
  91. package/build/request-utils/plugins.js +68 -74
  92. package/build/request-utils/plugins.js.map +7 -1
  93. package/build/request-utils/posts.js +52 -39
  94. package/build/request-utils/posts.js.map +7 -1
  95. package/build/request-utils/preferences.js +36 -17
  96. package/build/request-utils/preferences.js.map +7 -1
  97. package/build/request-utils/rest.js +153 -129
  98. package/build/request-utils/rest.js.map +7 -1
  99. package/build/request-utils/site-settings.js +38 -28
  100. package/build/request-utils/site-settings.js.map +7 -1
  101. package/build/request-utils/templates.js +57 -45
  102. package/build/request-utils/templates.js.map +7 -1
  103. package/build/request-utils/themes.js +78 -53
  104. package/build/request-utils/themes.js.map +7 -1
  105. package/build/request-utils/users.js +72 -72
  106. package/build/request-utils/users.js.map +7 -1
  107. package/build/request-utils/widgets.js +71 -55
  108. package/build/request-utils/widgets.js.map +7 -1
  109. package/build/test.js +128 -146
  110. package/build/test.js.map +7 -1
  111. package/build/types.js +16 -2
  112. package/build/types.js.map +7 -1
  113. package/package.json +6 -2
@@ -1,21 +1,41 @@
1
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
- */
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
+ var set_preferences_exports = {};
20
+ __export(set_preferences_exports, {
21
+ setPreferences: () => setPreferences
22
+ });
23
+ module.exports = __toCommonJS(set_preferences_exports);
11
24
  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 });
25
+ await this.page.waitForFunction(() => window?.wp?.data);
26
+ await this.page.evaluate(
27
+ async (props) => {
28
+ for (const [key, value] of Object.entries(
29
+ props.preferences
30
+ )) {
31
+ await window.wp.data.dispatch("core/preferences").set(props.context, key, value);
32
+ }
33
+ },
34
+ { context, preferences }
35
+ );
20
36
  }
21
- //# sourceMappingURL=set-preferences.js.map
37
+ // Annotate the CommonJS export names for ESM import in node:
38
+ 0 && (module.exports = {
39
+ setPreferences
40
+ });
41
+ //# sourceMappingURL=set-preferences.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"set-preferences.js","sourceRoot":"","sources":["../../src/editor/set-preferences.ts"],"names":[],"mappings":";;AAiBA,wCAmBC;AA1BD;;;;;;GAMG;AACI,KAAK,UAAU,cAAc,CAEnC,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
+ {
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,19 +1,33 @@
1
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
- */
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
+ var show_block_toolbar_exports = {};
20
+ __export(show_block_toolbar_exports, {
21
+ showBlockToolbar: () => showBlockToolbar
22
+ });
23
+ module.exports = __toCommonJS(show_block_toolbar_exports);
10
24
  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);
25
+ await this.page.mouse.move(50, 50);
26
+ await this.page.mouse.move(75, 75);
27
+ await this.page.mouse.move(100, 100);
18
28
  }
19
- //# sourceMappingURL=show-block-toolbar.js.map
29
+ // Annotate the CommonJS export names for ESM import in node:
30
+ 0 && (module.exports = {
31
+ showBlockToolbar
32
+ });
33
+ //# sourceMappingURL=show-block-toolbar.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"show-block-toolbar.js","sourceRoot":"","sources":["../../src/editor/show-block-toolbar.ts"],"names":[],"mappings":";;AAWA,4CAQC;AAdD;;;;;GAKG;AACI,KAAK,UAAU,gBAAgB;IACrC,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"}
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,44 +1,49 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.saveSiteEditorEntities = saveSiteEditorEntities;
4
- /**
5
- * Save entities in the site editor. Assumes the editor is in a dirty state.
6
- *
7
- * @param this
8
- * @param options
9
- */
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
+ var site_editor_exports = {};
20
+ __export(site_editor_exports, {
21
+ saveSiteEditorEntities: () => saveSiteEditorEntities
22
+ });
23
+ module.exports = __toCommonJS(site_editor_exports);
10
24
  async function saveSiteEditorEntities(options = {}) {
11
- const editorTopBar = this.page.getByRole('region', {
12
- name: 'Editor top bar',
13
- });
14
- // If we have changes in a single entity which can be published the label is `Publish`.
15
- const saveButton = editorTopBar.getByRole('button', {
16
- name: 'Save',
17
- exact: true,
18
- });
19
- const publishButton = editorTopBar.getByRole('button', {
20
- name: 'Publish',
21
- });
22
- const publishButtonIsVisible = !(await saveButton.isVisible());
23
- // First Save button in the top bar.
24
- const buttonToClick = publishButtonIsVisible ? publishButton : saveButton;
25
- await buttonToClick.click();
26
- if (!options.isOnlyCurrentEntityDirty) {
27
- // Second Save button in the entities panel.
28
- await this.page
29
- .getByRole('region', {
30
- name: /(Editor publish|Save panel)/,
31
- })
32
- .getByRole('button', { name: 'Save', exact: true })
33
- .click();
34
- }
35
- // The text in the notice can be different based on the edited entity, whether
36
- // we are saving multiple entities and whether we publish or update. So for now,
37
- // we locate it based on the last part.
38
- await this.page
39
- .getByRole('button', { name: 'Dismiss this notice' })
40
- .getByText(/(updated|published)\./)
41
- .first()
42
- .waitFor();
25
+ const editorTopBar = this.page.getByRole("region", {
26
+ name: "Editor top bar"
27
+ });
28
+ const saveButton = editorTopBar.getByRole("button", {
29
+ name: "Save",
30
+ exact: true
31
+ });
32
+ const publishButton = editorTopBar.getByRole("button", {
33
+ name: "Publish"
34
+ });
35
+ const publishButtonIsVisible = !await saveButton.isVisible();
36
+ const buttonToClick = publishButtonIsVisible ? publishButton : saveButton;
37
+ await buttonToClick.click();
38
+ if (!options.isOnlyCurrentEntityDirty) {
39
+ await this.page.getByRole("region", {
40
+ name: /(Editor publish|Save panel)/
41
+ }).getByRole("button", { name: "Save", exact: true }).click();
42
+ }
43
+ await this.page.getByRole("button", { name: "Dismiss this notice" }).getByText(/(updated|published)\./).first().waitFor();
43
44
  }
44
- //# sourceMappingURL=site-editor.js.map
45
+ // Annotate the CommonJS export names for ESM import in node:
46
+ 0 && (module.exports = {
47
+ saveSiteEditorEntities
48
+ });
49
+ //# sourceMappingURL=site-editor.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"site-editor.js","sourceRoot":"","sources":["../../src/editor/site-editor.ts"],"names":[],"mappings":";;AAgBA,wDAsCC;AA5CD;;;;;GAKG;AACI,KAAK,UAAU,sBAAsB,CAE3C,UAAmB,EAAE;IAErB,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAE,QAAQ,EAAE;QACnD,IAAI,EAAE,gBAAgB;KACtB,CAAE,CAAC;IAEJ,uFAAuF;IACvF,MAAM,UAAU,GAAG,YAAY,CAAC,SAAS,CAAE,QAAQ,EAAE;QACpD,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,IAAI;KACX,CAAE,CAAC;IACJ,MAAM,aAAa,GAAG,YAAY,CAAC,SAAS,CAAE,QAAQ,EAAE;QACvD,IAAI,EAAE,SAAS;KACf,CAAE,CAAC;IACJ,MAAM,sBAAsB,GAAG,CAAE,CAAE,MAAM,UAAU,CAAC,SAAS,EAAE,CAAE,CAAC;IAClE,oCAAoC;IACpC,MAAM,aAAa,GAAG,sBAAsB,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,UAAU,CAAC;IAC1E,MAAM,aAAa,CAAC,KAAK,EAAE,CAAC;IAE5B,IAAK,CAAE,OAAO,CAAC,wBAAwB,EAAG,CAAC;QAC1C,4CAA4C;QAC5C,MAAM,IAAI,CAAC,IAAI;aACb,SAAS,CAAE,QAAQ,EAAE;YACrB,IAAI,EAAE,6BAA6B;SACnC,CAAE;aACF,SAAS,CAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAE;aACpD,KAAK,EAAE,CAAC;IACX,CAAC;IACD,8EAA8E;IAC9E,gFAAgF;IAChF,uCAAuC;IACvC,MAAM,IAAI,CAAC,IAAI;SACb,SAAS,CAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,qBAAqB,EAAE,CAAE;SACtD,SAAS,CAAE,uBAAuB,CAAE;SACpC,KAAK,EAAE;SACP,OAAO,EAAE,CAAC;AACb,CAAC"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/editor/site-editor.ts"],
4
+ "sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Editor } from './index';\n\ninterface Options {\n\t// If the only dirty entity is the current one, skip opening the save panel.\n\tisOnlyCurrentEntityDirty?: boolean;\n}\n\n/**\n * Save entities in the site editor. Assumes the editor is in a dirty state.\n *\n * @param this\n * @param options\n */\nexport async function saveSiteEditorEntities(\n\tthis: Editor,\n\toptions: Options = {}\n) {\n\tconst editorTopBar = this.page.getByRole( 'region', {\n\t\tname: 'Editor top bar',\n\t} );\n\n\t// If we have changes in a single entity which can be published the label is `Publish`.\n\tconst saveButton = editorTopBar.getByRole( 'button', {\n\t\tname: 'Save',\n\t\texact: true,\n\t} );\n\tconst publishButton = editorTopBar.getByRole( 'button', {\n\t\tname: 'Publish',\n\t} );\n\tconst publishButtonIsVisible = ! ( await saveButton.isVisible() );\n\t// First Save button in the top bar.\n\tconst buttonToClick = publishButtonIsVisible ? publishButton : saveButton;\n\tawait buttonToClick.click();\n\n\tif ( ! options.isOnlyCurrentEntityDirty ) {\n\t\t// Second Save button in the entities panel.\n\t\tawait this.page\n\t\t\t.getByRole( 'region', {\n\t\t\t\tname: /(Editor publish|Save panel)/,\n\t\t\t} )\n\t\t\t.getByRole( 'button', { name: 'Save', exact: true } )\n\t\t\t.click();\n\t}\n\t// The text in the notice can be different based on the edited entity, whether\n\t// we are saving multiple entities and whether we publish or update. So for now,\n\t// we locate it based on the last part.\n\tawait this.page\n\t\t.getByRole( 'button', { name: 'Dismiss this notice' } )\n\t\t.getByText( /(updated|published)\\./ )\n\t\t.first()\n\t\t.waitFor();\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBA,eAAsB,uBAErB,UAAmB,CAAC,GACnB;AACD,QAAM,eAAe,KAAK,KAAK,UAAW,UAAU;AAAA,IACnD,MAAM;AAAA,EACP,CAAE;AAGF,QAAM,aAAa,aAAa,UAAW,UAAU;AAAA,IACpD,MAAM;AAAA,IACN,OAAO;AAAA,EACR,CAAE;AACF,QAAM,gBAAgB,aAAa,UAAW,UAAU;AAAA,IACvD,MAAM;AAAA,EACP,CAAE;AACF,QAAM,yBAAyB,CAAI,MAAM,WAAW,UAAU;AAE9D,QAAM,gBAAgB,yBAAyB,gBAAgB;AAC/D,QAAM,cAAc,MAAM;AAE1B,MAAK,CAAE,QAAQ,0BAA2B;AAEzC,UAAM,KAAK,KACT,UAAW,UAAU;AAAA,MACrB,MAAM;AAAA,IACP,CAAE,EACD,UAAW,UAAU,EAAE,MAAM,QAAQ,OAAO,KAAK,CAAE,EACnD,MAAM;AAAA,EACT;AAIA,QAAM,KAAK,KACT,UAAW,UAAU,EAAE,MAAM,sBAAsB,CAAE,EACrD,UAAW,uBAAwB,EACnC,MAAM,EACN,QAAQ;AACX;",
6
+ "names": []
7
+ }
@@ -1,33 +1,45 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.switchEditorTool = switchEditorTool;
4
- /**
5
- * Switch the editor tool being used.
6
- *
7
- * @param this
8
- * @param label The text string of the button label.
9
- */
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
+ var switch_editor_tool_exports = {};
20
+ __export(switch_editor_tool_exports, {
21
+ switchEditorTool: () => switchEditorTool
22
+ });
23
+ module.exports = __toCommonJS(switch_editor_tool_exports);
10
24
  async function switchEditorTool(label) {
11
- const toolsToolbar = this.page.getByRole('toolbar', {
12
- name: 'Document tools',
13
- });
14
- await toolsToolbar
15
- .getByRole('button', {
16
- name: 'Tools',
17
- })
18
- .click();
19
- const menu = this.page.getByRole('menu', {
20
- name: 'Tools',
21
- });
22
- await menu
23
- .getByRole('menuitemradio', {
24
- name: label,
25
- })
26
- .click();
27
- await toolsToolbar
28
- .getByRole('button', {
29
- name: 'Tools',
30
- })
31
- .click();
25
+ const toolsToolbar = this.page.getByRole("toolbar", {
26
+ name: "Document tools"
27
+ });
28
+ await toolsToolbar.getByRole("button", {
29
+ name: "Tools"
30
+ }).click();
31
+ const menu = this.page.getByRole("menu", {
32
+ name: "Tools"
33
+ });
34
+ await menu.getByRole("menuitemradio", {
35
+ name: label
36
+ }).click();
37
+ await toolsToolbar.getByRole("button", {
38
+ name: "Tools"
39
+ }).click();
32
40
  }
33
- //# sourceMappingURL=switch-editor-tool.js.map
41
+ // Annotate the CommonJS export names for ESM import in node:
42
+ 0 && (module.exports = {
43
+ switchEditorTool
44
+ });
45
+ //# sourceMappingURL=switch-editor-tool.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"switch-editor-tool.js","sourceRoot":"","sources":["../../src/editor/switch-editor-tool.ts"],"names":[],"mappings":";;AAWA,4CAsBC;AA5BD;;;;;GAKG;AACI,KAAK,UAAU,gBAAgB,CAAgB,KAAa;IAClE,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAE,SAAS,EAAE;QACpD,IAAI,EAAE,gBAAgB;KACtB,CAAE,CAAC;IACJ,MAAM,YAAY;SAChB,SAAS,CAAE,QAAQ,EAAE;QACrB,IAAI,EAAE,OAAO;KACb,CAAE;SACF,KAAK,EAAE,CAAC;IACV,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAE,MAAM,EAAE;QACzC,IAAI,EAAE,OAAO;KACb,CAAE,CAAC;IACJ,MAAM,IAAI;SACR,SAAS,CAAE,eAAe,EAAE;QAC5B,IAAI,EAAE,KAAK;KACX,CAAE;SACF,KAAK,EAAE,CAAC;IACV,MAAM,YAAY;SAChB,SAAS,CAAE,QAAQ,EAAE;QACrB,IAAI,EAAE,OAAO;KACb,CAAE;SACF,KAAK,EAAE,CAAC;AACX,CAAC"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/editor/switch-editor-tool.ts"],
4
+ "sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Editor } from './index';\n\n/**\n * Switch the editor tool being used.\n *\n * @param this\n * @param label The text string of the button label.\n */\nexport async function switchEditorTool( this: Editor, label: string ) {\n\tconst toolsToolbar = this.page.getByRole( 'toolbar', {\n\t\tname: 'Document tools',\n\t} );\n\tawait toolsToolbar\n\t\t.getByRole( 'button', {\n\t\t\tname: 'Tools',\n\t\t} )\n\t\t.click();\n\tconst menu = this.page.getByRole( 'menu', {\n\t\tname: 'Tools',\n\t} );\n\tawait menu\n\t\t.getByRole( 'menuitemradio', {\n\t\t\tname: label,\n\t\t} )\n\t\t.click();\n\tawait toolsToolbar\n\t\t.getByRole( 'button', {\n\t\t\tname: 'Tools',\n\t\t} )\n\t\t.click();\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,eAAsB,iBAAgC,OAAgB;AACrE,QAAM,eAAe,KAAK,KAAK,UAAW,WAAW;AAAA,IACpD,MAAM;AAAA,EACP,CAAE;AACF,QAAM,aACJ,UAAW,UAAU;AAAA,IACrB,MAAM;AAAA,EACP,CAAE,EACD,MAAM;AACR,QAAM,OAAO,KAAK,KAAK,UAAW,QAAQ;AAAA,IACzC,MAAM;AAAA,EACP,CAAE;AACF,QAAM,KACJ,UAAW,iBAAiB;AAAA,IAC5B,MAAM;AAAA,EACP,CAAE,EACD,MAAM;AACR,QAAM,aACJ,UAAW,UAAU;AAAA,IACrB,MAAM;AAAA,EACP,CAAE,EACD,MAAM;AACT;",
6
+ "names": []
7
+ }
@@ -1,18 +1,37 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.switchToLegacyCanvas = switchToLegacyCanvas;
4
- /**
5
- * Switches to legacy (non-iframed) canvas.
6
- *
7
- * @param this
8
- */
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
+ var switch_to_legacy_canvas_exports = {};
20
+ __export(switch_to_legacy_canvas_exports, {
21
+ switchToLegacyCanvas: () => switchToLegacyCanvas
22
+ });
23
+ module.exports = __toCommonJS(switch_to_legacy_canvas_exports);
9
24
  async function switchToLegacyCanvas() {
10
- await this.page.waitForFunction(() => window?.wp?.blocks);
11
- await this.page.evaluate(() => {
12
- window.wp.blocks.registerBlockType('test/v2', {
13
- apiVersion: '2',
14
- title: 'test',
15
- });
25
+ await this.page.waitForFunction(() => window?.wp?.blocks);
26
+ await this.page.evaluate(() => {
27
+ window.wp.blocks.registerBlockType("test/v2", {
28
+ apiVersion: "2",
29
+ title: "test"
16
30
  });
31
+ });
17
32
  }
18
- //# sourceMappingURL=switch-to-legacy-canvas.js.map
33
+ // Annotate the CommonJS export names for ESM import in node:
34
+ 0 && (module.exports = {
35
+ switchToLegacyCanvas
36
+ });
37
+ //# sourceMappingURL=switch-to-legacy-canvas.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"switch-to-legacy-canvas.js","sourceRoot":"","sources":["../../src/editor/switch-to-legacy-canvas.ts"],"names":[],"mappings":";;AAUA,oDASC;AAdD;;;;GAIG;AACI,KAAK,UAAU,oBAAoB;IACzC,MAAM,IAAI,CAAC,IAAI,CAAC,eAAe,CAAE,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,EAAE,MAAM,CAAE,CAAC;IAE5D,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAE,GAAG,EAAE;QAC9B,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,iBAAiB,CAAE,SAAS,EAAE;YAC9C,UAAU,EAAE,GAAG;YACf,KAAK,EAAE,MAAM;SACb,CAAE,CAAC;IACL,CAAC,CAAE,CAAC;AACL,CAAC"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/editor/switch-to-legacy-canvas.ts"],
4
+ "sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Editor } from './index';\n\n/**\n * Switches to legacy (non-iframed) canvas.\n *\n * @param this\n */\nexport async function switchToLegacyCanvas( this: Editor ) {\n\tawait this.page.waitForFunction( () => window?.wp?.blocks );\n\n\tawait this.page.evaluate( () => {\n\t\twindow.wp.blocks.registerBlockType( 'test/v2', {\n\t\t\tapiVersion: '2',\n\t\t\ttitle: 'test',\n\t\t} );\n\t} );\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,eAAsB,uBAAqC;AAC1D,QAAM,KAAK,KAAK,gBAAiB,MAAM,QAAQ,IAAI,MAAO;AAE1D,QAAM,KAAK,KAAK,SAAU,MAAM;AAC/B,WAAO,GAAG,OAAO,kBAAmB,WAAW;AAAA,MAC9C,YAAY;AAAA,MACZ,OAAO;AAAA,IACR,CAAE;AAAA,EACH,CAAE;AACH;",
6
+ "names": []
7
+ }
@@ -1,24 +1,44 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.transformBlockTo = transformBlockTo;
4
- /**
5
- * Clicks the default block appender.
6
- *
7
- * @param this
8
- * @param name Block name.
9
- */
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
+ var transform_block_to_exports = {};
20
+ __export(transform_block_to_exports, {
21
+ transformBlockTo: () => transformBlockTo
22
+ });
23
+ module.exports = __toCommonJS(transform_block_to_exports);
10
24
  async function transformBlockTo(name) {
11
- await this.page.waitForFunction(() => window?.wp?.blocks && window?.wp?.data);
12
- await this.page.evaluate(([blockName]) => {
13
- const clientIds = window.wp.data
14
- .select('core/block-editor')
15
- .getSelectedBlockClientIds();
16
- const blocks = window.wp.data
17
- .select('core/block-editor')
18
- .getBlocksByClientId(clientIds);
19
- window.wp.data
20
- .dispatch('core/block-editor')
21
- .replaceBlocks(clientIds, window.wp.blocks.switchToBlockType(blocks, blockName));
22
- }, [name]);
25
+ await this.page.waitForFunction(
26
+ () => window?.wp?.blocks && window?.wp?.data
27
+ );
28
+ await this.page.evaluate(
29
+ ([blockName]) => {
30
+ const clientIds = window.wp.data.select("core/block-editor").getSelectedBlockClientIds();
31
+ const blocks = window.wp.data.select("core/block-editor").getBlocksByClientId(clientIds);
32
+ window.wp.data.dispatch("core/block-editor").replaceBlocks(
33
+ clientIds,
34
+ window.wp.blocks.switchToBlockType(blocks, blockName)
35
+ );
36
+ },
37
+ [name]
38
+ );
23
39
  }
24
- //# sourceMappingURL=transform-block-to.js.map
40
+ // Annotate the CommonJS export names for ESM import in node:
41
+ 0 && (module.exports = {
42
+ transformBlockTo
43
+ });
44
+ //# sourceMappingURL=transform-block-to.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"transform-block-to.js","sourceRoot":"","sources":["../../src/editor/transform-block-to.ts"],"names":[],"mappings":";;AAWA,4CAsBC;AA5BD;;;;;GAKG;AACI,KAAK,UAAU,gBAAgB,CAAgB,IAAY;IACjE,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,CACvB,CAAE,CAAE,SAAS,CAAE,EAAG,EAAE;QACnB,MAAM,SAAS,GAAG,MAAM,CAAC,EAAE,CAAC,IAAI;aAC9B,MAAM,CAAE,mBAAmB,CAAE;aAC7B,yBAAyB,EAAE,CAAC;QAC9B,MAAM,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC,IAAI;aAC3B,MAAM,CAAE,mBAAmB,CAAE;aAC7B,mBAAmB,CAAE,SAAS,CAAE,CAAC;QACnC,MAAM,CAAC,EAAE,CAAC,IAAI;aACZ,QAAQ,CAAE,mBAAmB,CAAE;aAC/B,aAAa,CACb,SAAS,EACT,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,iBAAiB,CAAE,MAAM,EAAE,SAAS,CAAE,CACvD,CAAC;IACJ,CAAC,EACD,CAAE,IAAI,CAAE,CACR,CAAC;AACH,CAAC"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/editor/transform-block-to.ts"],
4
+ "sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Editor } from './index';\n\n/**\n * Clicks the default block appender.\n *\n * @param this\n * @param name Block name.\n */\nexport async function transformBlockTo( this: Editor, name: string ) {\n\tawait this.page.waitForFunction(\n\t\t() => window?.wp?.blocks && window?.wp?.data\n\t);\n\n\tawait this.page.evaluate(\n\t\t( [ blockName ] ) => {\n\t\t\tconst clientIds = window.wp.data\n\t\t\t\t.select( 'core/block-editor' )\n\t\t\t\t.getSelectedBlockClientIds();\n\t\t\tconst blocks = window.wp.data\n\t\t\t\t.select( 'core/block-editor' )\n\t\t\t\t.getBlocksByClientId( clientIds );\n\t\t\twindow.wp.data\n\t\t\t\t.dispatch( 'core/block-editor' )\n\t\t\t\t.replaceBlocks(\n\t\t\t\t\tclientIds,\n\t\t\t\t\twindow.wp.blocks.switchToBlockType( blocks, blockName )\n\t\t\t\t);\n\t\t},\n\t\t[ name ]\n\t);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,eAAsB,iBAAgC,MAAe;AACpE,QAAM,KAAK,KAAK;AAAA,IACf,MAAM,QAAQ,IAAI,UAAU,QAAQ,IAAI;AAAA,EACzC;AAEA,QAAM,KAAK,KAAK;AAAA,IACf,CAAE,CAAE,SAAU,MAAO;AACpB,YAAM,YAAY,OAAO,GAAG,KAC1B,OAAQ,mBAAoB,EAC5B,0BAA0B;AAC5B,YAAM,SAAS,OAAO,GAAG,KACvB,OAAQ,mBAAoB,EAC5B,oBAAqB,SAAU;AACjC,aAAO,GAAG,KACR,SAAU,mBAAoB,EAC9B;AAAA,QACA;AAAA,QACA,OAAO,GAAG,OAAO,kBAAmB,QAAQ,SAAU;AAAA,MACvD;AAAA,IACF;AAAA,IACA,CAAE,IAAK;AAAA,EACR;AACD;",
6
+ "names": []
7
+ }
package/build/index.js CHANGED
@@ -1,34 +1,52 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
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 });
15
9
  };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.expect = exports.test = exports.Lighthouse = exports.Metrics = exports.RequestUtils = exports.PageUtils = exports.Editor = exports.Admin = void 0;
18
- __exportStar(require("./types"), exports);
19
- var admin_1 = require("./admin");
20
- Object.defineProperty(exports, "Admin", { enumerable: true, get: function () { return admin_1.Admin; } });
21
- var editor_1 = require("./editor");
22
- Object.defineProperty(exports, "Editor", { enumerable: true, get: function () { return editor_1.Editor; } });
23
- var page_utils_1 = require("./page-utils");
24
- Object.defineProperty(exports, "PageUtils", { enumerable: true, get: function () { return page_utils_1.PageUtils; } });
25
- var request_utils_1 = require("./request-utils");
26
- Object.defineProperty(exports, "RequestUtils", { enumerable: true, get: function () { return request_utils_1.RequestUtils; } });
27
- var metrics_1 = require("./metrics");
28
- Object.defineProperty(exports, "Metrics", { enumerable: true, get: function () { return metrics_1.Metrics; } });
29
- var lighthouse_1 = require("./lighthouse");
30
- Object.defineProperty(exports, "Lighthouse", { enumerable: true, get: function () { return lighthouse_1.Lighthouse; } });
31
- var test_1 = require("./test");
32
- Object.defineProperty(exports, "test", { enumerable: true, get: function () { return test_1.test; } });
33
- Object.defineProperty(exports, "expect", { enumerable: true, get: function () { return test_1.expect; } });
34
- //# sourceMappingURL=index.js.map
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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+ var index_exports = {};
21
+ __export(index_exports, {
22
+ Admin: () => import_admin.Admin,
23
+ Editor: () => import_editor.Editor,
24
+ Lighthouse: () => import_lighthouse.Lighthouse,
25
+ Metrics: () => import_metrics.Metrics,
26
+ PageUtils: () => import_page_utils.PageUtils,
27
+ RequestUtils: () => import_request_utils.RequestUtils,
28
+ expect: () => import_test.expect,
29
+ test: () => import_test.test
30
+ });
31
+ module.exports = __toCommonJS(index_exports);
32
+ __reExport(index_exports, require("./types"), module.exports);
33
+ var import_admin = require("./admin");
34
+ var import_editor = require("./editor");
35
+ var import_page_utils = require("./page-utils");
36
+ var import_request_utils = require("./request-utils");
37
+ var import_metrics = require("./metrics");
38
+ var import_lighthouse = require("./lighthouse");
39
+ var import_test = require("./test");
40
+ // Annotate the CommonJS export names for ESM import in node:
41
+ 0 && (module.exports = {
42
+ Admin,
43
+ Editor,
44
+ Lighthouse,
45
+ Metrics,
46
+ PageUtils,
47
+ RequestUtils,
48
+ expect,
49
+ test,
50
+ ...require("./types")
51
+ });
52
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,iCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,2CAAyC;AAAhC,uGAAA,SAAS,OAAA;AAClB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,+BAAsC;AAA7B,4FAAA,IAAI,OAAA;AAAE,8FAAA,MAAM,OAAA"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/index.ts"],
4
+ "sourcesContent": ["export * from './types';\nexport { Admin } from './admin';\nexport { Editor } from './editor';\nexport { PageUtils } from './page-utils';\nexport { RequestUtils } from './request-utils';\nexport { Metrics } from './metrics';\nexport { Lighthouse } from './lighthouse';\nexport { test, expect } from './test';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAc,oBAAd;AACA,mBAAsB;AACtB,oBAAuB;AACvB,wBAA0B;AAC1B,2BAA6B;AAC7B,qBAAwB;AACxB,wBAA2B;AAC3B,kBAA6B;",
6
+ "names": []
7
+ }