Skip to content

Commit

Permalink
Merge pull request #5811 from Automattic/develop
Browse files Browse the repository at this point in the history
Staging release: v20240820.1
  • Loading branch information
luiztiago authored Aug 20, 2024
2 parents a90ce81 + 9396c22 commit 994b89f
Show file tree
Hide file tree
Showing 18 changed files with 6,758 additions and 3,264 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
uses: actions/checkout@v4.1.7

- name: Initialize CodeQL
uses: github/codeql-action/init@v3.25.15
uses: github/codeql-action/init@v3.26.3
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql-config.yml

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3.25.15
uses: github/codeql-action/analyze@v3.26.3
2 changes: 1 addition & 1 deletion __tests__/e2e/lib/pages/published-page-page.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Page } from 'playwright';
import type { Page } from '@playwright/test';

const selectors = {
entryTitle: '.wp-block-post-title',
Expand Down
2 changes: 1 addition & 1 deletion __tests__/e2e/lib/pages/published-post-page.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Page } from 'playwright';
import type { Page } from '@playwright/test';

const selectors = {
entryTitle: '.wp-block-post-title',
Expand Down
2 changes: 1 addition & 1 deletion __tests__/e2e/lib/playwright-helpers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { Locator, Page } from 'playwright';
import type { Locator, Page } from '@playwright/test';

/**
* Returns the list of classes for the given element as a string list.
Expand Down
936 changes: 635 additions & 301 deletions __tests__/e2e/package-lock.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion __tests__/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"eslint": "^8.51.0",
"eslint-plugin-deprecation": "^3.0.0",
"eslint-plugin-playwright": "^1.0.1",
"playwright": "^1.39.0",
"typescript": "^5.2.2"
}
}
40 changes: 40 additions & 0 deletions __tests__/e2e/specs/generic.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { type Response, expect, test } from '@playwright/test';

test.describe( 'Generic Checks', () => {
test( 'Page contains closing html tag and no wp_die() message', async ( { page, baseURL } ) => {
expect( baseURL ).toBeDefined();
const response = await page.goto( baseURL! ) as Response;
expect.soft( response.status() ).toBeLessThan( 500 );
await expect( page.locator( '.wp-die-message' ) ).toHaveCount( 0 );
const html = await page.content();
expect( html ).toContain( '</html>' );
} );

test( 'REST API smoke test', async ( { request } ) => {
const response = await request.get( './wp-json/' );
expect( response.status() ).toBe( 200 );
const data: unknown = await response.json();
expect( typeof data ).toBe( 'object' );
expect.soft( data ).toHaveProperty( 'name' );
expect.soft( data ).toHaveProperty( 'description' );
expect.soft( data ).toHaveProperty( 'url' );
expect.soft( data ).toHaveProperty( 'routes' );
} );

test( 'XML RPC smoke test', async ( { request } ) => {
const xmlPayload = '<?xml version="1.0"?><methodCall><methodName>demo.sayHello</methodName><params/></methodCall>';

const response = await request.post( './xmlrpc.php', {
headers: {
'Content-Type': 'text/xml',
},
data: xmlPayload,
} );

expect( response.status() ).toBe( 200 );
const responseText = await response.text();
expect( responseText ).toContain( '<methodResponse>' );
expect( responseText ).not.toContain( '<fault>' );
expect( responseText ).toContain( '<string>Hello!</string>' );
} );
} );
3 changes: 3 additions & 0 deletions a8c-files.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@ public function image_resize( $ignore, $id, $size ) {
$_max_w = 300;
$_max_h = 300;
}
} elseif ( 'medium_large' == $size ) {
$_max_w = get_option( 'medium_large_size_w' );
$_max_h = get_option( 'medium_large_size_h' );
} elseif ( 'large' == $size ) {
$_max_w = get_option( 'large_size_w' );
$_max_h = get_option( 'large_size_h' );
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"yoast/phpunit-polyfills": "2.0.1",
"johnpbloch/wordpress-core": "6.6.1",
"wp-phpunit/wp-phpunit": "6.6.1",
"wp-cli/wp-cli": "2.10.0"
"wp-cli/wp-cli": "2.11.0"
},
"config": {
"allow-plugins": {
Expand Down
50 changes: 25 additions & 25 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion jetpack
Submodule jetpack updated 596 files
9 changes: 6 additions & 3 deletions jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin URI: https://jetpack.com
* Description: Security, performance, and marketing tools made by WordPress experts. Jetpack keeps your site protected so you can focus on more important things.
* Author: Automattic
* Version: 13.6
* Version: 13.7
* Author URI: https://jetpack.com
* License: GPL2+
* Text Domain: jetpack
Expand Down Expand Up @@ -37,9 +37,12 @@ function vip_default_jetpack_version() {
} elseif ( version_compare( $wp_version, '6.4', '<' ) ) {
// WordPress 6.3.x
return '13.1';
} else {
// WordPress 6.4 and newer.
} elseif ( version_compare( $wp_version, '6.5', '<' ) ) {
// WordPress 6.4.x
return '13.6';
} else {
// WordPress 6.5 and newer.
return '13.7';
}
}

Expand Down
Loading

0 comments on commit 994b89f

Please sign in to comment.