Skip to content

Commit 8571399

Browse files
authored
Merge pull request #5825 from Automattic/staging
Production release: v20240827.0
2 parents 7a68dc4 + 994b89f commit 8571399

File tree

15 files changed

+6748
-3258
lines changed

15 files changed

+6748
-3258
lines changed

.github/workflows/codeql-analysis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ jobs:
3232
uses: actions/[email protected]
3333

3434
- name: Initialize CodeQL
35-
uses: github/codeql-action/init@v3.25.15
35+
uses: github/codeql-action/init@v3.26.3
3636
with:
3737
languages: ${{ matrix.language }}
3838
config-file: ./.github/codeql-config.yml
3939

4040
- name: Perform CodeQL Analysis
41-
uses: github/codeql-action/analyze@v3.25.15
41+
uses: github/codeql-action/analyze@v3.26.3

__tests__/e2e/lib/pages/published-page-page.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Page } from 'playwright';
1+
import type { Page } from '@playwright/test';
22

33
const selectors = {
44
entryTitle: '.wp-block-post-title',

__tests__/e2e/lib/pages/published-post-page.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Page } from 'playwright';
1+
import type { Page } from '@playwright/test';
22

33
const selectors = {
44
entryTitle: '.wp-block-post-title',

__tests__/e2e/lib/playwright-helpers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* External dependencies
33
*/
4-
import { Locator, Page } from 'playwright';
4+
import type { Locator, Page } from '@playwright/test';
55

66
/**
77
* Returns the list of classes for the given element as a string list.

__tests__/e2e/package-lock.json

+635-301
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

__tests__/e2e/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"eslint": "^8.51.0",
2020
"eslint-plugin-deprecation": "^3.0.0",
2121
"eslint-plugin-playwright": "^1.0.1",
22-
"playwright": "^1.39.0",
2322
"typescript": "^5.2.2"
2423
}
2524
}

__tests__/e2e/specs/generic.spec.ts

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import { type Response, expect, test } from '@playwright/test';
2+
3+
test.describe( 'Generic Checks', () => {
4+
test( 'Page contains closing html tag and no wp_die() message', async ( { page, baseURL } ) => {
5+
expect( baseURL ).toBeDefined();
6+
const response = await page.goto( baseURL! ) as Response;
7+
expect.soft( response.status() ).toBeLessThan( 500 );
8+
await expect( page.locator( '.wp-die-message' ) ).toHaveCount( 0 );
9+
const html = await page.content();
10+
expect( html ).toContain( '</html>' );
11+
} );
12+
13+
test( 'REST API smoke test', async ( { request } ) => {
14+
const response = await request.get( './wp-json/' );
15+
expect( response.status() ).toBe( 200 );
16+
const data: unknown = await response.json();
17+
expect( typeof data ).toBe( 'object' );
18+
expect.soft( data ).toHaveProperty( 'name' );
19+
expect.soft( data ).toHaveProperty( 'description' );
20+
expect.soft( data ).toHaveProperty( 'url' );
21+
expect.soft( data ).toHaveProperty( 'routes' );
22+
} );
23+
24+
test( 'XML RPC smoke test', async ( { request } ) => {
25+
const xmlPayload = '<?xml version="1.0"?><methodCall><methodName>demo.sayHello</methodName><params/></methodCall>';
26+
27+
const response = await request.post( './xmlrpc.php', {
28+
headers: {
29+
'Content-Type': 'text/xml',
30+
},
31+
data: xmlPayload,
32+
} );
33+
34+
expect( response.status() ).toBe( 200 );
35+
const responseText = await response.text();
36+
expect( responseText ).toContain( '<methodResponse>' );
37+
expect( responseText ).not.toContain( '<fault>' );
38+
expect( responseText ).toContain( '<string>Hello!</string>' );
39+
} );
40+
} );

a8c-files.php

+3
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,9 @@ public function image_resize( $ignore, $id, $size ) {
263263
$_max_w = 300;
264264
$_max_h = 300;
265265
}
266+
} elseif ( 'medium_large' == $size ) {
267+
$_max_w = get_option( 'medium_large_size_w' );
268+
$_max_h = get_option( 'medium_large_size_h' );
266269
} elseif ( 'large' == $size ) {
267270
$_max_w = get_option( 'large_size_w' );
268271
$_max_h = get_option( 'large_size_h' );

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"yoast/phpunit-polyfills": "2.0.1",
99
"johnpbloch/wordpress-core": "6.6.1",
1010
"wp-phpunit/wp-phpunit": "6.6.1",
11-
"wp-cli/wp-cli": "2.10.0"
11+
"wp-cli/wp-cli": "2.11.0"
1212
},
1313
"config": {
1414
"allow-plugins": {

composer.lock

+25-25
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)