Skip to content

Commit 5e5fb96

Browse files
authored
Formatting
1 parent ece0f58 commit 5e5fb96

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

docs/guides/test-modularity.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Within MFTF, test modularity can refer to two different concepts:
88

99
### Test material merging
1010

11-
This concept is covered extensively in the [merging] topic, so it will not be our focus in this guide
11+
Test material merging is covered extensively in the [merging] topic, so it will not be our focus in this guide.
1212

1313
### Modular test materials
1414

@@ -18,9 +18,9 @@ Since MFTF queries the Magento instance for enabled modules, MFTF test materials
1818

1919
## Why is test modularity important?
2020

21-
This concept is important simply because without proper modularity, tests or test materials may be incorrectly merged in (or be left out), leading to the the test itself being out of sync with the Magento instance.
21+
This concept is important simply because without proper modularity, tests or test materials may be incorrectly merged in (or left out), leading to the the test itself being out of sync with the Magento instance.
2222

23-
For example, in a situation where an extension drastically alters the login process (something like two factor authentication), the only way the tests will be able to pass is if the test materials are correctly nested in the extension.
23+
For example, in a situation where an extension drastically alters the login process (for instance: two factor authentication), the only way the tests will be able to pass is if the test materials are correctly nested in the extension.
2424

2525
## How can I achieve test modularity?
2626

@@ -32,21 +32,22 @@ This is should be the first step when creating new test materials. We will use t
3232

3333
#### Intuitive reasoning
3434

35-
The easiest way to do this has limited application, but some times it's fairly obvious where a test material comes from due to nomenclature or functionality.
35+
The easiest way to do this has limited application, but some times it is fairly obvious where test material comes from due to nomenclature or functionality.
3636

37-
For instance, the following `<select>` for `Tax Class` clearly belongs to the `Tax` module
37+
The following `<select>` for `Tax Class` clearly belongs to the `Tax` module:
3838

3939
```xml
4040
<select class="admin__control-select" name="product[tax_class_id]"/>
4141
```
4242

43-
This approach will work on getting the quickest ownership, but it's fairly obvious that it may be necessary to double check
43+
This approach will work on getting the quickest ownership, but it is fairly obvious that it may be necessary to double check.
4444

4545
#### Deduction
4646

4747
This is the next step up in difficulty from the above method, as it involves searching through the Magento codebase.
4848

49-
Let's take the `Add Attribute` button for example. The button has an `id="addAttribute"`, and searching through the codebase for `"addAttribute"` will lead you to `Catalog/view/adminhtml/ui_component/product_form.xml`:
49+
Take the `Add Attribute` button for example. The button has an `id="addAttribute"`, and searching through the codebase for `"addAttribute"` will lead you to `Catalog/view/adminhtml/ui_component/product_form.xml`:
50+
5051
```xml
5152
<button name="addAttribute" class="Magento\Catalog\Block\Adminhtml\Product\Edit\Button\AddAttribute"/>
5253
```
@@ -57,12 +58,12 @@ This kind of deduction is more involved, but it much more likely to give you the
5758

5859
### Use bin/mftf static-checks
5960

60-
The latter aspect of modular test materials involves test material references to other test materials, and making sure the dependencies are not out of sync with the parent module.
61+
The second aspect of modular test materials involves test material references to other test materials, and making sure the dependencies are not out of sync with the parent module.
6162

6263
The `static-checks` command includes a test material ownership check that should help suss out these kind of dependency issues.
6364

6465
See [mftf commands] for more information.
6566

6667
<!-- Link definitions -->
6768
[merging]: ../merging.md
68-
[mftf commands]: ../commands/mftf.md
69+
[mftf commands]: ../commands/mftf.md

0 commit comments

Comments
 (0)