From 896e3a547a09af0a2cc43c4827a14b167417c41c Mon Sep 17 00:00:00 2001 From: Lucas Bustamante Date: Wed, 8 Jan 2025 18:07:51 -0300 Subject: [PATCH] Ignore debug_log in delete_products even if it's empty --- _tests/managed_tests/tests/QITE2ETestCase.php | 8 ++++---- ...orc_php74_wprc_b153920e11128a2003ccfabb5a1c2b66__1.php | 7 ++++++- ...ble_php74_wprc_2a952a960085a76868033dc54aa96159__1.php | 7 ++++++- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/_tests/managed_tests/tests/QITE2ETestCase.php b/_tests/managed_tests/tests/QITE2ETestCase.php index 707ee247..f79b6f79 100644 --- a/_tests/managed_tests/tests/QITE2ETestCase.php +++ b/_tests/managed_tests/tests/QITE2ETestCase.php @@ -217,10 +217,6 @@ public function validate_and_normalize( string $file_path, ?callable $callback = ], 'debug_log' => [ 'normalize' => function ( $value ) use ( $file_path ) { - if ( ! is_array( $value ) ) { - return $value; - } - if ( stripos( $file_path, 'woo-e2e/delete_products' ) !== false || stripos( $file_path, 'woo-api/delete_products' ) !== false ) { return [ [ @@ -230,6 +226,10 @@ public function validate_and_normalize( string $file_path, ?callable $callback = ]; } + if ( ! is_array( $value ) ) { + return $value; + } + $normalize_custom_tests_debug_log = function ( $debug_log ) { $normalized = []; foreach ( $debug_log as $fatal_or_not => $logs ) { diff --git a/_tests/managed_tests/tests/__snapshots__/Wooe2eTest__test_woo_e2e_delete_products_woorc_php74_wprc_b153920e11128a2003ccfabb5a1c2b66__1.php b/_tests/managed_tests/tests/__snapshots__/Wooe2eTest__test_woo_e2e_delete_products_woorc_php74_wprc_b153920e11128a2003ccfabb5a1c2b66__1.php index 85606d33..98dd8736 100644 --- a/_tests/managed_tests/tests/__snapshots__/Wooe2eTest__test_woo_e2e_delete_products_woorc_php74_wprc_b153920e11128a2003ccfabb5a1c2b66__1.php +++ b/_tests/managed_tests/tests/__snapshots__/Wooe2eTest__test_woo_e2e_delete_products_woorc_php74_wprc_b153920e11128a2003ccfabb5a1c2b66__1.php @@ -33,7 +33,12 @@ "test_results_manager_url": "https:\\/\\/test-results-manager.com", "test_results_manager_expiration": 1234567890, "test_summary": "Delete_Products Normalized Summary", - "debug_log": "", + "debug_log": [ + { + "count": "0", + "message": "Debug log is ignored for woo-e2e\\/delete_products tests." + } + ], "version": "Undefined", "update_complete": true, "ai_suggestion_status": "none", diff --git a/_tests/managed_tests/tests/__snapshots__/Wooe2eTest__test_woo_e2e_delete_products_woostable_php74_wprc_2a952a960085a76868033dc54aa96159__1.php b/_tests/managed_tests/tests/__snapshots__/Wooe2eTest__test_woo_e2e_delete_products_woostable_php74_wprc_2a952a960085a76868033dc54aa96159__1.php index 85606d33..98dd8736 100644 --- a/_tests/managed_tests/tests/__snapshots__/Wooe2eTest__test_woo_e2e_delete_products_woostable_php74_wprc_2a952a960085a76868033dc54aa96159__1.php +++ b/_tests/managed_tests/tests/__snapshots__/Wooe2eTest__test_woo_e2e_delete_products_woostable_php74_wprc_2a952a960085a76868033dc54aa96159__1.php @@ -33,7 +33,12 @@ "test_results_manager_url": "https:\\/\\/test-results-manager.com", "test_results_manager_expiration": 1234567890, "test_summary": "Delete_Products Normalized Summary", - "debug_log": "", + "debug_log": [ + { + "count": "0", + "message": "Debug log is ignored for woo-e2e\\/delete_products tests." + } + ], "version": "Undefined", "update_complete": true, "ai_suggestion_status": "none",