@wordpress/e2e-test-utils-playwright 1.34.0 → 1.34.1-next.2f1c7c01b.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 +2 -0
  2. package/build/admin/create-new-post.js.map +1 -1
  3. package/build/admin/edit-post.js +2 -0
  4. package/build/admin/edit-post.js.map +1 -1
  5. package/build/admin/get-page-error.js +3 -1
  6. package/build/admin/get-page-error.js.map +1 -1
  7. package/build/admin/index.js +4 -2
  8. package/build/admin/index.js.map +1 -1
  9. package/build/admin/visit-admin-page.js +2 -0
  10. package/build/admin/visit-admin-page.js.map +1 -1
  11. package/build/admin/visit-site-editor.js +2 -0
  12. package/build/admin/visit-site-editor.js.map +1 -1
  13. package/build/config.js +4 -2
  14. package/build/config.js.map +1 -1
  15. package/build/editor/click-block-options-menu-item.js +2 -0
  16. package/build/editor/click-block-options-menu-item.js.map +1 -1
  17. package/build/editor/click-block-toolbar-button.js +2 -0
  18. package/build/editor/click-block-toolbar-button.js.map +1 -1
  19. package/build/editor/get-blocks.js +2 -0
  20. package/build/editor/get-blocks.js.map +1 -1
  21. package/build/editor/get-edited-post-content.js +2 -0
  22. package/build/editor/get-edited-post-content.js.map +1 -1
  23. package/build/editor/index.js +4 -2
  24. package/build/editor/index.js.map +1 -1
  25. package/build/editor/insert-block.js +2 -0
  26. package/build/editor/insert-block.js.map +1 -1
  27. package/build/editor/open-document-settings-sidebar.js +2 -0
  28. package/build/editor/open-document-settings-sidebar.js.map +1 -1
  29. package/build/editor/preview.js +2 -0
  30. package/build/editor/preview.js.map +1 -1
  31. package/build/editor/publish-post.js +2 -0
  32. package/build/editor/publish-post.js.map +1 -1
  33. package/build/editor/save-draft.js +2 -0
  34. package/build/editor/save-draft.js.map +1 -1
  35. package/build/editor/select-blocks.js +2 -0
  36. package/build/editor/select-blocks.js.map +1 -1
  37. package/build/editor/set-content.js +2 -0
  38. package/build/editor/set-content.js.map +1 -1
  39. package/build/editor/set-is-fixed-toolbar.js +2 -0
  40. package/build/editor/set-is-fixed-toolbar.js.map +1 -1
  41. package/build/editor/set-preferences.js +2 -0
  42. package/build/editor/set-preferences.js.map +1 -1
  43. package/build/editor/show-block-toolbar.js +2 -0
  44. package/build/editor/show-block-toolbar.js.map +1 -1
  45. package/build/editor/site-editor.js +2 -0
  46. package/build/editor/site-editor.js.map +1 -1
  47. package/build/editor/switch-editor-tool.js +2 -0
  48. package/build/editor/switch-editor-tool.js.map +1 -1
  49. package/build/editor/switch-to-legacy-canvas.js +2 -0
  50. package/build/editor/switch-to-legacy-canvas.js.map +1 -1
  51. package/build/editor/transform-block-to.js +2 -0
  52. package/build/editor/transform-block-to.js.map +1 -1
  53. package/build/index.js +2 -0
  54. package/build/index.js.map +1 -1
  55. package/build/lighthouse/index.js +4 -2
  56. package/build/lighthouse/index.js.map +1 -1
  57. package/build/metrics/index.js +4 -2
  58. package/build/metrics/index.js.map +1 -1
  59. package/build/page-utils/drag-files.js +2 -0
  60. package/build/page-utils/drag-files.js.map +1 -1
  61. package/build/page-utils/emulate-network-conditions.js +3 -1
  62. package/build/page-utils/emulate-network-conditions.js.map +1 -1
  63. package/build/page-utils/index.js +4 -2
  64. package/build/page-utils/index.js.map +1 -1
  65. package/build/page-utils/is-current-url.js +2 -0
  66. package/build/page-utils/is-current-url.js.map +1 -1
  67. package/build/page-utils/keycodes.js +7 -5
  68. package/build/page-utils/keycodes.js.map +1 -1
  69. package/build/page-utils/press-keys.js +8 -6
  70. package/build/page-utils/press-keys.js.map +1 -1
  71. package/build/page-utils/set-browser-viewport.js +3 -1
  72. package/build/page-utils/set-browser-viewport.js.map +1 -1
  73. package/build/request-utils/blocks.js +2 -0
  74. package/build/request-utils/blocks.js.map +1 -1
  75. package/build/request-utils/comments.js +2 -0
  76. package/build/request-utils/comments.js.map +1 -1
  77. package/build/request-utils/gutenberg-experiments.js +2 -0
  78. package/build/request-utils/gutenberg-experiments.js.map +1 -1
  79. package/build/request-utils/index.js +4 -2
  80. package/build/request-utils/index.js.map +1 -1
  81. package/build/request-utils/login.js +2 -0
  82. package/build/request-utils/login.js.map +1 -1
  83. package/build/request-utils/media.js +2 -0
  84. package/build/request-utils/media.js.map +1 -1
  85. package/build/request-utils/menus.js +2 -0
  86. package/build/request-utils/menus.js.map +1 -1
  87. package/build/request-utils/pages.js +3 -1
  88. package/build/request-utils/pages.js.map +1 -1
  89. package/build/request-utils/patterns.js +2 -0
  90. package/build/request-utils/patterns.js.map +1 -1
  91. package/build/request-utils/plugins.js +2 -0
  92. package/build/request-utils/plugins.js.map +1 -1
  93. package/build/request-utils/posts.js +2 -0
  94. package/build/request-utils/posts.js.map +1 -1
  95. package/build/request-utils/preferences.js +2 -0
  96. package/build/request-utils/preferences.js.map +1 -1
  97. package/build/request-utils/rest.js +2 -0
  98. package/build/request-utils/rest.js.map +1 -1
  99. package/build/request-utils/site-settings.js +2 -0
  100. package/build/request-utils/site-settings.js.map +1 -1
  101. package/build/request-utils/templates.js +3 -1
  102. package/build/request-utils/templates.js.map +1 -1
  103. package/build/request-utils/themes.js +3 -1
  104. package/build/request-utils/themes.js.map +1 -1
  105. package/build/request-utils/users.js +2 -0
  106. package/build/request-utils/users.js.map +1 -1
  107. package/build/request-utils/widgets.js +2 -0
  108. package/build/request-utils/widgets.js.map +1 -1
  109. package/build/test.js +5 -3
  110. package/build/test.js.map +1 -1
  111. package/build/types.js +2 -0
  112. package/build/types.js.map +1 -1
  113. package/package.json +2 -3
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/e2e-test-utils-playwright/src/admin/create-new-post.ts
19
21
  var create_new_post_exports = {};
