Skip to content

Commit 8ae7255

Browse files
dshevtsovKevinBKozan
authored andcommitted
Updated XML Schemas to be compatible with XSD Diagram parsing tool
- Dima XSD suggestions.
1 parent e740af4 commit 8ae7255

13 files changed

+198
-503
lines changed

src/Magento/FunctionalTestingFramework/Test/etc/Actions/assertActions.xsd

+47-124
Large diffs are not rendered by default.

src/Magento/FunctionalTestingFramework/Test/etc/Actions/clickActions.xsd

+6-17
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
<xs:choice>
66
<xs:element type="clickType" name="click" minOccurs="0" maxOccurs="unbounded"/>
77
<xs:element type="clickWithLeftButtonType" name="clickWithLeftButton" minOccurs="0" maxOccurs="unbounded"/>
8-
<xs:element type="clickWithRightButtonType" name="clickWithRightButton" minOccurs="0"
9-
maxOccurs="unbounded"/>
8+
<xs:element type="clickWithRightButtonType" name="clickWithRightButton" minOccurs="0" maxOccurs="unbounded"/>
109
<xs:element type="doubleClickType" name="doubleClick" minOccurs="0" maxOccurs="unbounded"/>
1110
<xs:element type="conditionalClickType" name="conditionalClick" minOccurs="0" maxOccurs="unbounded"/>
1211
</xs:choice>
@@ -20,9 +19,7 @@
2019
<xs:attribute type="xs:string" name="selector"/>
2120
<xs:attribute type="xs:string" name="selectorArray"/>
2221
<xs:attribute type="xs:string" name="userInput"/>
23-
<xs:attribute ref="stepKey" use="required"/>
24-
<xs:attribute ref="before"/>
25-
<xs:attribute ref="after"/>
22+
<xs:attributeGroup ref="commonActionAttributes"/>
2623
</xs:extension>
2724
</xs:simpleContent>
2825
</xs:complexType>
@@ -33,9 +30,7 @@
3330
<xs:attribute type="xs:string" name="selectorArray"/>
3431
<xs:attribute type="xs:string" name="x"/>
3532
<xs:attribute type="xs:string" name="y"/>
36-
<xs:attribute ref="stepKey" use="required"/>
37-
<xs:attribute ref="before"/>
38-
<xs:attribute ref="after"/>
33+
<xs:attributeGroup ref="commonActionAttributes"/>
3934
</xs:extension>
4035
</xs:simpleContent>
4136
</xs:complexType>
@@ -46,9 +41,7 @@
4641
<xs:attribute type="xs:string" name="selectorArray"/>
4742
<xs:attribute type="xs:string" name="x"/>
4843
<xs:attribute type="xs:string" name="y"/>
49-
<xs:attribute ref="stepKey" use="required"/>
50-
<xs:attribute ref="before"/>
51-
<xs:attribute ref="after"/>
44+
<xs:attributeGroup ref="commonActionAttributes"/>
5245
</xs:extension>
5346
</xs:simpleContent>
5447
</xs:complexType>
@@ -58,19 +51,15 @@
5851
<xs:attribute type="xs:string" name="selector" use="required"/>
5952
<xs:attribute type="xs:string" name="dependentSelector" use="required"/>
6053
<xs:attribute type="xs:boolean" name="visible" use="required"/>
61-
<xs:attribute ref="stepKey" use="required"/>
62-
<xs:attribute ref="before"/>
63-
<xs:attribute ref="after"/>
54+
<xs:attributeGroup ref="commonActionAttributes"/>
6455
</xs:extension>
6556
</xs:simpleContent>
6657
</xs:complexType>
6758
<xs:complexType name="doubleClickType">
6859
<xs:simpleContent>
6960
<xs:extension base="xs:string">
7061
<xs:attribute type="xs:string" name="selector" use="required"/>
71-
<xs:attribute ref="stepKey" use="required"/>
72-
<xs:attribute ref="before"/>
73-
<xs:attribute ref="after"/>
62+
<xs:attributeGroup ref="commonActionAttributes"/>
7463
</xs:extension>
7564
</xs:simpleContent>
7665
</xs:complexType>
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,25 @@
11
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
2-
<xs:attribute type="xs:string" name="stepKey" id="stepKey">
3-
<xs:annotation>
4-
<xs:documentation>
5-
Test action's unique identifier.
6-
</xs:documentation>
7-
</xs:annotation>
8-
</xs:attribute>
9-
<xs:attribute type="xs:string" name="before" id="before">
10-
<xs:annotation>
11-
<xs:documentation>
12-
stepKey of action that must be executed next.
13-
</xs:documentation>
14-
</xs:annotation>
15-
</xs:attribute>
16-
<xs:attribute type="xs:string" name="after" id="after">
17-
<xs:annotation>
18-
<xs:documentation>
19-
stepKey of preceding action.
20-
</xs:documentation>
21-
</xs:annotation>
22-
</xs:attribute>
23-
<xs:attribute type="xs:string" name="selector" id="selector">
24-
<xs:annotation>
25-
<xs:documentation>
26-
Selector to be used in test action.
27-
</xs:documentation>
28-
</xs:annotation>
29-
</xs:attribute>
2+
<xs:attributeGroup name="commonActionAttributes">
3+
<xs:attribute type="xs:string" name="stepKey" use="required">
4+
<xs:annotation>
5+
<xs:documentation>
6+
Test action's unique identifier.
7+
</xs:documentation>
8+
</xs:annotation>
9+
</xs:attribute>
10+
<xs:attribute type="xs:string" name="before">
11+
<xs:annotation>
12+
<xs:documentation>
13+
stepKey of action that must be executed next.
14+
</xs:documentation>
15+
</xs:annotation>
16+
</xs:attribute>
17+
<xs:attribute type="xs:string" name="after">
18+
<xs:annotation>
19+
<xs:documentation>
20+
stepKey of preceding action.
21+
</xs:documentation>
22+
</xs:annotation>
23+
</xs:attribute>
24+
</xs:attributeGroup>
3025
</xs:schema>

