@wordpress/e2e-test-utils-playwright 1.33.1-next.36001005c.0 → 1.33.2

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.
@@ -22,7 +22,7 @@ __export(visit_site_editor_exports, {
22
22
  });
23
23
  module.exports = __toCommonJS(visit_site_editor_exports);
24
24
  async function visitSiteEditor(options = {}) {
25
- const { postId, postType, path, canvas, activeView } = options;
25
+ const { postId, postType, path, canvas } = options;
26
26
  const query = new URLSearchParams();
27
27
  if (postId) {
28
28
  query.set("postId", String(postId));
@@ -36,9 +36,6 @@ async function visitSiteEditor(options = {}) {
36
36
  if (canvas) {
37
37
  query.set("canvas", canvas);
38
38
  }
39
- if (activeView) {
40
- query.set("activeView", activeView);
41
- }
42
39
  await this.visitAdminPage("site-editor.php", query.toString());
43
40
  if (!options.showWelcomeGuide) {
44
41
  await this.editor.setPreferences("core/edit-site", {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/admin/visit-site-editor.ts"],
4
- "sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Admin } from './';\n\ninterface SiteEditorOptions {\n\tpostId?: string | number;\n\tpostType?: string;\n\tpath?: string;\n\tcanvas?: string;\n\tactiveView?: string;\n\tshowWelcomeGuide?: boolean;\n}\n\n/**\n * Visits the Site Editor main page.\n *\n * @param this\n * @param options Options to visit the site editor.\n */\nexport async function visitSiteEditor(\n\tthis: Admin,\n\toptions: SiteEditorOptions = {}\n) {\n\tconst { postId, postType, path, canvas, activeView } = options;\n\tconst query = new URLSearchParams();\n\n\tif ( postId ) {\n\t\tquery.set( 'postId', String( postId ) );\n\t}\n\tif ( postType ) {\n\t\tquery.set( 'postType', postType );\n\t}\n\tif ( path ) {\n\t\tquery.set( 'path', path );\n\t}\n\tif ( canvas ) {\n\t\tquery.set( 'canvas', canvas );\n\t}\n\tif ( activeView ) {\n\t\tquery.set( 'activeView', activeView );\n\t}\n\n\tawait this.visitAdminPage( 'site-editor.php', query.toString() );\n\n\tif ( ! options.showWelcomeGuide ) {\n\t\tawait this.editor.setPreferences( 'core/edit-site', {\n\t\t\twelcomeGuide: false,\n\t\t\twelcomeGuideStyles: false,\n\t\t\twelcomeGuidePage: false,\n\t\t\twelcomeGuideTemplate: false,\n\t\t} );\n\t}\n\n\t/**\n\t * @todo This is a workaround for the fact that the editor canvas is seen as\n\t * ready and visible before the loading spinner is hidden. Ideally, the\n\t * content underneath the loading overlay should be marked inert until the\n\t * loading is done.\n\t */\n\tif ( ! query.size || postId || canvas === 'edit' ) {\n\t\tconst canvasLoader = this.page.locator(\n\t\t\t// Spinner was used instead of the progress bar in an earlier\n\t\t\t// version of the site editor.\n\t\t\t'.edit-site-canvas-loader, .edit-site-canvas-spinner'\n\t\t);\n\n\t\ttry {\n\t\t\t// Wait for the canvas loader to appear first, so that the locator that\n\t\t\t// waits for the hidden state doesn't resolve prematurely.\n\t\t\tawait canvasLoader.waitFor( { state: 'visible', timeout: 60_000 } );\n\t\t\tawait canvasLoader.waitFor( {\n\t\t\t\tstate: 'hidden',\n\t\t\t\t// Bigger timeout is needed for larger entities, like the Large Post\n\t\t\t\t// HTML fixture that we load for performance tests, which often\n\t\t\t\t// doesn't make it under the default timeout value.\n\t\t\t\ttimeout: 60_000,\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\t// If the canvas loader is already disappeared, skip the waiting.\n\t\t\tawait this.page\n\t\t\t\t.getByRole( 'region', { name: 'Editor content' } )\n\t\t\t\t.waitFor();\n\t\t}\n\t}\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBA,eAAsB,gBAErB,UAA6B,CAAC,GAC7B;AACD,QAAM,EAAE,QAAQ,UAAU,MAAM,QAAQ,WAAW,IAAI;AACvD,QAAM,QAAQ,IAAI,gBAAgB;AAElC,MAAK,QAAS;AACb,UAAM,IAAK,UAAU,OAAQ,MAAO,CAAE;AAAA,EACvC;AACA,MAAK,UAAW;AACf,UAAM,IAAK,YAAY,QAAS;AAAA,EACjC;AACA,MAAK,MAAO;AACX,UAAM,IAAK,QAAQ,IAAK;AAAA,EACzB;AACA,MAAK,QAAS;AACb,UAAM,IAAK,UAAU,MAAO;AAAA,EAC7B;AACA,MAAK,YAAa;AACjB,UAAM,IAAK,cAAc,UAAW;AAAA,EACrC;AAEA,QAAM,KAAK,eAAgB,mBAAmB,MAAM,SAAS,CAAE;AAE/D,MAAK,CAAE,QAAQ,kBAAmB;AACjC,UAAM,KAAK,OAAO,eAAgB,kBAAkB;AAAA,MACnD,cAAc;AAAA,MACd,oBAAoB;AAAA,MACpB,kBAAkB;AAAA,MAClB,sBAAsB;AAAA,IACvB,CAAE;AAAA,EACH;AAQA,MAAK,CAAE,MAAM,QAAQ,UAAU,WAAW,QAAS;AAClD,UAAM,eAAe,KAAK,KAAK;AAAA;AAAA;AAAA,MAG9B;AAAA,IACD;AAEA,QAAI;AAGH,YAAM,aAAa,QAAS,EAAE,OAAO,WAAW,SAAS,IAAO,CAAE;AAClE,YAAM,aAAa,QAAS;AAAA,QAC3B,OAAO;AAAA;AAAA;AAAA;AAAA,QAIP,SAAS;AAAA,MACV,CAAE;AAAA,IACH,SAAU,OAAQ;AAEjB,YAAM,KAAK,KACT,UAAW,UAAU,EAAE,MAAM,iBAAiB,CAAE,EAChD,QAAQ;AAAA,IACX;AAAA,EACD;AACD;",
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\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 } = 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\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;AAmBA,eAAsB,gBAErB,UAA6B,CAAC,GAC7B;AACD,QAAM,EAAE,QAAQ,UAAU,MAAM,OAAO,IAAI;AAC3C,QAAM,QAAQ,IAAI,gBAAgB;AAElC,MAAK,QAAS;AACb,UAAM,IAAK,UAAU,OAAQ,MAAO,CAAE;AAAA,EACvC;AACA,MAAK,UAAW;AACf,UAAM,IAAK,YAAY,QAAS;AAAA,EACjC;AACA,MAAK,MAAO;AACX,UAAM,IAAK,QAAQ,IAAK;AAAA,EACzB;AACA,MAAK,QAAS;AACb,UAAM,IAAK,UAAU,MAAO;AAAA,EAC7B;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
  }
@@ -7,7 +7,6 @@ interface SiteEditorOptions {
7
7
  postType?: string;
8
8
  path?: string;
9
9
  canvas?: string;
10
- activeView?: string;
11
10
  showWelcomeGuide?: boolean;
12
11
  }
13
12
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"visit-site-editor.d.ts","sourceRoot":"","sources":["../../src/admin/visit-site-editor.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC;AAEhC,UAAU,iBAAiB;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CACpC,IAAI,EAAE,KAAK,EACX,OAAO,GAAE,iBAAsB,iBA+D/B"}
1
+ {"version":3,"file":"visit-site-editor.d.ts","sourceRoot":"","sources":["../../src/admin/visit-site-editor.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC;AAEhC,UAAU,iBAAiB;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CACpC,IAAI,EAAE,KAAK,EACX,OAAO,GAAE,iBAAsB,iBA4D/B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/e2e-test-utils-playwright",
3
- "version": "1.33.1-next.36001005c.0",
3
+ "version": "1.33.2",
4
4
  "description": "End-To-End (E2E) test utils for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -48,5 +48,5 @@
48
48
  "publishConfig": {
49
49
  "access": "public"
50
50
  },
51
- "gitHead": "b73a8a22e779c59efb8f911e32b681652f237d60"
51
+ "gitHead": "2e2a11a11f0c5c9cb2bba2dd40b8046d2a10dc9d"
52
52
  }