@wordpress/e2e-test-utils-playwright 0.22.0 → 0.23.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.
|
@@ -5,8 +5,9 @@ exports.saveSiteEditorEntities = void 0;
|
|
|
5
5
|
* Save entities in the site editor. Assumes the editor is in a dirty state.
|
|
6
6
|
*
|
|
7
7
|
* @param this
|
|
8
|
+
* @param options
|
|
8
9
|
*/
|
|
9
|
-
async function saveSiteEditorEntities() {
|
|
10
|
+
async function saveSiteEditorEntities(options = {}) {
|
|
10
11
|
const editorTopBar = this.page.getByRole('region', {
|
|
11
12
|
name: 'Editor top bar',
|
|
12
13
|
});
|
|
@@ -15,10 +16,12 @@ async function saveSiteEditorEntities() {
|
|
|
15
16
|
await editorTopBar
|
|
16
17
|
.getByRole('button', { name: 'Save', exact: true })
|
|
17
18
|
.click();
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
if (!options.isOnlyCurrentEntityDirty) {
|
|
20
|
+
// Second Save button in the entities panel.
|
|
21
|
+
await savePanel
|
|
22
|
+
.getByRole('button', { name: 'Save', exact: true })
|
|
23
|
+
.click();
|
|
24
|
+
}
|
|
22
25
|
await this.page
|
|
23
26
|
.getByRole('button', { name: 'Dismiss this notice' })
|
|
24
27
|
.getByText('Site updated.')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site-editor.js","sourceRoot":"","sources":["../../src/editor/site-editor.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"site-editor.js","sourceRoot":"","sources":["../../src/editor/site-editor.ts"],"names":[],"mappings":";;;AAUA;;;;;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;IACJ,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,CAAE,CAAC;IAE1E,oCAAoC;IACpC,MAAM,YAAY;SAChB,SAAS,CAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAE;SACpD,KAAK,EAAE,CAAC;IAEV,IAAK,CAAE,OAAO,CAAC,wBAAwB,EAAG;QACzC,4CAA4C;QAC5C,MAAM,SAAS;aACb,SAAS,CAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAE;aACpD,KAAK,EAAE,CAAC;KACV;IACD,MAAM,IAAI,CAAC,IAAI;SACb,SAAS,CAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,qBAAqB,EAAE,CAAE;SACtD,SAAS,CAAE,eAAe,CAAE;SAC5B,OAAO,EAAE,CAAC;AACb,CAAC;AAxBD,wDAwBC"}
|
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
* Internal dependencies
|
|
3
3
|
*/
|
|
4
4
|
import type { Editor } from './index';
|
|
5
|
+
interface Options {
|
|
6
|
+
isOnlyCurrentEntityDirty?: boolean;
|
|
7
|
+
}
|
|
5
8
|
/**
|
|
6
9
|
* Save entities in the site editor. Assumes the editor is in a dirty state.
|
|
7
10
|
*
|
|
8
11
|
* @param this
|
|
12
|
+
* @param options
|
|
9
13
|
*/
|
|
10
|
-
export declare function saveSiteEditorEntities(this: Editor): Promise<void>;
|
|
14
|
+
export declare function saveSiteEditorEntities(this: Editor, options?: Options): Promise<void>;
|
|
15
|
+
export {};
|
|
11
16
|
//# sourceMappingURL=site-editor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site-editor.d.ts","sourceRoot":"","sources":["../../src/editor/site-editor.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEtC
|
|
1
|
+
{"version":3,"file":"site-editor.d.ts","sourceRoot":"","sources":["../../src/editor/site-editor.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEtC,UAAU,OAAO;IAEhB,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACnC;AAED;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAC3C,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,OAAY,iBAsBrB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/e2e-test-utils-playwright",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
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",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"main": "./build/index.js",
|
|
31
31
|
"types": "./build-types",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@wordpress/api-fetch": "^6.
|
|
34
|
-
"@wordpress/keycodes": "^3.
|
|
35
|
-
"@wordpress/url": "^3.
|
|
33
|
+
"@wordpress/api-fetch": "^6.52.0",
|
|
34
|
+
"@wordpress/keycodes": "^3.55.0",
|
|
35
|
+
"@wordpress/url": "^3.56.0",
|
|
36
36
|
"change-case": "^4.1.2",
|
|
37
37
|
"form-data": "^4.0.0",
|
|
38
38
|
"get-port": "^5.1.1",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "ac2b13783c28f959770cf029a797a712f59e1958"
|
|
50
50
|
}
|