Skip to content

Commit 7a21f39

Browse files
authored
MQE-2219: Part 6 Docs Annual Review (#767)
* MQE-2219: Part 6 Docs Annual Review * MQE-2219: Part 6 Docs Annual Review * MQE-2219: Part 6 Docs Annual Review
1 parent eda8252 commit 7a21f39

File tree

4 files changed

+31
-21
lines changed

4 files changed

+31
-21
lines changed

docs/section.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,26 +58,26 @@ Example (`.../Catalog/Section/AdminCategorySidebarActionSection.xml` file):
5858
<?xml version="1.0" encoding="utf-8"?>
5959

6060
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
61-
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
62-
<section name="AdminCategorySidebarActionSection">
63-
<element name="addRootCategoryButton" type="button" selector="#add_root_category_button" timeout="30"/>
64-
<element name="addSubcategoryButton" type="button" selector="#add_subcategory_button" timeout="30"/>
65-
</section>
61+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
62+
<section name="AdminCategorySidebarActionSection">
63+
<element name="AddRootCategoryButton" type="button" selector="#add_root_category_button" timeout="30"/>
64+
<element name="AddSubcategoryButton" type="button" selector="#add_subcategory_button" timeout="30"/>
65+
</section>
6666
</sections>
6767
```
6868

6969
This example uses a `AdminCategorySidebarActionSection` section. All sections with same name will be merged during test generation.
7070

7171
The `AdminCategorySidebarActionSection` section declares two buttons:
7272

73-
- `addRootCategoryButton` - button with a `#add_root_category_button` locator on the parent web page
74-
- `addSubcategoryButton` - button with a `#add_subcategory_button` locator on the parent web page
73+
- `AddRootCategoryButton` - button with a `#add_root_category_button` locator on the parent web page
74+
- `AddSubcategoryButton` - button with a `#add_subcategory_button` locator on the parent web page
7575

7676
The following is an example of a call in test:
7777

7878
```xml
7979
<!-- Click on the button with locator "#add_subcategory_button" on the web page-->
80-
<click selector="{{AdminCategorySidebarActionSection.addSubcategoryButton}}" stepKey="clickOnAddSubCategory"/>
80+
<click selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="clickOnAddSubCategory"/>
8181
```
8282

8383
## Elements reference
@@ -116,21 +116,21 @@ The most usual use case is a test step with a button click action.
116116

117117
The section element code declaration containing the timeout attribute:
118118

119-
> StorefrontSigninSection.xml
119+
> StorefrontCustomerSignInPopupFormSection.xml
120120
121121
```xml
122122
...
123-
<element name="signIn" type="button" selector="#signIn" timeout="30"/>
123+
<element name="signIn" type="button" selector="#send2" timeout="30"/>
124124
...
125125
```
126126

127127
The test step that covers the use case:
128128

129-
> StorefrontSigninTest.xml
129+
> CaptchaWithDisabledGuestCheckoutTest.xml
130130
131131
```xml
132132
...
133-
<click selector="{{StorefrontSigninSection.signIn}}" ../>
133+
<click selector="{{StorefrontCustomerSignInPopupFormSection.signIn}}" stepKey="clickSignIn"/>
134134
...
135135
```
136136

docs/section/locator-functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ An element cannot, however, have both a `selector` and a `locatorFunction`.
3131
Given the above element definitions, you call the elements in a test just like any other element. No special reference is required, as you are still just referring to an `element` inside a `section`:
3232

3333
```xml
34-
<test name="LocatorFuctionTest">
34+
<test name="LocatorFunctionTest">
3535
<click selector="{{LocatorFunctionSection.simpleLocator}}" stepKey="SimpleLocator"/>
3636
<click selector="{{LocatorFunctionSection.simpleLocatorTwoParam('string1', 'string2')}}" stepKey="TwoParamLiteral"/>
3737
</test>

docs/suite.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ You can form suites using separate tests, groups, and modules.
66

77
Each suite must be defined in the `<VendorName>/<ModuleName>/Test/Mftf/Suite` directory.
88

9-
The tests for each suite are generated in a separate directory under `<magento 2 root>/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/_generated/`.
10-
All tests that are not within a suite are generated in the _default_ suite at `.../Magento/FunctionalTest/_generated/default/`.
9+
The tests for each suite are generated in a separate directory under `<magento 2 root>/dev/tests/acceptance/tests/functional/Magento/_generated/`.
10+
All tests that are not within a suite are generated in the _default_ suite at `<magento 2 root>/dev/tests/acceptance/tests/functional/Magento/_generated/default`.
1111

1212
<div class="bs-callout bs-callout-info">
1313
If a test is generated into at least one custom suite, it will not appear in the _default_ suite.
@@ -61,7 +61,7 @@ The code lives in one place and executes once per suite.
6161

6262
- Set up preconditions and postconditions using [actions] in [`<before>`] and [`<after>`] correspondingly, just similar to use in a [test].
6363
- Clean up after suites just like after tests.
64-
The MFTF enforces the presence of both `<before>` and `<after>` if either is present.
64+
MFTF enforces the presence of both `<before>` and `<after>` if either is present.
6565

6666
## Test writing
6767

@@ -142,7 +142,7 @@ This suite includes all tests that contain the `<group value="WYSIWYG"/>` annota
142142
### Execute Magento CLI commands in suite conditions
143143

144144
```xml
145-
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Suite/etc/suiteSchema.xsd">
145+
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Suite/etc/suiteSchema.xsd">
146146
<suite name="Cache">
147147
<before>
148148
<magentoCLI stepKey="disableCache" command="cache:disable"/>
@@ -170,7 +170,7 @@ The suite includes a specific test `SomeCacheRelatedTest` and every `<test>` tha
170170
### Change Magento configurations in suite conditions
171171

172172
```xml
173-
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Suite/etc/suiteSchema.xsd">
173+
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Suite/etc/suiteSchema.xsd">
174174
<suite name="PaypalConfiguration">
175175
<before>
176176
<createData entity="SamplePaypalConfig" stepKey="createSamplePaypalConfig"/>

docs/update.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Update the Magento Functional Testing Framework
22

33
<div class="bs-callout bs-callout-info" markdown="1">
4-
Both Magento `2.2` and `2.3` supports MFTF `2.5.3` ([Find your version][] of the MFTF).
4+
[Find your version] of MFTF.
5+
The latest Magento 2.4.x release supports MFTF 3.x.
6+
The latest Magento 2.3.x release supports MFTF 2.6.x.
57
</div>
68

79
Tests and the Framework itself are stored in different repositories.
@@ -26,16 +28,24 @@ Takes place when **second** digit of version number changes.
2628
1. Check details about backward incompatible changes in the [Changelog][] and update your new or customized tests.
2729
1. Perform all the actions provided for [Patch Version Update][]
2830
1. When updating from versions below `2.5.0`, verify [WYSIWYG settings][]
29-
1. You may need to run the `upgrade:tests` using `vendor/bin/mftf upgrade:tests app`
31+
1. You may need to run the `upgrade:tests` using `vendor/bin/mftf upgrade:tests`
32+
33+
## Major version update
34+
35+
Takes place when **first** digit of version number changes.
36+
37+
1. Check detailed explanation and instructions on major version upgrade in [Backward Incompatible Changes][] and upgrade your new or customized tests.
38+
1. Perform all the actions provided for [Minor Version Update][]
3039

3140
## After updating
3241

3342
1. It is a good idea to regenerate your IDE Schema Definition catalog with `vendor/bin/mftf generate:urn-catalog .idea/`
34-
1. Update your tests, including data, metadata and other resoruces. Check if they contain tags that are unsupported in the newer version.
43+
1. Update your tests, including data, metadata and other resources. Check if they contain tags that are unsupported in the newer version.
3544
1. Remove the references to resources (ActionGroups, Sections, Tests) marked as deprecated.
3645

3746
<!-- Link Definitions -->
3847
[Changelog]: https://github.com/magento/magento2-functional-testing-framework/blob/master/CHANGELOG.md
48+
[Backward Incompatible Changes]: backward-incompatible-changes.md
3949
[WYSIWYG settings]: getting-started.md#wysiwyg-settings
4050
[Security settings]: getting-started.md#security-settings
4151
[Find your version]: introduction.md#find-your-mftf-version

0 commit comments

Comments
 (0)