src/Magento/FunctionalTestingFramework/Test/etc/Actions/customActions.xsd

+10-29
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
<xs:choice>
66
<xs:element type="magentoCLIType" name="magentoCLI" minOccurs="0" maxOccurs="unbounded"/>
77
<xs:element type="closeAdminNotificationType" name="closeAdminNotification" minOccurs="0" maxOccurs="unbounded"/>
8-
<xs:element type="searchAndMultiSelectOptionType" name="searchAndMultiSelectOption" minOccurs="0"
9-
maxOccurs="unbounded"/>
8+
<xs:element type="searchAndMultiSelectOptionType" name="searchAndMultiSelectOption" minOccurs="0" maxOccurs="unbounded"/>
109
<xs:element type="formatMoneyType" name="formatMoney" minOccurs="0" maxOccurs="unbounded"/>
1110
<xs:element type="parseFloatType" name="parseFloat" minOccurs="0" maxOccurs="unbounded"/>
1211
<xs:element type="mSetLocaleType" name="mSetLocale" minOccurs="0" maxOccurs="unbounded"/>
@@ -24,18 +23,14 @@
2423
<xs:simpleContent>
2524
<xs:extension base="xs:string">
2625
<xs:attribute type="xs:string" name="command"/>
27-
<xs:attribute ref="stepKey" use="required"/>
28-
<xs:attribute ref="before"/>
29-
<xs:attribute ref="after"/>
26+
<xs:attributeGroup ref="commonActionAttributes"/>
3027
</xs:extension>
3128
</xs:simpleContent>
3229
</xs:complexType>
3330
<xs:complexType name="closeAdminNotificationType">
3431
<xs:simpleContent>
3532
<xs:extension base="xs:string">
36-
<xs:attribute ref="stepKey" use="required"/>
37-
<xs:attribute ref="before"/>
38-
<xs:attribute ref="after"/>
33+
<xs:attributeGroup ref="commonActionAttributes"/>
3934
</xs:extension>
4035
</xs:simpleContent>
4136
</xs:complexType>
@@ -45,9 +40,7 @@
4540
<xs:attribute type="xs:string" name="selector" use="required"/>
4641
<xs:attribute type="xs:string" name="parameterArray" use="required"/>
4742
<xs:attribute type="xs:string" name="requiredAction"/>
48-
<xs:attribute ref="stepKey" use="required"/>
49-
<xs:attribute ref="before"/>
50-
<xs:attribute ref="after"/>
43+
<xs:attributeGroup ref="commonActionAttributes"/>
5144
</xs:extension>
5245
</xs:simpleContent>
5346
</xs:complexType>
@@ -56,19 +49,15 @@
5649
<xs:extension base="xs:string">
5750
<xs:attribute type="xs:string" name="userInput"/>
5851
<xs:attribute type="xs:string" name="locale"/>
59-
<xs:attribute ref="stepKey" use="required"/>
60-
<xs:attribute ref="before"/>
61-
<xs:attribute ref="after"/>
52+
<xs:attributeGroup ref="commonActionAttributes"/>
6253
</xs:extension>
6354
</xs:simpleContent>
6455
</xs:complexType>
6556
<xs:complexType name="parseFloatType">
6657
<xs:simpleContent>
6758
<xs:extension base="xs:string">
6859
<xs:attribute type="xs:string" name="userInput"/>
69-
<xs:attribute ref="stepKey" use="required"/>
70-
<xs:attribute ref="before"/>
71-
<xs:attribute ref="after"/>
60+
<xs:attributeGroup ref="commonActionAttributes"/>
7261
</xs:extension>
7362
</xs:simpleContent>
7463
</xs:complexType>
@@ -77,37 +66,29 @@
7766
<xs:extension base="xs:string">
7867
<xs:attribute type="xs:string" name="userInput"/>
7968
<xs:attribute type="xs:string" name="locale" use="required"/>
80-
<xs:attribute ref="stepKey" use="required"/>
81-
<xs:attribute ref="before"/>
82-
<xs:attribute ref="after"/>
69+
<xs:attributeGroup ref="commonActionAttributes"/>
8370
</xs:extension>
8471
</xs:simpleContent>
8572
</xs:complexType>
8673
<xs:complexType name="mResetLocaleType">
8774
<xs:simpleContent>
8875
<xs:extension base="xs:string">
89-
<xs:attribute ref="stepKey" use="required"/>
90-
<xs:attribute ref="before"/>
91-
<xs:attribute ref="after"/>
76+
<xs:attributeGroup ref="commonActionAttributes"/>
9277
</xs:extension>
9378
</xs:simpleContent>
9479
</xs:complexType>
9580
<xs:complexType name="scrollToTopOfPageType">
9681
<xs:simpleContent>
9782
<xs:extension base="xs:string">
98-
<xs:attribute ref="stepKey" use="required"/>
99-
<xs:attribute ref="before"/>
100-
<xs:attribute ref="after"/>
83+
<xs:attributeGroup ref="commonActionAttributes"/>
10184
</xs:extension>
10285
</xs:simpleContent>
10386
</xs:complexType>
10487
<xs:complexType name="clearFieldType">
10588
<xs:simpleContent>
10689
<xs:extension base="xs:string">
10790
<xs:attribute type="xs:string" name="selector" use="required"/>
108-
<xs:attribute ref="stepKey" use="required"/>
109-
<xs:attribute ref="before"/>
110-
<xs:attribute ref="after"/>
91+
<xs:attributeGroup ref="commonActionAttributes"/>
11192
</xs:extension>
11293
</xs:simpleContent>
11394
</xs:complexType>

