Skip to content

Commit 705236c

Browse files
committed
Replaced {% raw %} blocks.
1 parent 0698d92 commit 705236c

12 files changed

+62
-22
lines changed

docs/best-practices.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Best practices
22

3-
<span style="text-align: right">_This topic was updated due to the 2.3.13 MFTF release._</span>
4-
53
Check out our best practices below to ensure you are getting the absolute most out of the Magento Functional Testing Framework.
64

75
## Action group
@@ -109,10 +107,14 @@ Do not use them for static elements.
109107
BAD:
110108
</span>
111109

110+
<!-- {% raw %} -->
111+
112112
``` xml
113113
<element name="relatedProductSectionText" type="text" selector=".fieldset-wrapper.admin__fieldset-section[data-index='{{productType}}']" parameterized="true"/>
114114
```
115115

116+
<!-- {% endraw %} -->
117+
116118
<span class="color:green">
117119
GOOD:
118120
</span>
@@ -146,19 +148,19 @@ Since the configurable product module could be disabled, this approach is more r
146148

147149
<!-- Link definitions -->
148150

149-
[`<after>`]: test/actions.html#before-and-after
150-
[`<before>`]: test/actions.html#before-and-after
151-
[`<comment>`]: test/actions.html#comment
152-
[`<createData>`]: test/actions.html#createdata
153-
[`<deleteData>`]: test/actions.html#deletedata
154-
[`<wait>`]: test/actions.html#wait
155-
[`<waitForElement>`]: test/actions.html#waitforelement
156-
[`<waitForElementVisible>`]: test/actions.html#waitforelementvisible
157-
[`<waitForLoadingMaskToDisappear>`]: test/actions.html#waitforloadingmasktodisappear
158-
[Action group]: test/action-groups.html
159-
[annotations]: test/annotations.html
160-
[entity]: data.html
161-
[extension]: extending.html
162-
[merging]: merging.html
163-
[parameterized selectors]: section/parameterized-selectors.html
164-
[sections]: section.html
151+
[`<after>`]: test/actions.md#before-and-after
152+
[`<before>`]: test/actions.md#before-and-after
153+
[`<comment>`]: test/actions.md#comment
154+
[`<createData>`]: test/actions.md#createdata
155+
[`<deleteData>`]: test/actions.md#deletedata
156+
[`<wait>`]: test/actions.md#wait
157+
[`<waitForElement>`]: test/actions.md#waitforelement
158+
[`<waitForElementVisible>`]: test/actions.md#waitforelementvisible
159+
[`<waitForLoadingMaskToDisappear>`]: test/actions.md#waitforloadingmasktodisappear
160+
[Action group]: test/action-groups.md
161+
[annotations]: test/annotations.md
162+
[entity]: data.md
163+
[extension]: extending.md
164+
[merging]: merging.md
165+
[parameterized selectors]: section/parameterized-selectors.md
166+
[sections]: section.md

docs/credentials.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ carriers_usps_password=Lmgxvrq89uPwECeV
6464
....
6565
```
6666

67+
<!-- {% raw %} -->
68+
6769
## Use credentials in a test
6870

6971
Access the data defined in the `.credentials` file using the [`fillField`][] action with the `userInput` attribute.
@@ -78,6 +80,8 @@ For example:
7880
<fillField stepKey="FillApiToken" selector=".api-token" userInput="{{_CREDS.my_data_key}}" />
7981
```
8082

83+
<!-- {% raw %} -->
84+
8185
## Implementation details
8286

8387
The generated tests do not contain credentials values.

docs/data.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Input testing data
22

3-
<span style="text-align: right">_This topic was updated due to the 2.3.13 MFTF release._</span>
4-
53
The MFTF enables you to specify and use `<data>` entities defined in XML. Default `<data>` entities are provided for use and as templates for entity creation and manipulation.
64
The following diagram shows the XML structure of an MFTF data object:
75

86
![MFTF Data Object](img/data-dia.svg)
97

8+
<!-- {% raw %} -->
9+
1010
## Supply data to test by reference to a data entity
1111

1212
Test steps requiring `<data>` input in an action, like filling a field with a string, may reference an attribute from a data entity:
@@ -166,6 +166,8 @@ The following is an example of a call in test:
166166
<fillField selector="{{AdminCategoryBasicFieldSection.categoryNameInput}}" userInput="{{_defaultCategory.name}}" stepKey="enterCategoryName"/>
167167
```
168168

169+
<!-- {% endraw %} -->
170+
169171
This action inputs data from the `name` of the `_defaultCategory` entity (for example, `simpleCategory598742365`) into the field with the locator defined in the selector of the `categoryNameInput` element of the `AdminCategoryBasicFieldSection`.
170172

171173
## Reference

docs/extending.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Unlike merging, the parent test (or action group) will still exist after the tes
2020

2121
### Update a test step
2222

23+
<!-- {% raw %} -->
24+
2325
__Use case__: Create two similar tests with different `url` (`"{{AdminCategoryPage.url}}"` and `"{{OtherCategoryPage.url}}"`) in a test step.
2426

2527
> Test with "extends":
@@ -281,6 +283,8 @@ Add a new test `VerifyProductCount` that asserts the count of products:
281283
</actionGroups>
282284
```
283285

