Skip to content

Commit ced1533

Browse files
authored
Merge branch 'develop' into MQE-1234-alex-edition
2 parents c116bdb + 46d0de1 commit ced1533

File tree

7 files changed

+20
-45
lines changed

7 files changed

+20
-45
lines changed

dev/tests/unit/Magento/FunctionalTestFramework/Test/Util/ActionGroupAnnotationExtractorTest.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,13 @@ public function testActionGroupExtractAnnotations()
3434
"description" => [
3535
"nodeName" => "description",
3636
"value" => "someDescription"
37-
],
38-
"page" => [
39-
"nodeName" => "page",
40-
"value" => "somePage"
4137
]
4238
];
4339
// Perform Test
4440
$extractor = new ActionGroupAnnotationExtractor();
4541
$returnedAnnotations = $extractor->extractAnnotations($actionGroupAnnotations, "fileName");
4642

4743
// Asserts
48-
49-
$this->assertEquals("somePage", $returnedAnnotations['page']);
5044
$this->assertEquals("someDescription", $returnedAnnotations['description']);
5145
}
5246

@@ -57,7 +51,7 @@ public function testActionGroupExtractAnnotations()
5751
*/
5852
public function testActionGroupMissingAnnotations()
5953
{
60-
// Action Group Data, missing page and description
54+
// Action Group Data, missing description
6155
$testAnnotations = [];
6256
// Perform Test
6357
$extractor = new ActionGroupAnnotationExtractor();
@@ -70,7 +64,7 @@ public function testActionGroupMissingAnnotations()
7064
'DEPRECATION: Action Group File fileName is missing required annotations.',
7165
[
7266
'actionGroup' => 'fileName',
73-
'missingAnnotations' => "description, page"
67+
'missingAnnotations' => "description"
7468
]
7569
);
7670
}
@@ -83,7 +77,7 @@ public function testActionGroupMissingAnnotations()
8377
*/
8478
public function testActionGroupMissingAnnotationsNoWarning()
8579
{
86-
// Action Group Data, missing page and description
80+
// Action Group Data, missing description
8781
$testAnnotations = [];
8882
// Perform Test
8983
$extractor = new ActionGroupAnnotationExtractor();

dev/tests/unit/Magento/FunctionalTestFramework/Util/DocGeneratorTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ class DocGeneratorTest extends MagentoTestCase
2323
public function testBasicCreateDocumentation()
2424
{
2525
$annotations = [
26-
"page" => "somePage",
2726
"description" => "someDescription"
2827
];
2928
$actionGroupUnderTest = (new ActionGroupObjectBuilder())
@@ -55,7 +54,6 @@ public function testBasicCreateDocumentation()
5554
public function testCreateDocumentationWithOverwrite()
5655
{
5756
$annotations = [
58-
"page" => "somePage",
5957
"description" => "someDescription"
6058
];
6159
$actionGroupUnderTest = (new ActionGroupObjectBuilder())
@@ -70,7 +68,6 @@ public function testCreateDocumentationWithOverwrite()
7068
);
7169

7270
$annotations = [
73-
"page" => "alteredPage",
7471
"description" => "alteredDescription"
7572
];
7673
$actionGroupUnderTest = (new ActionGroupObjectBuilder())
@@ -102,7 +99,6 @@ public function testCreateDocumentationWithOverwrite()
10299
public function testCreateDocumentationNotCleanException()
103100
{
104101
$annotations = [
105-
"page" => "somePage",
106102
"description" => "someDescription"
107103
];
108104
$actionGroupUnderTest = (new ActionGroupObjectBuilder())
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
#Action Group Information
2-
This documentation contains a list of all action groups on the pages on which they start
2+
This documentation contains a list of all Action Groups.
33

4-
##List of Pages
5-
- [ alteredPage ](#alteredPage)
64
---
7-
<a name="alteredPage"></a>
8-
##alteredPage
9-
105
###testActionGroupObject
11-
alteredDescription
6+
**Description**:
7+
- alteredDescription
128

13-
Located in:
9+
**Located In**:
1410

1511
- filename
1612
***
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
#Action Group Information
2-
This documentation contains a list of all action groups on the pages on which they start
2+
This documentation contains a list of all Action Groups.
33

4-
##List of Pages
5-
- [ somePage ](#somePage)
64
---
7-
<a name="somePage"></a>
8-
##somePage
9-
105
###testActionGroupObject
11-
someDescription
6+
**Description**:
7+
- someDescription
128

13-
Located in:
9+
**Located In**:
1410

1511
- filename
1612
***

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
class ActionGroupAnnotationExtractor extends AnnotationExtractor
1515
{
1616
const ACTION_GROUP_REQUIRED_ANNOTATIONS = [
17-
"description",
18-
"page",
17+
"description"
1918
];
2019
const GENERATE_DOCS_COMMAND = 'generate:docs';
2120

src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
<xs:complexType>
3535
<xs:sequence>
3636
<xs:element name="description"/>
37-
<xs:element name="page"/>
3837
</xs:sequence>
3938
</xs:complexType>
4039
</xs:element>

src/Magento/FunctionalTestingFramework/Util/DocGenerator.php

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ public function createDocumentation($annotatedObjects, $outputDir, $clean)
7676
?? 'NO_DESCRIPTION_SPECIFIED',
7777
self::FILENAMES => $filenames,
7878
ActionGroupObjectExtractor::ACTION_GROUP_ARGUMENTS => $arguments
79-
];
79+
];
80+
8081
$pageGroups = array_merge_recursive(
8182
$pageGroups,
8283
[$annotations[ActionGroupObject::ACTION_GROUP_PAGE] ?? 'NO_PAGE_SPECIFIED' => [$name => $info]]
@@ -103,34 +104,28 @@ public function createDocumentation($annotatedObjects, $outputDir, $clean)
103104
private function transformToMarkdown($annotationList)
104105
{
105106
$markdown = "#Action Group Information" . PHP_EOL;
106-
$markdown .= "This documentation contains a list of all" .
107-
" action groups on the pages on which they start" .
107+
$markdown .= "This documentation contains a list of all Action Groups." .
108108
PHP_EOL .
109109
PHP_EOL;
110110

111-
$markdown .= "##List of Pages" . PHP_EOL;
112-
foreach ($annotationList as $group => $objects) {
113-
$markdown .= "- [ $group ](#$group)" . PHP_EOL;
114-
}
115111
$markdown .= "---" . PHP_EOL;
116112
foreach ($annotationList as $group => $objects) {
117-
$markdown .= "<a name=\"$group\"></a>" . PHP_EOL;
118-
$markdown .= "##$group" . PHP_EOL . PHP_EOL;
119113
foreach ($objects as $name => $annotations) {
120114
$markdown .= "###$name" . PHP_EOL;
121-
$markdown .= $annotations[actionGroupObject::ACTION_GROUP_DESCRIPTION] . PHP_EOL . PHP_EOL;
115+
$markdown .= "**Description**:" . PHP_EOL;
116+
$markdown .= "- " . $annotations[actionGroupObject::ACTION_GROUP_DESCRIPTION] . PHP_EOL . PHP_EOL;
122117
if (!empty($annotations[ActionGroupObjectExtractor::ACTION_GROUP_ARGUMENTS])) {
123-
$markdown .= "Action Group Arguments:" . PHP_EOL . PHP_EOL;
118+
$markdown .= "**Action Group Arguments**:" . PHP_EOL . PHP_EOL;
124119
$markdown .= "| Name | Type |" . PHP_EOL;
125-
$markdown .= "| --- | --- |" . PHP_EOL;
120+
$markdown .= "| ---- | ---- |" . PHP_EOL;
126121
foreach ($annotations[ActionGroupObjectExtractor::ACTION_GROUP_ARGUMENTS] as $argument) {
127122
$argumentName = $argument->getName();
128123
$argumentType = $argument->getDataType();
129124
$markdown .= "| $argumentName | $argumentType |" . PHP_EOL;
130125
}
131126
$markdown .= PHP_EOL;
132127
}
133-
$markdown .= "Located in:" . PHP_EOL;
128+
$markdown .= "**Located In**:" . PHP_EOL;
134129
foreach ($annotations[self::FILENAMES] as $filename) {
135130
$relativeFilename = str_replace(MAGENTO_BP . DIRECTORY_SEPARATOR, "", $filename);
136131
$markdown .= PHP_EOL . "- $relativeFilename";

0 commit comments

Comments
 (0)