Skip to content

Commit 980c3f7

Browse files
authored
MQE-682
- Documentation for all Test schema is now in-line. - Broke apart like-actions into partial schema for organization purposes.
1 parent 766eb08 commit 980c3f7

File tree

13 files changed

+2871
-1866
lines changed

13 files changed

+2871
-1866
lines changed

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

Lines changed: 766 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
9+
10+
<xs:include schemaLocation="commonAttributes.xsd"/>
11+
12+
<xs:group name="clickTags">
13+
<xs:choice>
14+
<xs:element type="clickType" name="click" minOccurs="0" maxOccurs="unbounded"/>
15+
<xs:element type="clickWithLeftButtonType" name="clickWithLeftButton" minOccurs="0" maxOccurs="unbounded"/>
16+
<xs:element type="clickWithRightButtonType" name="clickWithRightButton" minOccurs="0" maxOccurs="unbounded"/>
17+
<xs:element type="doubleClickType" name="doubleClick" minOccurs="0" maxOccurs="unbounded"/>
18+
<xs:element type="conditionalClickType" name="conditionalClick" minOccurs="0" maxOccurs="unbounded"/>
19+
</xs:choice>
20+
</xs:group>
21+
22+
<!-- Attributes -->
23+
<xs:attribute type="xs:string" name="x">
24+
<xs:annotation>
25+
<xs:documentation>
26+
X coordinate for click action.
27+
</xs:documentation>
28+
</xs:annotation>
29+
</xs:attribute>
30+
31+
<xs:attribute type="xs:string" name="y">
32+
<xs:annotation>
33+
<xs:documentation>
34+
Y coordinate for click action.
35+
</xs:documentation>
36+
</xs:annotation>
37+
</xs:attribute>
38+
39+
<!-- Complex Types -->
40+
41+
<xs:complexType name="clickType">
42+
<xs:annotation>
43+
<xs:documentation>Clicks an element according to given selector or selectorArray.</xs:documentation>
44+
</xs:annotation>
45+
<xs:simpleContent>
46+
<xs:extension base="xs:string">
47+
<xs:attribute ref="selector"/>
48+
<xs:attribute ref="selectorArray"/>
49+
<xs:attribute ref="userInput"/>
50+
<xs:attributeGroup ref="commonActionAttributes"/>
51+
</xs:extension>
52+
</xs:simpleContent>
53+
</xs:complexType>
54+
55+
<xs:complexType name="clickWithLeftButtonType">
56+
<xs:annotation>
57+
<xs:documentation>Performs a Left Click on an element according to given selector or selectorArray, or on given x/y coordinate.</xs:documentation>
58+
</xs:annotation>
59+
<xs:simpleContent>
60+
<xs:extension base="xs:string">
61+
<xs:attribute ref="selector"/>
62+
<xs:attribute ref="selectorArray"/>
63+
<xs:attribute ref="x"/>
64+
<xs:attribute ref="y"/>
65+
<xs:attributeGroup ref="commonActionAttributes"/>
66+
</xs:extension>
67+
</xs:simpleContent>
68+
</xs:complexType>
69+
70+
<xs:complexType name="clickWithRightButtonType">
71+
<xs:annotation>
72+
<xs:documentation>Performs a Right Click on an element according to given selector or selectorArray, or on given x/y coordinate.</xs:documentation>
73+
</xs:annotation>
74+
<xs:simpleContent>
75+
<xs:extension base="xs:string">
76+
<xs:attribute ref="selector"/>
77+
<xs:attribute ref="selectorArray"/>
78+
<xs:attribute ref="x"/>
79+
<xs:attribute ref="y"/>
80+
<xs:attributeGroup ref="commonActionAttributes"/>
81+
</xs:extension>
82+
</xs:simpleContent>
83+
</xs:complexType>
84+
85+
<xs:complexType name="conditionalClickType">
86+
<xs:annotation>
87+
<xs:documentation>Performs a Click on an element according to given selector, only if dependentSelector visibility value matches given.</xs:documentation>
88+
</xs:annotation>
89+
<xs:simpleContent>
90+
<xs:extension base="xs:string">
91+
<xs:attribute ref="selector" use="required"/>
92+
<xs:attribute type="xs:string" name="dependentSelector" use="required">
93+
<xs:annotation>
94+
<xs:documentation>
95+
Element that is the subject of the conditional check.
96+
</xs:documentation>
97+
</xs:annotation>
98+
</xs:attribute>
99+
<xs:attribute type="xs:boolean" name="visible" use="required">
100+
<xs:annotation>
101+
<xs:documentation>
102+
Visibility modifier to the subject of the conditional check.
103+
</xs:documentation>
104+
</xs:annotation>
105+
</xs:attribute>
106+
<xs:attributeGroup ref="commonActionAttributes"/>
107+
</xs:extension>
108+
</xs:simpleContent>
109+
</xs:complexType>
110+
111+
<xs:complexType name="doubleClickType">
112+
<xs:annotation>
113+
<xs:documentation>Clicks an element according to given selector.</xs:documentation>
114+
</xs:annotation>
115+
<xs:simpleContent>
116+
<xs:extension base="xs:string">
117+
<xs:attribute ref="selector" use="required"/>
118+
<xs:attributeGroup ref="commonActionAttributes"/>
119+
</xs:extension>
120+
</xs:simpleContent>
121+
</xs:complexType>
122+
</xs:schema>
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
9+
<xs:attributeGroup name="commonActionAttributes">
10+
<xs:attribute type="xs:string" name="stepKey" use="required">
11+
<xs:annotation>
12+
<xs:documentation>
13+
Unique identifier for test action.
14+
</xs:documentation>
15+
</xs:annotation>
16+
</xs:attribute>
17+
18+
<xs:attribute type="xs:string" name="before">
19+
<xs:annotation>
20+
<xs:documentation>
21+
stepKey of the next action.
22+
</xs:documentation>
23+
</xs:annotation>
24+
</xs:attribute>
25+
26+
<xs:attribute type="xs:string" name="after">
27+
<xs:annotation>
28+
<xs:documentation>
29+
stepKey of preceding action.
30+
</xs:documentation>
31+
</xs:annotation>
32+
</xs:attribute>
33+
</xs:attributeGroup>
34+
35+
<xs:attribute type="xs:string" name="userInput" id="userInput">
36+
<xs:annotation>
37+
<xs:documentation>
38+
Data or value for Test Action.
39+
</xs:documentation>
40+
</xs:annotation>
41+
</xs:attribute>
42+
43+
<xs:attribute type="xs:string" name="selector" id="selector">
44+
<xs:annotation>
45+
<xs:documentation>
46+
Element selector for Test Action.
47+
</xs:documentation>
48+
</xs:annotation>
49+
</xs:attribute>
50+
51+
<xs:attribute type="xs:string" name="selectorArray" id="selectorArray">
52+
<xs:annotation>
53+
<xs:documentation>
54+
Array of selectors for Test Action.
55+
</xs:documentation>
56+
</xs:annotation>
57+
</xs:attribute>
58+
59+
<xs:attribute type="xs:string" name="parameterArray" id="parameterArray">
60+
<xs:annotation>
61+
<xs:documentation>
62+
Array of Parameters for in Test Action. Requires formatting of "[item1, item2]" or "[item1 => value1, item2 => value2]".
63+
</xs:documentation>
64+
</xs:annotation>
65+
</xs:attribute>
66+
67+
<xs:attribute type="xs:string" name="url" id="url">
68+
<xs:annotation>
69+
<xs:documentation>
70+
URL for Test Action.
71+
</xs:documentation>
72+
</xs:annotation>
73+
</xs:attribute>
74+
75+
<xs:attribute type="xs:string" name="html" id="html">
76+
<xs:annotation>
77+
<xs:documentation>
78+
Block of HTML for Test Action. Use of this attribute not currently supported.
79+
</xs:documentation>
80+
</xs:annotation>
81+
</xs:attribute>
82+
</xs:schema>
Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
9+
10+
<xs:include schemaLocation="commonAttributes.xsd"/>
11+
12+
<xs:group name="customTags">
13+
<xs:choice>
14+
<xs:element type="magentoCLIType" name="magentoCLI" minOccurs="0" maxOccurs="unbounded"/>
15+
<xs:element type="closeAdminNotificationType" name="closeAdminNotification" minOccurs="0" maxOccurs="unbounded"/>
16+
<xs:element type="searchAndMultiSelectOptionType" name="searchAndMultiSelectOption" minOccurs="0" maxOccurs="unbounded"/>
17+
<xs:element type="formatMoneyType" name="formatMoney" minOccurs="0" maxOccurs="unbounded"/>
18+
<xs:element type="parseFloatType" name="parseFloat" minOccurs="0" maxOccurs="unbounded"/>
19+
<xs:element type="mSetLocaleType" name="mSetLocale" minOccurs="0" maxOccurs="unbounded"/>
20+
<xs:element type="mResetLocaleType" name="mResetLocale" minOccurs="0" maxOccurs="unbounded"/>
21+
<xs:element type="scrollToTopOfPageType" name="scrollToTopOfPage" minOccurs="0" maxOccurs="unbounded"/>
22+
<xs:element type="clearFieldType" name="clearField" minOccurs="0" maxOccurs="unbounded"/>
23+
</xs:choice>
24+
</xs:group>
25+
26+
<!-- Complex Types -->
27+
28+
<xs:complexType name="magentoCLIType">
29+
<xs:annotation>
30+
<xs:documentation>
31+
Executes given command against Magento CLI in test Magento instance.
32+
</xs:documentation>
33+
</xs:annotation>
34+
<xs:simpleContent>
35+
<xs:extension base="xs:string">
36+
<xs:attribute type="xs:string" name="command">
37+
<xs:annotation>
38+
<xs:documentation>
39+
Magento CLI command to be executed. Can be given options just like normal CLI interaction.
40+
</xs:documentation>
41+
</xs:annotation>
42+
</xs:attribute>
43+
<xs:attributeGroup ref="commonActionAttributes"/>
44+
</xs:extension>
45+
</xs:simpleContent>
46+
</xs:complexType>
47+
48+
<xs:complexType name="closeAdminNotificationType">
49+
<xs:annotation>
50+
<xs:documentation>
51+
Closes Admin Notification prompt.
52+
</xs:documentation>
53+
</xs:annotation>
54+
<xs:simpleContent>
55+
<xs:extension base="xs:string">
56+
<xs:attributeGroup ref="commonActionAttributes"/>
57+
</xs:extension>
58+
</xs:simpleContent>
59+
</xs:complexType>
60+
61+
<xs:complexType name="searchAndMultiSelectOptionType">
62+
<xs:annotation>
63+
<xs:documentation>
64+
Searches and Selects all given options in given Magento dropdown element.
65+
</xs:documentation>
66+
</xs:annotation>
67+
<xs:simpleContent>
68+
<xs:extension base="xs:string">
69+
<xs:attribute ref="selector" use="required"/>
70+
<xs:attribute ref="parameterArray" use="required"/>
71+
<xs:attribute type="xs:boolean" name="requiredAction">
72+
<xs:annotation>
73+
<xs:documentation>
74+
Determines if Multi Select needs to click "Done" after selections.
75+
</xs:documentation>
76+
</xs:annotation>
77+
</xs:attribute>
78+
<xs:attributeGroup ref="commonActionAttributes"/>
79+
</xs:extension>
80+
</xs:simpleContent>
81+
</xs:complexType>
82+
83+
<xs:complexType name="formatMoneyType">
84+
<xs:annotation>
85+
<xs:documentation>
86+
Formats given input to given locale. Returns formatted string for test use.
87+
</xs:documentation>
88+
</xs:annotation>
89+
<xs:simpleContent>
90+
<xs:extension base="xs:string">
91+
<xs:attribute ref="userInput"/>
92+
<xs:attribute type="xs:string" name="locale">
93+
<xs:annotation>
94+
<xs:documentation>
95+
Locale to format given input. Defaults to 'en_US.UTF-8' if nothing is given.
96+
</xs:documentation>
97+
</xs:annotation>
98+
</xs:attribute>
99+
<xs:attributeGroup ref="commonActionAttributes"/>
100+
</xs:extension>
101+
</xs:simpleContent>
102+
</xs:complexType>
103+
104+
<xs:complexType name="parseFloatType">
105+
<xs:annotation>
106+
<xs:documentation>
107+
Parses given float number with thousands_sep. Returns float for test use.
108+
</xs:documentation>
109+
</xs:annotation>
110+
<xs:simpleContent>
111+
<xs:extension base="xs:string">
112+
<xs:attribute ref="userInput"/>
113+
<xs:attributeGroup ref="commonActionAttributes"/>
114+
</xs:extension>
115+
</xs:simpleContent>
116+
</xs:complexType>
117+
118+
<xs:complexType name="mSetLocaleType">
119+
<xs:annotation>
120+
<xs:documentation>
121+
Sets locale according to given locale and input.
122+
</xs:documentation>
123+
</xs:annotation>
124+
<xs:simpleContent>
125+
<xs:extension base="xs:string">
126+
<xs:attribute ref="userInput"/>
127+
<xs:attribute type="xs:string" name="locale" use="required">
128+
<xs:annotation>
129+
<xs:documentation>
130+
Locale to set. Ex. 'en_US.UTF-8'
131+
</xs:documentation>
132+
</xs:annotation>
133+
</xs:attribute>
134+
<xs:attributeGroup ref="commonActionAttributes"/>
135+
</xs:extension>
136+
</xs:simpleContent>
137+
</xs:complexType>
138+
139+
<xs:complexType name="mResetLocaleType">
140+
<xs:simpleContent>
141+
<xs:extension base="xs:string">
142+
<xs:attributeGroup ref="commonActionAttributes"/>
143+
</xs:extension>
144+
</xs:simpleContent>
145+
</xs:complexType>
146+
147+
<xs:complexType name="scrollToTopOfPageType">
148+
<xs:annotation>
149+
<xs:documentation>
150+
Scrolls browser to the very top of the page.
151+
</xs:documentation>
152+
</xs:annotation>
153+
<xs:simpleContent>
154+
<xs:extension base="xs:string">
155+
<xs:attributeGroup ref="commonActionAttributes"/>
156+
</xs:extension>
157+
</xs:simpleContent>
158+
</xs:complexType>
159+
160+
<xs:complexType name="clearFieldType">
161+
<xs:annotation>
162+
<xs:documentation>
163+
Clears all input on given element.
164+
</xs:documentation>
165+
</xs:annotation>
166+
<xs:simpleContent>
167+
<xs:extension base="xs:string">
168+
<xs:attribute ref="selector" use="required"/>
169+
<xs:attributeGroup ref="commonActionAttributes"/>
170+
</xs:extension>
171+
</xs:simpleContent>
172+
</xs:complexType>
173+
</xs:schema>

0 commit comments

Comments
 (0)