20
22
  __export(create_new_post_exports, {
21
23
  createNewPost: () => createNewPost
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/admin/create-new-post.ts"],
4
4
  "sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Admin } from './';\n\ninterface NewPostOptions {\n\tpostType?: string;\n\ttitle?: string;\n\tcontent?: string;\n\texcerpt?: string;\n\tshowWelcomeGuide?: boolean;\n\tfullscreenMode?: boolean;\n}\n\n/**\n * Creates new post.\n *\n * @param this\n * @param options Options to create new post.\n */\nexport async function createNewPost(\n\tthis: Admin,\n\toptions: NewPostOptions = {}\n) {\n\tconst query = new URLSearchParams();\n\tconst { postType, title, content, excerpt } = options;\n\n\tif ( postType ) {\n\t\tquery.set( 'post_type', postType );\n\t}\n\tif ( title ) {\n\t\tquery.set( 'post_title', title );\n\t}\n\tif ( content ) {\n\t\tquery.set( 'content', content );\n\t}\n\tif ( excerpt ) {\n\t\tquery.set( 'excerpt', excerpt );\n\t}\n\n\tawait this.visitAdminPage( 'post-new.php', query.toString() );\n\n\tawait this.editor.setPreferences( 'core/edit-post', {\n\t\twelcomeGuide: options.showWelcomeGuide ?? false,\n\t\tfullscreenMode: options.fullscreenMode ?? false,\n\t} );\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBA,eAAsB,cAErB,UAA0B,CAAC,GAC1B;AACD,QAAM,QAAQ,IAAI,gBAAgB;AAClC,QAAM,EAAE,UAAU,OAAO,SAAS,QAAQ,IAAI;AAE9C,MAAK,UAAW;AACf,UAAM,IAAK,aAAa,QAAS;AAAA,EAClC;AACA,MAAK,OAAQ;AACZ,UAAM,IAAK,cAAc,KAAM;AAAA,EAChC;AACA,MAAK,SAAU;AACd,UAAM,IAAK,WAAW,OAAQ;AAAA,EAC/B;AACA,MAAK,SAAU;AACd,UAAM,IAAK,WAAW,OAAQ;AAAA,EAC/B;AAEA,QAAM,KAAK,eAAgB,gBAAgB,MAAM,SAAS,CAAE;AAE5D,QAAM,KAAK,OAAO,eAAgB,kBAAkB;AAAA,IACnD,cAAc,QAAQ,oBAAoB;AAAA,IAC1C,gBAAgB,QAAQ,kBAAkB;AAAA,EAC3C,CAAE;AACH;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBA,eAAsB,cAErB,UAA0B,CAAC,GAC1B;AACD,QAAM,QAAQ,IAAI,gBAAgB;AAClC,QAAM,EAAE,UAAU,OAAO,SAAS,QAAQ,IAAI;AAE9C,MAAK,UAAW;AACf,UAAM,IAAK,aAAa,QAAS;AAAA,EAClC;AACA,MAAK,OAAQ;AACZ,UAAM,IAAK,cAAc,KAAM;AAAA,EAChC;AACA,MAAK,SAAU;AACd,UAAM,IAAK,WAAW,OAAQ;AAAA,EAC/B;AACA,MAAK,SAAU;AACd,UAAM,IAAK,WAAW,OAAQ;AAAA,EAC/B;AAEA,QAAM,KAAK,eAAgB,gBAAgB,MAAM,SAAS,CAAE;AAE5D,QAAM,KAAK,OAAO,eAAgB,kBAAkB;AAAA,IACnD,cAAc,QAAQ,oBAAoB;AAAA,IAC1C,gBAAgB,QAAQ,kBAAkB;AAAA,EAC3C,CAAE;AACH;",
6
6
  "names": []
7
7
  }
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/e2e-test-utils-playwright/src/admin/edit-post.ts
19
21
  var edit_post_exports = {};
20
22
  __export(edit_post_exports, {
21
23
  editPost: () => editPost
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/admin/edit-post.ts"],
4
4
  "sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Admin } from '.';\n\n/**\n * Open the post with given ID in the editor.\n *\n * @param this\n * @param postId Post ID to visit.\n */\nexport async function editPost( this: Admin, postId: string | number ) {\n\tconst query = new URLSearchParams();\n\n\tquery.set( 'post', String( postId ) );\n\tquery.set( 'action', 'edit' );\n\n\tawait this.visitAdminPage( 'post.php', query.toString() );\n\n\tawait this.editor.setPreferences( 'core/edit-post', {\n\t\twelcomeGuide: false,\n\t\tfullscreenMode: false,\n\t} );\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,eAAsB,SAAuB,QAA0B;AACtE,QAAM,QAAQ,IAAI,gBAAgB;AAElC,QAAM,IAAK,QAAQ,OAAQ,MAAO,CAAE;AACpC,QAAM,IAAK,UAAU,MAAO;AAE5B,QAAM,KAAK,eAAgB,YAAY,MAAM,SAAS,CAAE;AAExD,QAAM,KAAK,OAAO,eAAgB,kBAAkB;AAAA,IACnD,cAAc;AAAA,IACd,gBAAgB;AAAA,EACjB,CAAE;AACH;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,eAAsB,SAAuB,QAA0B;AACtE,QAAM,QAAQ,IAAI,gBAAgB;AAElC,QAAM,IAAK,QAAQ,OAAQ,MAAO,CAAE;AACpC,QAAM,IAAK,UAAU,MAAO;AAE5B,QAAM,KAAK,eAAgB,YAAY,MAAM,SAAS,CAAE;AAExD,QAAM,KAAK,OAAO,eAAgB,kBAAkB;AAAA,IACnD,cAAc;AAAA,IACd,gBAAgB;AAAA,EACjB,CAAE;AACH;",
6
6
  "names": []
7
7
  }
@@ -16,12 +16,14 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/e2e-test-utils-playwright/src/admin/get-page-error.ts
19
21
  var get_page_error_exports = {};
20
22
  __export(get_page_error_exports, {
21
23
  getPageError: () => getPageError
22
24
  });
23
25
  module.exports = __toCommonJS(get_page_error_exports);
24
- const REGEXP_PHP_ERROR = /(<b>)?(Fatal error|Recoverable fatal error|Warning|Parse error|Notice|Strict Standards|Deprecated|Unknown error)(<\/b>)?: (.*?) in (.*?) on line (<b>)?\d+(<\/b>)?/;
26
+ var REGEXP_PHP_ERROR = /(<b>)?(Fatal error|Recoverable fatal error|Warning|Parse error|Notice|Strict Standards|Deprecated|Unknown error)(<\/b>)?: (.*?) in (.*?) on line (<b>)?\d+(<\/b>)?/;
25
27
  async function getPageError() {
26
28
  const content = await this.page.content();
27
29
  const match = content.match(REGEXP_PHP_ERROR);
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/admin/get-page-error.ts"],
4
4
  "sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Admin } from './';\n\n/**\n * Regular expression matching a displayed PHP error within a markup string.\n *\n * @see https://github.com/php/php-src/blob/598175e/main/main.c#L1257-L1297\n */\nconst REGEXP_PHP_ERROR =\n\t/(<b>)?(Fatal error|Recoverable fatal error|Warning|Parse error|Notice|Strict Standards|Deprecated|Unknown error)(<\\/b>)?: (.*?) in (.*?) on line (<b>)?\\d+(<\\/b>)?/;\n\n/**\n * Returns a promise resolving to one of either a string or null. A string will\n * be resolved if an error message is present in the contents of the page. If no\n * error is present, a null value will be resolved instead. This requires the\n * environment be configured to display errors.\n *\n * @see http://php.net/manual/en/function.error-reporting.php\n *\n * @param this\n * @return Promise resolving to a string or null, depending whether a page error is present.\n */\nexport async function getPageError( this: Admin ) {\n\tconst content = await this.page.content();\n\tconst match = content.match( REGEXP_PHP_ERROR );\n\treturn match ? match[ 0 ] : null;\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,MAAM,mBACL;AAaD,eAAsB,eAA4B;AACjD,QAAM,UAAU,MAAM,KAAK,KAAK,QAAQ;AACxC,QAAM,QAAQ,QAAQ,MAAO,gBAAiB;AAC9C,SAAO,QAAQ,MAAO,CAAE,IAAI;AAC7B;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,IAAM,mBACL;AAaD,eAAsB,eAA4B;AACjD,QAAM,UAAU,MAAM,KAAK,KAAK,QAAQ;AACxC,QAAM,QAAQ,QAAQ,MAAO,gBAAiB;AAC9C,SAAO,QAAQ,MAAO,CAAE,IAAI;AAC7B;",
6
6
  "names": []
7
7
  }
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/e2e-test-utils-playwright/src/admin/index.ts
19
21
  var admin_exports = {};
20
22
  __export(admin_exports, {
21
23
  Admin: () => Admin
@@ -26,7 +28,7 @@ var import_get_page_error = require("./get-page-error");
26
28
  var import_visit_admin_page = require("./visit-admin-page");
27
29
  var import_edit_post = require("./edit-post");
28
30
  var import_visit_site_editor = require("./visit-site-editor");
29
- class Admin {
31
+ var Admin = class {
30
32
  page;
31
33
  context;
32
34
  browser;
@@ -49,7 +51,7 @@ class Admin {
49
51
  visitAdminPage = import_visit_admin_page.visitAdminPage.bind(this);
50
52
  /** @borrows visitSiteEditor as this.visitSiteEditor */
51
53
  visitSiteEditor = import_visit_site_editor.visitSiteEditor.bind(this);
52
- }
54
+ };
53
55
  // Annotate the CommonJS export names for ESM import in node:
54
56
  0 && (module.exports = {
55
57
  Admin
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/admin/index.ts"],
4
4
  "sourcesContent": ["/**\n * External dependencies\n */\nimport type { Browser, Page, BrowserContext } from '@playwright/test';\n\n/**\n * Internal dependencies\n */\nimport { createNewPost } from './create-new-post';\nimport { getPageError } from './get-page-error';\nimport { visitAdminPage } from './visit-admin-page';\nimport { editPost } from './edit-post';\nimport { visitSiteEditor } from './visit-site-editor';\nimport type { PageUtils } from '../page-utils';\nimport type { Editor } from '../editor';\n\ntype AdminConstructorProps = {\n\tpage: Page;\n\tpageUtils: PageUtils;\n\teditor: Editor;\n};\n\nexport class Admin {\n\tpage: Page;\n\tcontext: BrowserContext;\n\tbrowser: Browser;\n\tpageUtils: PageUtils;\n\teditor: Editor;\n\n\tconstructor( { page, pageUtils, editor }: AdminConstructorProps ) {\n\t\tthis.page = page;\n\t\tthis.context = page.context();\n\t\tthis.browser = this.context.browser()!;\n\t\tthis.pageUtils = pageUtils;\n\t\tthis.editor = editor;\n\t}\n\n\t/** @borrows createNewPost as this.createNewPost */\n\tcreateNewPost: typeof createNewPost = createNewPost.bind( this );\n\t/** @borrows editPost as this.editPost */\n\teditPost: typeof editPost = editPost.bind( this );\n\t/** @borrows getPageError as this.getPageError */\n\tgetPageError: typeof getPageError = getPageError.bind( this );\n\t/** @borrows visitAdminPage as this.visitAdminPage */\n\tvisitAdminPage: typeof visitAdminPage = visitAdminPage.bind( this );\n\t/** @borrows visitSiteEditor as this.visitSiteEditor */\n\tvisitSiteEditor: typeof visitSiteEditor = visitSiteEditor.bind( this );\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,6BAA8B;AAC9B,4BAA6B;AAC7B,8BAA+B;AAC/B,uBAAyB;AACzB,+BAAgC;AAUzB,MAAM,MAAM;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,YAAa,EAAE,MAAM,WAAW,OAAO,GAA2B;AACjE,SAAK,OAAO;AACZ,SAAK,UAAU,KAAK,QAAQ;AAC5B,SAAK,UAAU,KAAK,QAAQ,QAAQ;AACpC,SAAK,YAAY;AACjB,SAAK,SAAS;AAAA,EACf;AAAA;AAAA,EAGA,gBAAsC,qCAAc,KAAM,IAAK;AAAA;AAAA,EAE/D,WAA4B,0BAAS,KAAM,IAAK;AAAA;AAAA,EAEhD,eAAoC,mCAAa,KAAM,IAAK;AAAA;AAAA,EAE5D,iBAAwC,uCAAe,KAAM,IAAK;AAAA;AAAA,EAElE,kBAA0C,yCAAgB,KAAM,IAAK;AACtE;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,6BAA8B;AAC9B,4BAA6B;AAC7B,8BAA+B;AAC/B,uBAAyB;AACzB,+BAAgC;AAUzB,IAAM,QAAN,MAAY;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,YAAa,EAAE,MAAM,WAAW,OAAO,GAA2B;AACjE,SAAK,OAAO;AACZ,SAAK,UAAU,KAAK,QAAQ;AAC5B,SAAK,UAAU,KAAK,QAAQ,QAAQ;AACpC,SAAK,YAAY;AACjB,SAAK,SAAS;AAAA,EACf;AAAA;AAAA,EAGA,gBAAsC,qCAAc,KAAM,IAAK;AAAA;AAAA,EAE/D,WAA4B,0BAAS,KAAM,IAAK;AAAA;AAAA,EAEhD,eAAoC,mCAAa,KAAM,IAAK;AAAA;AAAA,EAE5D,iBAAwC,uCAAe,KAAM,IAAK;AAAA;AAAA,EAElE,kBAA0C,yCAAgB,KAAM,IAAK;AACtE;",
6
6
  "names": []
7
7
  }
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/e2e-test-utils-playwright/src/admin/visit-admin-page.ts
19
21
  var visit_admin_page_exports = {};
20
22
  __export(visit_admin_page_exports, {
21
23
  visitAdminPage: () => visitAdminPage
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/admin/visit-admin-page.ts"],
4
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;",
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
6
  "names": []
7
7
  }
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/e2e-test-utils-playwright/src/admin/visit-site-editor.ts
19
21
  var visit_site_editor_exports = {};
20
22
  __export(visit_site_editor_exports, {
21
23
  visitSiteEditor: () => visitSiteEditor
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/admin/visit-site-editor.ts"],
4
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,UA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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
6
  "names": []
7
7
  }
package/build/config.js CHANGED
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/e2e-test-utils-playwright/src/config.ts
19
21
  var config_exports = {};
20
22
  __export(config_exports, {
21
23
  WP_ADMIN_USER: () => WP_ADMIN_USER,
@@ -24,12 +26,12 @@ __export(config_exports, {
24
26
  WP_USERNAME: () => WP_USERNAME
25
27
  });
26
28
  module.exports = __toCommonJS(config_exports);
27
- const {
29
+ var {
28
30
  WP_USERNAME = "admin",
29
31
  WP_PASSWORD = "password",
30
32
  WP_BASE_URL = "http://localhost:8889"
31
33
  } = process.env;
32
- const WP_ADMIN_USER = {
34
+ var WP_ADMIN_USER = {
33
35
  username: WP_USERNAME,
34
36
  password: WP_PASSWORD
35
37
  };
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../src/config.ts"],
4
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,MAAM;AAAA,EACL,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AACf,IAAI,QAAQ;AAEZ,MAAM,gBAAgB;AAAA,EACrB,UAAU;AAAA,EACV,UAAU;AACX;",
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
6
  "names": []
7
7
  }
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
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
19
21
  var click_block_options_menu_item_exports = {};
20
22
  __export(click_block_options_menu_item_exports, {
21
23
  clickBlockOptionsMenuItem: () => clickBlockOptionsMenuItem
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/editor/click-block-options-menu-item.ts"],
4
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;",
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
6
  "names": []
7
7
  }
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/e2e-test-utils-playwright/src/editor/click-block-toolbar-button.ts
19
21
  var click_block_toolbar_button_exports = {};
20
22
  __export(click_block_toolbar_button_exports, {
21
23
  clickBlockToolbarButton: () => clickBlockToolbarButton
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/editor/click-block-toolbar-button.ts"],
4
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 clickBlockToolbarButton( this: Editor, label: string ) {\n\tawait this.showBlockToolbar();\n\n\tconst blockToolbar = this.page.locator(\n\t\t'role=toolbar[name=\"Block tools\"i]'\n\t);\n\tconst button = blockToolbar.locator( `role=button[name=\"${ label }\"]` );\n\n\tawait button.click();\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,eAAsB,wBAAuC,OAAgB;AAC5E,QAAM,KAAK,iBAAiB;AAE5B,QAAM,eAAe,KAAK,KAAK;AAAA,IAC9B;AAAA,EACD;AACA,QAAM,SAAS,aAAa,QAAS,qBAAsB,KAAM,IAAK;AAEtE,QAAM,OAAO,MAAM;AACpB;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,eAAsB,wBAAuC,OAAgB;AAC5E,QAAM,KAAK,iBAAiB;AAE5B,QAAM,eAAe,KAAK,KAAK;AAAA,IAC9B;AAAA,EACD;AACA,QAAM,SAAS,aAAa,QAAS,qBAAsB,KAAM,IAAK;AAEtE,QAAM,OAAO,MAAM;AACpB;",
6
6
  "names": []
7
7
  }
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/e2e-test-utils-playwright/src/editor/get-blocks.ts
19
21
  var get_blocks_exports = {};
20
22
  __export(get_blocks_exports, {
21
23
  getBlocks: () => getBlocks
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/editor/get-blocks.ts"],
4
4
  "sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Editor } from './index';\n\ntype Block = {\n\tname: string;\n\tattributes: Record< string, unknown >;\n\tinnerBlocks: Block[];\n};\n\n/**\n * Returns the edited blocks.\n *\n * @param this\n * @param options\n * @param options.clientId Limit the results to be only under a partial tree of the specified clientId.\n * @param options.full Whether to return the full block data or just the name and attributes.\n *\n * @return The blocks.\n */\nexport async function getBlocks(\n\tthis: Editor,\n\t{ clientId, full = false }: { clientId?: string; full?: boolean } = {}\n) {\n\tawait this.page.waitForFunction(\n\t\t() => window?.wp?.blocks && window?.wp?.data\n\t);\n\n\treturn await this.page.evaluate(\n\t\t( [ _full, _clientId ] ) => {\n\t\t\t// Serialize serializable attributes of blocks.\n\t\t\tfunction serializeAttributes(\n\t\t\t\tattributes: Record< string, unknown >\n\t\t\t) {\n\t\t\t\treturn Object.fromEntries(\n\t\t\t\t\tObject.entries( attributes ).map( ( [ key, value ] ) => {\n\t\t\t\t\t\t// Serialize RichTextData to string.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tvalue instanceof window.wp.richText.RichTextData\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\treturn [ key, ( value as string ).toString() ];\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn [ key, value ];\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Remove other unpredictable properties like clientId from blocks for testing purposes.\n\t\t\tfunction recursivelyTransformBlocks( blocks: Block[] ): Block[] {\n\t\t\t\treturn blocks.map( ( block ) => ( {\n\t\t\t\t\tname: block.name,\n\t\t\t\t\tattributes: serializeAttributes( block.attributes ),\n\t\t\t\t\tinnerBlocks: recursivelyTransformBlocks(\n\t\t\t\t\t\tblock.innerBlocks\n\t\t\t\t\t),\n\t\t\t\t} ) );\n\t\t\t}\n\n\t\t\tconst blocks = window.wp.data\n\t\t\t\t.select( 'core/block-editor' )\n\t\t\t\t.getBlocks( _clientId ) as Block[];\n\n\t\t\t// The editor might still contain an unmodified empty block even when it's technically \"empty\".\n\t\t\tif (\n\t\t\t\tblocks.length === 1 &&\n\t\t\t\twindow.wp.blocks.isUnmodifiedDefaultBlock( blocks[ 0 ] )\n\t\t\t) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\treturn _full ? blocks : recursivelyTransformBlocks( blocks );\n\t\t},\n\t\t[ full, clientId ]\n\t);\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;A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,KAAK;AAAA,IACtB,CAAE,CAAE,OAAO,SAAU,MAAO;AAE3B,eAAS,oBACR,YACC;AACD,eAAO,OAAO;AAAA,UACb,OAAO,QAAS,UAAW,EAAE,IAAK,CAAE,CAAE,KAAK,KAAM,MAAO;AAEvD,gBACC,iBAAiB,OAAO,GAAG,SAAS,cACnC;AACD,qBAAO,CAAE,KAAO,MAAkB,SAAS,CAAE;AAAA,YAC9C;AACA,mBAAO,CAAE,KAAK,KAAM;AAAA,UACrB,CAAE;AAAA,QACH;AAAA,MACD;AAGA,eAAS,2BAA4BA,SAA2B;AAC/D,eAAOA,QAAO,IAAK,CAAE,WAAa;AAAA,UACjC,MAAM,MAAM;AAAA,UACZ,YAAY,oBAAqB,MAAM,UAAW;AAAA,UAClD,aAAa;AAAA,YACZ,MAAM;AAAA,UACP;AAAA,QACD,EAAI;AAAA,MACL;AAEA,YAAM,SAAS,OAAO,GAAG,KACvB,OAAQ,mBAAoB,EAC5B,UAAW,SAAU;AAGvB,UACC,OAAO,WAAW,KAClB,OAAO,GAAG,OAAO,yBAA0B,OAAQ,CAAE,CAAE,GACtD;AACD,eAAO,CAAC;AAAA,MACT;AAEA,aAAO,QAAQ,SAAS,2BAA4B,MAAO;AAAA,IAC5D;AAAA,IACA,CAAE,MAAM,QAAS;AAAA,EAClB;AACD;",
6
6
  "names": ["blocks"]
7
7
  }
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/e2e-test-utils-playwright/src/editor/get-edited-post-content.ts
19
21
  var get_edited_post_content_exports = {};
20
22
  __export(get_edited_post_content_exports, {
21
23
  getEditedPostContent: () => getEditedPostContent
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/editor/get-edited-post-content.ts"],
4
4
  "sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Editor } from './index';\n\n/**\n * Returns a promise which resolves with the edited post content (HTML string).\n *\n * @param this\n *\n * @return Promise resolving with post content markup.\n */\nexport async function getEditedPostContent( this: Editor ) {\n\tawait this.page.waitForFunction( () => window?.wp?.data );\n\n\treturn await this.page.evaluate( () =>\n\t\twindow.wp.data.select( 'core/editor' ).getEditedPostContent()\n\t);\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAYA,eAAsB,uBAAqC;AAC1D,QAAM,KAAK,KAAK,gBAAiB,MAAM,QAAQ,IAAI,IAAK;AAExD,SAAO,MAAM,KAAK,KAAK;AAAA,IAAU,MAChC,OAAO,GAAG,KAAK,OAAQ,aAAc,EAAE,qBAAqB;AAAA,EAC7D;AACD;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAYA,eAAsB,uBAAqC;AAC1D,QAAM,KAAK,KAAK,gBAAiB,MAAM,QAAQ,IAAI,IAAK;AAExD,SAAO,MAAM,KAAK,KAAK;AAAA,IAAU,MAChC,OAAO,GAAG,KAAK,OAAQ,aAAc,EAAE,qBAAqB;AAAA,EAC7D;AACD;",
6
6
  "names": []
7
7
  }
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/e2e-test-utils-playwright/src/editor/index.ts
19
21
  var editor_exports = {};
20
22
  __export(editor_exports, {
21
23
  Editor: () => Editor
@@ -39,7 +41,7 @@ var import_set_is_fixed_toolbar = require("./set-is-fixed-toolbar");
39
41
  var import_switch_to_legacy_canvas = require("./switch-to-legacy-canvas");
40
42
  var import_transform_block_to = require("./transform-block-to");
41
43
  var import_switch_editor_tool = require("./switch-editor-tool");
42
- class Editor {
44
+ var Editor = class {
43
45
  browser;
44
46
  page;
45
47
  context;
@@ -87,7 +89,7 @@ class Editor {
87
89
  switchToLegacyCanvas = import_switch_to_legacy_canvas.switchToLegacyCanvas.bind(this);
88
90
  /** @borrows transformBlockTo as this.transformBlockTo */
89
91
  transformBlockTo = import_transform_block_to.transformBlockTo.bind(this);
90
- }
92
+ };
91
93
  // Annotate the CommonJS export names for ESM import in node:
92
94
  0 && (module.exports = {
93
95
  Editor
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/editor/index.ts"],
4
4
  "sourcesContent": ["/**\n * External dependencies\n */\nimport type {\n\tBrowser,\n\tPage,\n\tBrowserContext,\n\tFrameLocator,\n} from '@playwright/test';\n\n/**\n * Internal dependencies\n */\nimport { clickBlockOptionsMenuItem } from './click-block-options-menu-item';\nimport { clickBlockToolbarButton } from './click-block-toolbar-button';\nimport { getBlocks } from './get-blocks';\nimport { getEditedPostContent } from './get-edited-post-content';\nimport { insertBlock } from './insert-block';\nimport { openDocumentSettingsSidebar } from './open-document-settings-sidebar';\nimport { openPreviewPage } from './preview';\nimport { publishPost } from './publish-post';\nimport { saveDraft } from './save-draft';\nimport { selectBlocks } from './select-blocks';\nimport { setContent } from './set-content';\nimport { setPreferences } from './set-preferences';\nimport { showBlockToolbar } from './show-block-toolbar';\nimport { saveSiteEditorEntities } from './site-editor';\nimport { setIsFixedToolbar } from './set-is-fixed-toolbar';\nimport { switchToLegacyCanvas } from './switch-to-legacy-canvas';\nimport { transformBlockTo } from './transform-block-to';\nimport { switchEditorTool } from './switch-editor-tool';\n\ntype EditorConstructorProps = {\n\tpage: Page;\n};\n\nexport class Editor {\n\tbrowser: Browser;\n\tpage: Page;\n\tcontext: BrowserContext;\n\n\tconstructor( { page }: EditorConstructorProps ) {\n\t\tthis.page = page;\n\t\tthis.context = page.context();\n\t\tthis.browser = this.context.browser()!;\n\t}\n\n\tget canvas(): FrameLocator {\n\t\treturn this.page.frameLocator( '[name=\"editor-canvas\"]' );\n\t}\n\n\t/** @borrows clickBlockOptionsMenuItem as this.clickBlockOptionsMenuItem */\n\tclickBlockOptionsMenuItem: typeof clickBlockOptionsMenuItem =\n\t\tclickBlockOptionsMenuItem.bind( this );\n\t/** @borrows clickBlockToolbarButton as this.clickBlockToolbarButton */\n\tclickBlockToolbarButton: typeof clickBlockToolbarButton =\n\t\tclickBlockToolbarButton.bind( this );\n\t/** @borrows getBlocks as this.getBlocks */\n\tgetBlocks: typeof getBlocks = getBlocks.bind( this );\n\t/** @borrows getEditedPostContent as this.getEditedPostContent */\n\tgetEditedPostContent: typeof getEditedPostContent =\n\t\tgetEditedPostContent.bind( this );\n\t/** @borrows insertBlock as this.insertBlock */\n\tinsertBlock: typeof insertBlock = insertBlock.bind( this );\n\t/** @borrows openDocumentSettingsSidebar as this.openDocumentSettingsSidebar */\n\topenDocumentSettingsSidebar: typeof openDocumentSettingsSidebar =\n\t\topenDocumentSettingsSidebar.bind( this );\n\t/** @borrows openPreviewPage as this.openPreviewPage */\n\topenPreviewPage: typeof openPreviewPage = openPreviewPage.bind( this );\n\t/** @borrows publishPost as this.publishPost */\n\tpublishPost: typeof publishPost = publishPost.bind( this );\n\t/** @borrows saveDraft as this.saveDraft */\n\tsaveDraft: typeof saveDraft = saveDraft.bind( this );\n\t/** @borrows saveSiteEditorEntities as this.saveSiteEditorEntities */\n\tsaveSiteEditorEntities: typeof saveSiteEditorEntities =\n\t\tsaveSiteEditorEntities.bind( this );\n\t/** @borrows selectBlocks as this.selectBlocks */\n\tselectBlocks: typeof selectBlocks = selectBlocks.bind( this );\n\t/** @borrows setContent as this.setContent */\n\tsetContent: typeof setContent = setContent.bind( this );\n\t/** @borrows setPreferences as this.setPreferences */\n\tsetPreferences: typeof setPreferences = setPreferences.bind( this );\n\t/** @borrows showBlockToolbar as this.showBlockToolbar */\n\tshowBlockToolbar: typeof showBlockToolbar = showBlockToolbar.bind( this );\n\t/** @borrows setIsFixedToolbar as this.setIsFixedToolbar */\n\tsetIsFixedToolbar: typeof setIsFixedToolbar =\n\t\tsetIsFixedToolbar.bind( this );\n\t/** @borrows switchEditorTool as this.switchEditorTool */\n\tswitchEditorTool: typeof switchEditorTool = switchEditorTool.bind( this );\n\t/** @borrows switchToLegacyCanvas as this.switchToLegacyCanvas */\n\tswitchToLegacyCanvas: typeof switchToLegacyCanvas =\n\t\tswitchToLegacyCanvas.bind( this );\n\t/** @borrows transformBlockTo as this.transformBlockTo */\n\ttransformBlockTo: typeof transformBlockTo = transformBlockTo.bind( this );\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAaA,2CAA0C;AAC1C,wCAAwC;AACxC,wBAA0B;AAC1B,qCAAqC;AACrC,0BAA4B;AAC5B,4CAA4C;AAC5C,qBAAgC;AAChC,0BAA4B;AAC5B,wBAA0B;AAC1B,2BAA6B;AAC7B,yBAA2B;AAC3B,6BAA+B;AAC/B,gCAAiC;AACjC,yBAAuC;AACvC,kCAAkC;AAClC,qCAAqC;AACrC,gCAAiC;AACjC,gCAAiC;AAM1B,MAAM,OAAO;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EAEA,YAAa,EAAE,KAAK,GAA4B;AAC/C,SAAK,OAAO;AACZ,SAAK,UAAU,KAAK,QAAQ;AAC5B,SAAK,UAAU,KAAK,QAAQ,QAAQ;AAAA,EACrC;AAAA,EAEA,IAAI,SAAuB;AAC1B,WAAO,KAAK,KAAK,aAAc,wBAAyB;AAAA,EACzD;AAAA;AAAA,EAGA,4BACC,+DAA0B,KAAM,IAAK;AAAA;AAAA,EAEtC,0BACC,0DAAwB,KAAM,IAAK;AAAA;AAAA,EAEpC,YAA8B,4BAAU,KAAM,IAAK;AAAA;AAAA,EAEnD,uBACC,oDAAqB,KAAM,IAAK;AAAA;AAAA,EAEjC,cAAkC,gCAAY,KAAM,IAAK;AAAA;AAAA,EAEzD,8BACC,kEAA4B,KAAM,IAAK;AAAA;AAAA,EAExC,kBAA0C,+BAAgB,KAAM,IAAK;AAAA;AAAA,EAErE,cAAkC,gCAAY,KAAM,IAAK;AAAA;AAA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C,oDAAqB,KAAM,IAAK;AAAA;AAAA,EAEjC,cAAkC,gCAAY,KAAM,IAAK;AAAA;AAAA,EAEzD,8BACC,kEAA4B,KAAM,IAAK;AAAA;AAAA,EAExC,kBAA0C,+BAAgB,KAAM,IAAK;AAAA;AAAA,EAErE,cAAkC,gCAAY,KAAM,IAAK;AAAA;AAAA,EAEzD,YAA8B,4BAAU,KAAM,IAAK;AAAA;AAAA,EAEnD,yBACC,0CAAuB,KAAM,IAAK;AAAA;AAAA,EAEnC,eAAoC,kCAAa,KAAM,IAAK;AAAA;AAAA,EAE5D,aAAgC,8BAAW,KAAM,IAAK;AAAA;AAAA,EAEtD,iBAAwC,sCAAe,KAAM,IAAK;AAAA;AAAA,EAElE,mBAA4C,2CAAiB,KAAM,IAAK;AAAA;AAAA,EAExE,oBACC,8CAAkB,KAAM,IAAK;AAAA;AAAA,EAE9B,mBAA4C,2CAAiB,KAAM,IAAK;AAAA;AAAA,EAExE,uBACC,oDAAqB,KAAM,IAAK;AAAA;AAAA,EAEjC,mBAA4C,2CAAiB,KAAM,IAAK;AACzE;",
6
6
  "names": []
7
7
  }
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/e2e-test-utils-playwright/src/editor/insert-block.ts
19
21
  var insert_block_exports = {};
20
22
  __export(insert_block_exports, {
21
23
  insertBlock: () => insertBlock
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/editor/insert-block.ts"],
4
4
  "sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Editor } from './index';\n\ninterface BlockRepresentation {\n\tname: string;\n\tattributes?: Object;\n\tinnerBlocks?: BlockRepresentation[];\n}\n\n/**\n * Insert a block.\n *\n * @param this\n * @param blockRepresentation Inserted block representation.\n * @param options\n * @param options.clientId Client ID of the parent block to insert into.\n */\nasync function insertBlock(\n\tthis: Editor,\n\tblockRepresentation: BlockRepresentation,\n\t{ clientId }: { clientId?: string } = {}\n) {\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( [ _blockRepresentation, _clientId ] ) => {\n\t\t\tfunction recursiveCreateBlock( {\n\t\t\t\tname,\n\t\t\t\tattributes = {},\n\t\t\t\tinnerBlocks = [],\n\t\t\t}: BlockRepresentation ): Object {\n\t\t\t\treturn window.wp.blocks.createBlock(\n\t\t\t\t\tname,\n\t\t\t\t\tattributes,\n\t\t\t\t\tinnerBlocks.map( ( innerBlock ) =>\n\t\t\t\t\t\trecursiveCreateBlock( innerBlock )\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst block = recursiveCreateBlock( _blockRepresentation );\n\n\t\t\twindow.wp.data\n\t\t\t\t.dispatch( 'core/block-editor' )\n\t\t\t\t.insertBlock( block, undefined, _clientId );\n\t\t},\n\t\t[ blockRepresentation, clientId ] as const\n\t);\n}\n\nexport type { BlockRepresentation };\nexport { insertBlock };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBA,eAAe,YAEd,qBACA,EAAE,SAAS,IAA2B,CAAC,GACtC;AACD,QAAM,KAAK,KAAK;AAAA,IACf,MAAM,QAAQ,IAAI,UAAU,QAAQ,IAAI;AAAA,EACzC;AAEA,QAAM,KAAK,KAAK;AAAA,IACf,CAAE,CAAE,sBAAsB,SAAU,MAAO;AAC1C,eAAS,qBAAsB;AAAA,QAC9B;AAAA,QACA,aAAa,CAAC;AAAA,QACd,cAAc,CAAC;AAAA,MAChB,GAAiC;AAChC,eAAO,OAAO,GAAG,OAAO;AAAA,UACvB;AAAA,UACA;AAAA,UACA,YAAY;AAAA,YAAK,CAAE,eAClB,qBAAsB,UAAW;AAAA,UAClC;AAAA,QACD;AAAA,MACD;AACA,YAAM,QAAQ,qBAAsB,oBAAqB;AAEzD,aAAO,GAAG,KACR,SAAU,mBAAoB,EAC9B,YAAa,OAAO,QAAW,SAAU;AAAA,IAC5C;AAAA,IACA,CAAE,qBAAqB,QAAS;AAAA,EACjC;AACD;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBA,eAAe,YAEd,qBACA,EAAE,SAAS,IAA2B,CAAC,GACtC;AACD,QAAM,KAAK,KAAK;AAAA,IACf,MAAM,QAAQ,IAAI,UAAU,QAAQ,IAAI;AAAA,EACzC;AAEA,QAAM,KAAK,KAAK;AAAA,IACf,CAAE,CAAE,sBAAsB,SAAU,MAAO;AAC1C,eAAS,qBAAsB;AAAA,QAC9B;AAAA,QACA,aAAa,CAAC;AAAA,QACd,cAAc,CAAC;AAAA,MAChB,GAAiC;AAChC,eAAO,OAAO,GAAG,OAAO;AAAA,UACvB;AAAA,UACA;AAAA,UACA,YAAY;AAAA,YAAK,CAAE,eAClB,qBAAsB,UAAW;AAAA,UAClC;AAAA,QACD;AAAA,MACD;AACA,YAAM,QAAQ,qBAAsB,oBAAqB;AAEzD,aAAO,GAAG,KACR,SAAU,mBAAoB,EAC9B,YAAa,OAAO,QAAW,SAAU;AAAA,IAC5C;AAAA,IACA,CAAE,qBAAqB,QAAS;AAAA,EACjC;AACD;",
6
6
  "names": []
7
7
  }
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/e2e-test-utils-playwright/src/editor/open-document-settings-sidebar.ts
19
21
  var open_document_settings_sidebar_exports = {};
20
22
  __export(open_document_settings_sidebar_exports, {
21
23
  openDocumentSettingsSidebar: () => openDocumentSettingsSidebar
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/editor/open-document-settings-sidebar.ts"],
4
4
  "sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Editor } from './index';\n\n/**\n * Clicks on the button in the header which opens Document Settings sidebar when\n * it is closed.\n *\n * @param this\n */\nexport async function openDocumentSettingsSidebar( this: Editor ) {\n\tconst toggleButton = this.page\n\t\t.getByRole( 'region', { name: 'Editor top bar' } )\n\t\t.getByRole( 'button', {\n\t\t\tname: 'Settings',\n\t\t\texact: true,\n\t\t\tdisabled: false,\n\t\t} );\n\n\tconst isClosed =\n\t\t( await toggleButton.getAttribute( 'aria-expanded' ) ) === 'false';\n\n\tif ( isClosed ) {\n\t\tawait toggleButton.click();\n\t\tawait this.page\n\t\t\t.getByRole( 'region', { name: 'Editor settings' } )\n\t\t\t.getByRole( 'button', { name: 'Close Settings' } )\n\t\t\t.waitFor();\n\t}\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,eAAsB,8BAA4C;AACjE,QAAM,eAAe,KAAK,KACxB,UAAW,UAAU,EAAE,MAAM,iBAAiB,CAAE,EAChD,UAAW,UAAU;AAAA,IACrB,MAAM;AAAA,IACN,OAAO;AAAA,IACP,UAAU;AAAA,EACX,CAAE;AAEH,QAAM,WACH,MAAM,aAAa,aAAc,eAAgB,MAAQ;AAE5D,MAAK,UAAW;AACf,UAAM,aAAa,MAAM;AACzB,UAAM,KAAK,KACT,UAAW,UAAU,EAAE,MAAM,kBAAkB,CAAE,EACjD,UAAW,UAAU,EAAE,MAAM,iBAAiB,CAAE,EAChD,QAAQ;AAAA,EACX;AACD;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,eAAsB,8BAA4C;AACjE,QAAM,eAAe,KAAK,KACxB,UAAW,UAAU,EAAE,MAAM,iBAAiB,CAAE,EAChD,UAAW,UAAU;AAAA,IACrB,MAAM;AAAA,IACN,OAAO;AAAA,IACP,UAAU;AAAA,EACX,CAAE;AAEH,QAAM,WACH,MAAM,aAAa,aAAc,eAAgB,MAAQ;AAE5D,MAAK,UAAW;AACf,UAAM,aAAa,MAAM;AACzB,UAAM,KAAK,KACT,UAAW,UAAU,EAAE,MAAM,kBAAkB,CAAE,EACjD,UAAW,UAAU,EAAE,MAAM,iBAAiB,CAAE,EAChD,QAAQ;AAAA,EACX;AACD;",
6
6
  "names": []
7
7
  }
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/e2e-test-utils-playwright/src/editor/preview.ts
19
21
  var preview_exports = {};
20
22
  __export(preview_exports, {
21
23
  openPreviewPage: () => openPreviewPage
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/editor/preview.ts"],
4
4
  "sourcesContent": ["/**\n * External dependencies\n */\nimport type { Page } from '@playwright/test';\n\n/**\n * Internal dependencies\n */\nimport type { Editor } from './index';\n\n/**\n * Opens the preview page of an edited post.\n *\n * @param this\n *\n * @return preview page.\n */\nexport async function openPreviewPage( this: Editor ): Promise< Page > {\n\tconst editorTopBar = this.page.locator(\n\t\t'role=region[name=\"Editor top bar\"i]'\n\t);\n\tconst previewButton = editorTopBar.locator( 'role=button[name=\"View\"i]' );\n\n\tawait previewButton.click();\n\n\tconst [ previewPage ] = await Promise.all( [\n\t\tthis.context.waitForEvent( 'page' ),\n\t\tthis.page.click( 'role=menuitem[name=\"Preview in new tab\"i]' ),\n\t] );\n\n\treturn previewPage;\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBA,eAAsB,kBAAiD;AACtE,QAAM,eAAe,KAAK,KAAK;AAAA,IAC9B;AAAA,EACD;AACA,QAAM,gBAAgB,aAAa,QAAS,2BAA4B;AAExE,QAAM,cAAc,MAAM;AAE1B,QAAM,CAAE,WAAY,IAAI,MAAM,QAAQ,IAAK;AAAA,IAC1C,KAAK,QAAQ,aAAc,MAAO;AAAA,IAClC,KAAK,KAAK,MAAO,2CAA4C;AAAA,EAC9D,CAAE;AAEF,SAAO;AACR;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBA,eAAsB,kBAAiD;AACtE,QAAM,eAAe,KAAK,KAAK;AAAA,IAC9B;AAAA,EACD;AACA,QAAM,gBAAgB,aAAa,QAAS,2BAA4B;AAExE,QAAM,cAAc,MAAM;AAE1B,QAAM,CAAE,WAAY,IAAI,MAAM,QAAQ,IAAK;AAAA,IAC1C,KAAK,QAAQ,aAAc,MAAO;AAAA,IAClC,KAAK,KAAK,MAAO,2CAA4C;AAAA,EAC9D,CAAE;AAEF,SAAO;AACR;",
6
6
  "names": []
7
7
  }
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/e2e-test-utils-playwright/src/editor/publish-post.ts
19
21
  var publish_post_exports = {};
20
22
  __export(publish_post_exports, {
21
23
  publishPost: () => publishPost
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/editor/publish-post.ts"],
4
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,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I,CAAE,EAAE,aAAa,IAAK,MAAO;AAEnE,SAAO,OAAO,WAAW,WAAW,SAAU,QAAQ,EAAG,IAAI;AAC9D;",
6
6
  "names": []
7
7
  }
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/e2e-test-utils-playwright/src/editor/save-draft.ts
19
21
  var save_draft_exports = {};
20
22
  __export(save_draft_exports, {
21
23
  saveDraft: () => saveDraft
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/editor/save-draft.ts"],
4
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;",
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
6
  "names": []
7
7
  }
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/e2e-test-utils-playwright/src/editor/select-blocks.ts
19
21
  var select_blocks_exports = {};
20
22
  __export(select_blocks_exports, {
21
23
  selectBlocks: () => selectBlocks
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/editor/select-blocks.ts"],
4
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\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AEzB,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
6
  "names": []
7
7
  }
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/e2e-test-utils-playwright/src/editor/set-content.ts
19
21
  var set_content_exports = {};
20
22
  __export(set_content_exports, {
21
23
  setContent: () => setContent
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/editor/set-content.ts"],
4
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;",
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
6
  "names": []
7
7
  }
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/e2e-test-utils-playwright/src/editor/set-is-fixed-toolbar.ts
19
21
  var set_is_fixed_toolbar_exports = {};
20
22
  __export(set_is_fixed_toolbar_exports, {
21
23
  setIsFixedToolbar: () => setIsFixedToolbar
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/editor/set-is-fixed-toolbar.ts"],
4
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;",
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
6
  "names": []
7
7
  }
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/e2e-test-utils-playwright/src/editor/set-preferences.ts
19
21
  var set_preferences_exports = {};
20
22
  __export(set_preferences_exports, {
21
23
  setPreferences: () => setPreferences
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/editor/set-preferences.ts"],
4
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;",
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
6
  "names": []
7
7
  }
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/e2e-test-utils-playwright/src/editor/show-block-toolbar.ts
19
21
  var show_block_toolbar_exports = {};
20
22
  __export(show_block_toolbar_exports, {
21
23
  showBlockToolbar: () => showBlockToolbar
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/editor/show-block-toolbar.ts"],
4
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;",
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
6
  "names": []
7
7
  }
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/e2e-test-utils-playwright/src/editor/site-editor.ts
19
21
  var site_editor_exports = {};
20
22
  __export(site_editor_exports, {
21
23
  saveSiteEditorEntities: () => saveSiteEditorEntities
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/editor/site-editor.ts"],
4
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,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nC,MAAM,EACN,QAAQ;AACX;",
6
6
  "names": []
7
7
  }
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/e2e-test-utils-playwright/src/editor/switch-editor-tool.ts
19
21
  var switch_editor_tool_exports = {};
20
22
  __export(switch_editor_tool_exports, {
21
23
  switchEditorTool: () => switchEditorTool