src/Magento/FunctionalTestingFramework/Test/etc/Actions/dataActions.xsd

+6-14
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@
5252
<xs:element type="requiredEntityType" name="requiredEntity" minOccurs="0" maxOccurs="unbounded"/>
5353
</xs:choice>
5454
<xs:attribute ref="entity" use="required"/>
55-
<xs:attribute ref="stepKey" use="required"/>
56-
<xs:attribute ref="before"/>
57-
<xs:attribute ref="after"/>
55+
<xs:attributeGroup ref="commonActionAttributes"/>
5856
<xs:attribute ref="storeCode"/>
5957
</xs:complexType>
6058

@@ -66,10 +64,8 @@
6664
<xs:element type="requiredEntityType" name="requiredEntity" minOccurs="0" maxOccurs="unbounded"/>
6765
</xs:choice>
6866
<xs:attribute ref="entity" use="required"/>
69-
<xs:attribute ref="stepKey" use="required"/>
7067
<xs:attribute ref="createDataKey" use="required"/>
71-
<xs:attribute ref="before"/>
72-
<xs:attribute ref="after"/>
68+
<xs:attributeGroup ref="commonActionAttributes"/>
7369
<xs:attribute ref="storeCode"/>
7470
</xs:complexType>
7571

@@ -80,9 +76,7 @@
8076
<xs:simpleContent>
8177
<xs:extension base="xs:string">
8278
<xs:attribute ref="createDataKey" use="required"/>
83-
<xs:attribute ref="stepKey" use="required"/>
84-
<xs:attribute ref="before"/>
85-
<xs:attribute ref="after"/>
79+
<xs:attributeGroup ref="commonActionAttributes"/>
8680
<xs:attribute ref="storeCode"/>
8781
</xs:extension>
8882
</xs:simpleContent>
@@ -96,16 +90,14 @@
9690
<xs:element type="requiredEntityType" name="requiredEntity" minOccurs="0" maxOccurs="unbounded"/>
9791
</xs:choice>
9892
<xs:attribute ref="entity" use="required"/>
99-
<xs:attribute ref="stepKey" use="required"/>
10093
<xs:attribute type="xs:integer" name="index">
10194
<xs:annotation>
10295
<xs:documentation>
10396
If getData is supposed to return an array of objects, grab only index instead.
10497
</xs:documentation>
10598
</xs:annotation>
10699
</xs:attribute>
107-
<xs:attribute ref="before"/>
108-
<xs:attribute ref="after"/>
100+
<xs:attributeGroup ref="commonActionAttributes"/>
109101
<xs:attribute ref="storeCode"/>
110102
</xs:complexType>
111103

@@ -116,8 +108,8 @@
116108
<xs:simpleContent>
117109
<xs:extension base="xs:string">
118110
<xs:attribute ref="createDataKey" use="required"/>
119-
<xs:attribute ref="before"/>
120-
<xs:attribute ref="after"/>
111+
<xs:attribute name="before"/>
112+
<xs:attribute name="after"/>
121113
</xs:extension>
122114
</xs:simpleContent>
123115
</xs:complexType>

0 commit comments

Comments
 (0)