286+
<!-- {% endraw %} -->
287+
284288
## Extending data
285289

286290
Extend data to reuse entities in your module.

docs/merging.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ Learn more about running tests with different options using [`mftf`] or [`codece
4545

4646
Skip the `AdminLoginTest` test in the `.../Backend/Test/AdminLoginTest.xml` file while merging with the `.../Foo/Test/AdminLoginTest.xml` file:
4747

48+
<!-- {% raw %} -->
49+
4850
```xml
4951
<tests ...>
5052
<test name="AdminLoginTest">
@@ -304,6 +306,8 @@ The controls change drastically in the B2B version, so it was abstracted to an a
304306
</actionGroup>
305307
```
306308

309+
<!-- {% raw %} -->
310+
307311
## Merge pages
308312

309313
Use [page] merging to add or remove [sections] in your module.

docs/page.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Avoid hard-coded location selectors from tests to increase the maintainability a
1313

1414
Two types of pages are available:
1515

16+
<!-- {% raw %} -->
17+
1618
- Page with `url` declared as a constant string or [explicit page] - In a test it is called in a format like `{{NameOfPage.url}}`, where `NameOfPage` is a value of `name` in the corresponding page declaration `*.xml` file.
1719
- Page with `url` declared as a string with one or more variables or [parameterized page]
1820
- In a test it is called using a format like `{{NameOfPage.url(var1, var2, ...)}}`, where `var1, var2` etc. are parameters that will be substituted in the `url` of the corresponding `<page>` declaration.
@@ -148,6 +150,8 @@ Attributes|Type|Use|Description
148150

149151
`<page>` may contain several [`<section>`] elements.
150152

153+
<!-- {% endraw %} -->
154+
151155
### section {#section-tag}
152156

153157
`<section>` contains the sequence of UI elements.

docs/section.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ A `<section>` is a reusable part of a [`<page>`](./page.md) and is the standard
66

77
A `<section>` can define:
88

9+
<!-- {% raw %} -->
10+
911
- An explicit element that has a selector equal to the constant string. Example: `selector="#add_root_category_button"`
1012
- A parameterized element that contains substitutable values in the selector. Example: `selector="#element .{{var1}} .{{var2}}"`.
1113

@@ -132,6 +134,8 @@ The test step that covers the use case:
132134
...
133135
```
134136

137+
<!-- {% endraw %} -->
138+
135139
Whenever the `signIn` button is used in a test, the MFTF will add a 30 second `waitForPageLoad` action immediately after the `click`.
136140

137141
<!-- Link definitions -->

docs/section/locator-functions.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ When using the `locatorFunction`, omit `Locator::` for code simplicity:
2020

2121
An element's `locatorFunction` can also be parameterized the same way as [parameterized selectors][]:
2222

23+
<!-- {% raw %} -->
24+
2325
```xml
2426
<element name="simpleLocatorTwoParam" type="button" locatorFunction="contains({{arg1}}, {{arg2}})" parameterized="true"/>
2527
```
@@ -37,6 +39,8 @@ Given the above element definitions, you call the elements in a test just like a
3739
</test>
3840
```
3941

42+
<!-- {% endraw %} -->
43+
4044
<!-- Link Definitions -->
4145
[Locator functions]: http://codeception.com/docs/reference/Locator
4246
[section]: ../section.md

docs/section/parameterized-selectors.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ Add your selector in the `selector=""` attribute:
3030
</section>
3131
```
3232

33+
<!-- {% raw %} -->
34+
3335
### Selector with single variable
3436

3537
For the parameterized part of the selector, add `{{var1}}` to represent the first piece of data that you want to replace:
@@ -142,6 +144,8 @@ Add the second or third parameters, that you'd like to pass to the selector, sep
142144
</test>
143145
```
144146

147+
<!-- {% endraw %} -->
148+
145149
Any data can be used in parameterized elements, as well as entered in test actions:
146150

147151
* `_defaultCategory.is_active` is a reference to `<data key="is_active">` in `<entity name="_defaultCategory" ... ></entity>` in the corresponding `.../Data/*.xml`.

docs/test/action-groups.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ To create the `<actionGroup>` declaration:
5454
</actionGroups>
5555
```
5656

57+
<!-- {% raw %} -->
58+
5759
1. Add actions to the `actionGroup` arguments:
5860

5961
```xml
@@ -219,6 +221,8 @@ It can be reworked into more manageable pieces, as below. These smaller steps ar
219221
</actionGroup>
220222
```
221223

224+
<!-- {% endraw %} -->
225+
222226
## Elements reference
223227

224228
### actionGroups {#actiongroups-tag}

0 commit comments

Comments
 (0)