From a717b6ca901b9c1351ac84ff83df20f9b440ac03 Mon Sep 17 00:00:00 2001 From: Manjusha S Date: Tue, 18 Jun 2024 10:54:53 +0530 Subject: [PATCH 1/2] ACQE-6716 | Unneeded reports are shown when MFTF Static tests fail --- .../StaticCheck/ClassFileNamingCheck.php | 2 +- .../StaticCheck/TestDependencyCheck.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Magento/FunctionalTestingFramework/StaticCheck/ClassFileNamingCheck.php b/src/Magento/FunctionalTestingFramework/StaticCheck/ClassFileNamingCheck.php index 2b282a963..5c8df59d3 100644 --- a/src/Magento/FunctionalTestingFramework/StaticCheck/ClassFileNamingCheck.php +++ b/src/Magento/FunctionalTestingFramework/StaticCheck/ClassFileNamingCheck.php @@ -96,7 +96,7 @@ public function execute(InputInterface $input) StaticChecksList::getErrorFilesPath() . DIRECTORY_SEPARATOR . self::ERROR_LOG_FILENAME . '.txt', self::ERROR_LOG_MESSAGE ); - if (!empty($this->warnings)) { + if (!empty($this->warnings) && !empty($this->errors) ) { $this->output .= "\n " . $this->scriptUtil->printWarningsToFile( $this->warnings, StaticChecksList::getErrorFilesPath() . DIRECTORY_SEPARATOR . self::WARNING_LOG_FILENAME . '.txt', diff --git a/src/Magento/FunctionalTestingFramework/StaticCheck/TestDependencyCheck.php b/src/Magento/FunctionalTestingFramework/StaticCheck/TestDependencyCheck.php index f7bfdeb72..a6050a682 100644 --- a/src/Magento/FunctionalTestingFramework/StaticCheck/TestDependencyCheck.php +++ b/src/Magento/FunctionalTestingFramework/StaticCheck/TestDependencyCheck.php @@ -155,7 +155,7 @@ public function execute(InputInterface $input) StaticChecksList::getErrorFilesPath() . DIRECTORY_SEPARATOR . self::ERROR_LOG_FILENAME . '.txt', self::ERROR_LOG_MESSAGE ); - if (!empty($this->warnings)) { + if (!empty($this->warnings) && !empty($this->errors) ) { $this->output .= "\n " . $this->scriptUtil->printWarningsToFile( $this->warnings, StaticChecksList::getErrorFilesPath() . DIRECTORY_SEPARATOR . self::WARNING_LOG_FILENAME . '.txt', From 1c53abe8d4a97c5902f22e23eabf5ec05e2fc4fd Mon Sep 17 00:00:00 2001 From: Manjusha S Date: Tue, 18 Jun 2024 10:58:13 +0530 Subject: [PATCH 2/2] ACQE-6716 | Unneeded reports are shown when MFTF Static tests fail --- .../StaticCheck/ClassFileNamingCheck.php | 2 +- .../StaticCheck/TestDependencyCheck.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Magento/FunctionalTestingFramework/StaticCheck/ClassFileNamingCheck.php b/src/Magento/FunctionalTestingFramework/StaticCheck/ClassFileNamingCheck.php index 5c8df59d3..4ce3c83d3 100644 --- a/src/Magento/FunctionalTestingFramework/StaticCheck/ClassFileNamingCheck.php +++ b/src/Magento/FunctionalTestingFramework/StaticCheck/ClassFileNamingCheck.php @@ -96,7 +96,7 @@ public function execute(InputInterface $input) StaticChecksList::getErrorFilesPath() . DIRECTORY_SEPARATOR . self::ERROR_LOG_FILENAME . '.txt', self::ERROR_LOG_MESSAGE ); - if (!empty($this->warnings) && !empty($this->errors) ) { + if (!empty($this->warnings) && !empty($this->errors)) { $this->output .= "\n " . $this->scriptUtil->printWarningsToFile( $this->warnings, StaticChecksList::getErrorFilesPath() . DIRECTORY_SEPARATOR . self::WARNING_LOG_FILENAME . '.txt', diff --git a/src/Magento/FunctionalTestingFramework/StaticCheck/TestDependencyCheck.php b/src/Magento/FunctionalTestingFramework/StaticCheck/TestDependencyCheck.php index a6050a682..01660c427 100644 --- a/src/Magento/FunctionalTestingFramework/StaticCheck/TestDependencyCheck.php +++ b/src/Magento/FunctionalTestingFramework/StaticCheck/TestDependencyCheck.php @@ -155,7 +155,7 @@ public function execute(InputInterface $input) StaticChecksList::getErrorFilesPath() . DIRECTORY_SEPARATOR . self::ERROR_LOG_FILENAME . '.txt', self::ERROR_LOG_MESSAGE ); - if (!empty($this->warnings) && !empty($this->errors) ) { + if (!empty($this->warnings) && !empty($this->errors)) { $this->output .= "\n " . $this->scriptUtil->printWarningsToFile( $this->warnings, StaticChecksList::getErrorFilesPath() . DIRECTORY_SEPARATOR . self::WARNING_LOG_FILENAME . '.txt',