@wordpress/e2e-tests 2.5.9 → 2.5.10

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/e2e-tests",
3
- "version": "2.5.9",
3
+ "version": "2.5.10",
4
4
  "description": "End-To-End (E2E) tests for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -23,7 +23,7 @@
23
23
  "node": ">=12"
24
24
  },
25
25
  "dependencies": {
26
- "@wordpress/e2e-test-utils": "^5.4.8",
26
+ "@wordpress/e2e-test-utils": "^5.4.9",
27
27
  "@wordpress/jest-console": "^4.1.1",
28
28
  "@wordpress/jest-puppeteer-axe": "^3.1.1",
29
29
  "@wordpress/scripts": "^19.2.2",
@@ -43,5 +43,5 @@
43
43
  "publishConfig": {
44
44
  "access": "public"
45
45
  },
46
- "gitHead": "49c7be0ff5dc493fc9e5a861e18273dd1f3fce8c"
46
+ "gitHead": "34b76b2f9397215e5afb8443f5b3073c83913102"
47
47
  }
@@ -74,7 +74,7 @@ describe( 'Image', () => {
74
74
  expect( await getEditedPostContent() ).toMatch( regex );
75
75
  } );
76
76
 
77
- it.skip( 'should replace, reset size, and keep selection', async () => {
77
+ it( 'should replace, reset size, and keep selection', async () => {
78
78
  await insertBlock( 'Image' );
79
79
  const filename1 = await upload( '.wp-block-image input[type="file"]' );
80
80
  await waitForImage( filename1 );
@@ -104,7 +104,7 @@ describe( 'Image', () => {
104
104
  );
105
105
  expect( await getEditedPostContent() ).toMatch( regex3 );
106
106
 
107
- await page.click( '.wp-block-image img' );
107
+ await page.click( '.wp-block-image' );
108
108
  await page.keyboard.press( 'Backspace' );
109
109
 
110
110
  expect( await getEditedPostContent() ).toBe( '' );
@@ -314,9 +314,13 @@ describe( 'Image', () => {
314
314
 
315
315
  // Upload an initial image.
316
316
  const filename = await upload( '.wp-block-image input[type="file"]' );
317
-
317
+ await waitForImage( filename );
318
318
  // Resize the Uploaded Image.
319
319
  await openDocumentSettingsSidebar();
320
+ await page.waitForSelector(
321
+ '[aria-label="Image size presets"] button:first-child',
322
+ { visible: true }
323
+ );
320
324
  await page.click(
321
325
  '[aria-label="Image size presets"] button:first-child'
322
326
  );
@@ -337,15 +341,15 @@ describe( 'Image', () => {
337
341
  await editButton.click();
338
342
 
339
343
  await page.waitForSelector( '.block-editor-url-input__input' );
340
- await page.evaluate(
341
- () =>
342
- ( document.querySelector(
343
- '.block-editor-url-input__input'
344
- ).value = '' )
345
- );
346
344
 
345
+ // Clear the input field. Delay added to account for typing delays.
346
+ const inputField = await page.$( '.block-editor-url-input__input' );
347
+ await inputField.click( { clickCount: 3, delay: 100 } );
348
+ await page.keyboard.press( 'Backspace', { delay: 100 } );
349
+
350
+ // Replace the url. Delay added to account for typing delays.
347
351
  await page.focus( '.block-editor-url-input__input' );
348
- await page.keyboard.type( imageUrl );
352
+ await page.keyboard.type( imageUrl, { delay: 100 } );
349
353
  await page.click( '.block-editor-link-control__search-submit' );
350
354
 
351
355
  const regexAfter = new RegExp(