Skip to content

Commit bb7dc31

Browse files
committed
MQE-1734: Add base + merge files to Test Description
1 parent a69b2b6 commit bb7dc31

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

dev/tests/verification/Resources/ExtendedChildTestInSuiteCest.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use Yandex\Allure\Adapter\Annotation\TestCaseId;
1717
/**
1818
* @Title("[NO TESTCASEID]: ExtendedChildTestInSuite")
1919
* @group ExtendedTestInSuite
20-
* @Description("<br><br>Test Files:<br>verification/TestModule/Test/ExtendedFunctionalTest.xml<br>
20+
* @Description("<br><br>Test Files:<br>verification/TestModule/Test/ExtendedFunctionalTest.xml<br>")
2121
*/
2222
class ExtendedChildTestInSuiteCest
2323
{

src/Magento/FunctionalTestingFramework/Test/Util/TestObjectExtractor.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -175,28 +175,27 @@ public function extractTestData($testData)
175175
* Append names of test files, including merge files, in description annotation
176176
*
177177
* @param string $description
178-
* @param array $fileNames
178+
* @param array $fileNames
179179
*
180180
* @return string
181181
*/
182182
private function appendFileNamesInDescriptionAnnotation($description, $fileNames)
183183
{
184184
$title = '';
185185
foreach ($fileNames as $fileName) {
186-
$fileName = realpath($fileName);
187-
if (!empty($fileName)) {
186+
if (!empty($fileName && realpath($fileName) !== false)) {
187+
$fileName = realpath($fileName);
188188
$relativeFileName = ltrim(
189189
str_replace(MAGENTO_BP, '', $fileName),
190190
DIRECTORY_SEPARATOR
191191
);
192-
if (empty($relativeFileName)) {
193-
continue;
192+
if (!empty($relativeFileName)) {
193+
if (empty($title)) {
194+
$title .= '<br><br>Test Files:<br>';
195+
$description .= $title;
196+
}
197+
$description .= $relativeFileName . '<br>';
194198
}
195-
if (empty($title)) {
196-
$title .= '<br><br>Test Files:<br>';
197-
$description .= $title;
198-
}
199-
$description .= $relativeFileName . '<br>';
200199
}
201200
}
202201
return $description;

0 commit comments

Comments
 (0)