Skip to content

Commit

Permalink
Merge pull request #135 from woocommerce/24-03/update-snapshots-870-b…
Browse files Browse the repository at this point in the history
…eta2

Update snapshots 8.7.0-beta.2
  • Loading branch information
Luc45 authored Mar 4, 2024
2 parents ca809f8 + acd4d7c commit 31918fe
Show file tree
Hide file tree
Showing 11 changed files with 1,004 additions and 352 deletions.
24 changes: 9 additions & 15 deletions _tests/tests/QITE2ETestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function validate_and_normalize( string $file_path, ?callable $callback =
return $value;
}

if ( stripos( $file_path, 'woo-e2e/delete_products' ) !== false ) {
if ( stripos( $file_path, 'woo-e2e/delete_products' ) !== false || stripos( $file_path, 'woo-api/delete_products' ) !== false ) {
return [
[
'count' => '0',
Expand Down Expand Up @@ -141,20 +141,6 @@ public function validate_and_normalize( string $file_path, ?callable $callback =

$debug_log['message'] = str_replace( 'compatibility-dashboard', 'qit-runner', $debug_log['message'] );

if ( stripos( $file_path, 'woo-api/delete_products' ) !== false ) {
$pos = stripos( $debug_log['message'], 'Stack Trace:' );

if ( $pos !== false ) {
// Remove stack trace from debug log.
$debug_log['message'] = substr( $debug_log['message'], 0, $pos );

// If the resulting entry is empty, skip it.
if ( empty( trim( $debug_log['message'] ) ) ) {
continue;
}
}
}

// Sometimes the test site might fail to contact WP.org, this is beyond our control.
if ( stripos( $debug_log['message'], 'Something may be wrong with WordPress.org' ) !== false ) {
// If it happens only a few times, ignore it.
Expand All @@ -165,6 +151,14 @@ public function validate_and_normalize( string $file_path, ?callable $callback =
}
}

// There seems to be a bug on WP 6.5 RC releases around PHP statcache.
// @see https://wordpress.slack.com/archives/C02RQBWTW/p1709330758080609
if ( stripos( $debug_log['message'], 'No such file or directory in /var/www/html/wp-admin/includes/class-wp-filesystem-direct.php on line 636' ) !== false ) {
echo "Removing '{$debug_log['message']}' from debug_log.message\n";
unset( $value[ $k ] );
continue;
}

/*
* Normalize PHP debug logs captured during test runs.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1382,16 +1382,8 @@
{
"debug_log": [
{
"count": "1",
"message": "PHP Notice: Function WP_Block_Patterns_Registry::register was called incorrectly. Pattern content must be a string. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.) in \\/var\\/www\\/html\\/wp-includes\\/functions.php on line 6078"
},
{
"count": "2",
"message": "PHP Notice: Undefined index: id in \\/var\\/www\\/html\\/wp-includes\\/class-wp-list-util.php on line 170"
},
{
"count": "1",
"message": "PHP Notice: Undefined index: id in \\/var\\/www\\/html\\/wp-includes\\/class-wp-list-util.php on line 170\\n"
"count": "0",
"message": "Debug log is ignored for woo-e2e\\/delete_products tests."
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1382,12 +1382,8 @@
{
"debug_log": [
{
"count": "2",
"message": "PHP Warning: Undefined array key \\"id\\" in \\/var\\/www\\/html\\/wp-includes\\/class-wp-list-util.php on line 170"
},
{
"count": "1",
"message": "PHP Warning: Undefined array key \\"id\\" in \\/var\\/www\\/html\\/wp-includes\\/class-wp-list-util.php on line 170\\n"
"count": "0",
"message": "Debug log is ignored for woo-e2e\\/delete_products tests."
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1380,7 +1380,12 @@
}
},
{
"debug_log": []
"debug_log": [
{
"count": "0",
"message": "Debug log is ignored for woo-e2e\\/delete_products tests."
}
]
}
]
]';
Original file line number Diff line number Diff line change
Expand Up @@ -1382,12 +1382,8 @@
{
"debug_log": [
{
"count": "2",
"message": "PHP Warning: Undefined array key \\"id\\" in \\/var\\/www\\/html\\/wp-includes\\/class-wp-list-util.php on line 170"
},
{
"count": "1",
"message": "PHP Warning: Undefined array key \\"id\\" in \\/var\\/www\\/html\\/wp-includes\\/class-wp-list-util.php on line 170\\n"
"count": "0",
"message": "Debug log is ignored for woo-e2e\\/delete_products tests."
}
]
}
Expand Down
Loading

0 comments on commit 31918fe

Please sign in to comment.