From c0d491cce1b006a8a2427368faa4e060bcadf06b Mon Sep 17 00:00:00 2001 From: Tom Reece Date: Wed, 27 Mar 2019 10:56:40 -0500 Subject: [PATCH 1/2] MQE-1439: Invalid XML character in AdminDateFormatOnAttributePageTest causes Allure report parse error --- .../Allure/Adapter/MagentoAllureAdapter.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Magento/FunctionalTestingFramework/Allure/Adapter/MagentoAllureAdapter.php b/src/Magento/FunctionalTestingFramework/Allure/Adapter/MagentoAllureAdapter.php index 747e653e9..7c39bdc6f 100644 --- a/src/Magento/FunctionalTestingFramework/Allure/Adapter/MagentoAllureAdapter.php +++ b/src/Magento/FunctionalTestingFramework/Allure/Adapter/MagentoAllureAdapter.php @@ -117,6 +117,9 @@ public function stepBefore(StepEvent $stepEvent) $stepName = $stepAction . ' ' . $stepArgs; + // Strip control characters so that report generation does not fail + $stepName = preg_replace('/[[:cntrl:]]/', '', $stepName); + $this->emptyStep = false; $this->getLifecycle()->fire(new StepStartedEvent($stepName)); } From 0dc417ba37cf2193240bf366ce6cd268b4d2b43c Mon Sep 17 00:00:00 2001 From: Tom Reece Date: Wed, 27 Mar 2019 15:09:16 -0500 Subject: [PATCH 2/2] MQE-1439: Invalid XML character in AdminDateFormatOnAttributePageTest causes Allure report parse error - Improve function comment --- .../Allure/Adapter/MagentoAllureAdapter.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Magento/FunctionalTestingFramework/Allure/Adapter/MagentoAllureAdapter.php b/src/Magento/FunctionalTestingFramework/Allure/Adapter/MagentoAllureAdapter.php index 7c39bdc6f..6905b2541 100644 --- a/src/Magento/FunctionalTestingFramework/Allure/Adapter/MagentoAllureAdapter.php +++ b/src/Magento/FunctionalTestingFramework/Allure/Adapter/MagentoAllureAdapter.php @@ -98,10 +98,13 @@ private function sanitizeGroupName($group) } /** - * Override of parent method, only different to prevent replacing of . to • + * Override of parent method: + * prevent replacing of . to • + * strips control characters * * @param StepEvent $stepEvent * @return void + * @throws \Yandex\Allure\Adapter\AllureException */ public function stepBefore(StepEvent $stepEvent) {