Skip to content

Commit aea82ab

Browse files
authored
Grammar and formatting
1 parent a411c0c commit aea82ab

File tree

1 file changed

+46
-41
lines changed

1 file changed

+46
-41
lines changed

docs/backward-incompatible-changes.md

Lines changed: 46 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,66 +4,65 @@ This page highlights backward incompatible changes between releases that have a
44

55
## Version requirement changes
66

7-
We changed the minimum PHP version requirement from 7.0 to 7.3. Because of the PHP version requirement change, this MFTF version supports only Magento 2.4 or later.
7+
We changed the minimum PHP version requirement from 7.0 to 7.3. Because of the PHP version requirement change, this MFTF version only supports Magento 2.4 or later.
88

99
## Folder structure changes
1010

11-
We removed support to read test modules from deprecated path `dev/tests/acceptance/tests/functional/Magento/FunctionalTest`. If there are test modules in this path, they would need to be moved to `dev/tests/acceptance/tests/functional/Magento`.
11+
We removed support to read test modules from the deprecated path `dev/tests/acceptance/tests/functional/Magento/FunctionalTest`. If there are test modules in this path, they should be moved to `dev/tests/acceptance/tests/functional/Magento`.
1212

1313
## XSD schema changes
1414

15-
- Files under test modules `ActionGroup`, `Page`, `Section`, `Test` and `Suite` support only a single entity per file.
15+
- Files under test modules `ActionGroup`, `Page`, `Section`, `Test` and `Suite` only support a single entity per file.
16+
- The `file` attribute from `<module>` has been removed from the suite schema. `<module file=""/>` is no longer supported in suites.
17+
- Metadata filename format changed to ***`*Meta.xml`***.
18+
- Only nested assertion syntax will be supported. See the [assertions page](./docs/test/assertions.md) for details. Here is an example of the nested assertion syntax:
19+
```xml
20+
<assertEquals stepKey="assertAddressOrderPage">
21+
<actualResult type="const">$billingAddressOrderPage</actualResult>
22+
<expectedResult type="const">$shippingAddressOrderPage</expectedResult>
23+
</assertEquals>
24+
```
1625

17-
- `file` attribute from `<module>` has been removed from suite schema. `<module file=""/>` is no longer supported in suites.
18-
19-
- Metadata filename format changed to ***`*Meta.xml`***.
20-
21-
- Only nested assertion syntax will be supported. [See assertions page for details](./docs/test/assertions.md). Here is an example of a nested assertion syntax.
22-
```xml
23-
<assertEquals stepKey="assertAddressOrderPage">
24-
<actualResult type="const">$billingAddressOrderPage</actualResult>
25-
<expectedResult type="const">$shippingAddressOrderPage</expectedResult>
26-
</assertEquals>
27-
```
28-
### Upgrading tests to new schema
26+
### Upgrading tests to the new schema
2927

3028
The following table lists the upgrade scripts that are available to upgrade tests to the new schema.
3129

3230
| Script name | Description |
3331
|-----------------------|-----------------------------------------------------------------------------------------------------------|
3432
|`splitMultipleEntitiesFiles`| Splits files that have multiple entities into multiple files with one entity per file. |
35-
|`upgradeAssertionSchema`| Updates assert actions that use old assertion syntax to new nested syntax.|
33+
|`upgradeAssertionSchema`| Updates assert actions that uses the old assertion syntax into the new nested syntax.|
3634
|`renameMetadataFiles`| Renames Metadata filenames to `*Meta.xml`.|
3735
|`removeModuleFileInSuiteFiles`| Removes occurrences of `<module file=""/>` from all `<suite>`s.|
3836
|`removeUnusedArguments`| Removes unused arguments from action groups.|
3937
|`upgradeTestSchema`| Replaces relative schema paths to URN in test files.|
4038

41-
Here's how you can upgrade tests:
39+
To run the upgrade tests:
4240

43-
- Run `bin/mftf reset --hard` to remove old generated configurations.
44-
- Run `bin/mftf build:project` to generate new configurations.
45-
- Run `bin/mftf upgrade:tests`. [See command page for details](./docs/commands/mftf.md#upgradetests).
46-
- Lastly, try to generate all tests. Tests should all be generated as a result of the upgrades. If not, the most likely issue will be a changed XML schema. Check error messaging and search your codebase for the attributes listed.
41+
1. Run `bin/mftf reset --hard` to remove old generated configurations.
42+
1. Run `bin/mftf build:project` to generate new configurations.
43+
1. Run `bin/mftf upgrade:tests`. [See command page for details](./docs/commands/mftf.md#upgradetests).
44+
1. Lastly, try to generate all tests. Tests should all be generated as a result of the upgrades. If not, the most likely issue will be a changed XML schema. Check error messaging and search your codebase for the attributes listed.
4745

4846
## MFTF commands
4947

5048
`--debug` option `NONE` removed for strict schema validation. Ensure there are no schema validation errors in test modules before running MFTF commands.
5149

5250
## MFTF actions
5351

54-
###`executeInSelenium` and `performOn` removed
52+
### `executeInSelenium` and `performOn` removed
5553

5654
**Action**: Deprecated actions `executeInSelenium` and `performOn` are removed in favor of new action `helper`.
5755

5856
**Reason**: `executeInSelenium` and `performOn` allowed custom PHP code to be written inline inside of XML files which was difficult to maintain, troubleshoot, and modify.
5957

6058
**Details**:
6159

62-
`helper` will allow test writers to solve advanced requirements beyond what MFTF offers out of the box.[See custom-helpers](./docs/custom-helpers.md) for more information on the usage.
60+
The `helper` allows test writers to solve advanced requirements beyond what MFTF offers out of the box. See [custom-helpers](./docs/custom-helpers.md) for more information on usage.
6361

64-
Here's an example of using `helper` in place of `executeSelenium` to achieve same workflow.
62+
Here is an example of using `helper` in place of `executeSelenium` to achieve same workflow.
6563

6664
Old usage:
65+
6766
```xml
6867
<executeInSelenium function="function ($webdriver) use ($I) {
6968
$heading = $webdriver->findElement(\Facebook\WebDriver\WebDriverBy::xpath('//div[contains(@class, \'inline-wysiwyg\')]//h2'));
@@ -77,6 +76,7 @@ Old usage:
7776
```
7877

7978
New usage:
79+
8080
```xml
8181
<helper class="\Magento\PageBuilder\Test\Mftf\Helper\SelectText" method="selectText" stepKey="selectHeadingTextInTinyMCE">
8282
<argument name="context">//div[contains(@class, 'inline-wysiwyg')]//h2</argument>
@@ -95,7 +95,8 @@ New usage:
9595

9696
**Details**:
9797

98-
[See actions page for details](./docs/test/actions.md#pause). Here's a usage example.
98+
See the [actions page for details](./docs/test/actions.md#pause). Here is a usage example:
99+
99100
```xml
100101
<pause stepKey="pauseExecutionKey"/>
101102
```
@@ -108,39 +109,42 @@ New usage:
108109

109110
### Updated assert actions
110111

111-
**Action**: `delta` attribute has been removed from `assertEquals` and `assertNotEquals`. Instead, below assert actions have been introduced:
112-
- `assertEqualsWithDelta`
113-
- `assertNotEqualsWithDelta`
114-
- `assertEqualsCanonicalizing`
115-
- `assertNotEqualsCanonicalizing`
116-
- `assertEqualsIgnoringCase`
117-
- `assertNotEqualsIgnoringCase`
112+
**Action**: The `delta` attribute has been removed from `assertEquals` and `assertNotEquals`. Instead, new assert actions have been introduced:
113+
114+
- `assertEqualsWithDelta`
115+
- `assertNotEqualsWithDelta`
116+
- `assertEqualsCanonicalizing`
117+
- `assertNotEqualsCanonicalizing`
118+
- `assertEqualsIgnoringCase`
119+
- `assertNotEqualsIgnoringCase`
118120

119121
**Reason**: PHPUnit 9 has dropped support for optional parameters for `assertEquals` and `assertNotEquals` and has introduced these new assertions.
120122

121123
**Details**:
122124

123-
Usages of `assertEquals` or `assertNotEquals` with `delta` specified, should be replaced with appropriate assertion from above list.
125+
Usage of `assertEquals` or `assertNotEquals` with a specified `delta`, should be replaced with appropriate assertion from the above list.
124126

125127
### `assertContains` supports only iterable haystacks
126128

127-
**Action**: `assertContains` and `assertNotContains` now support only iterable haystacks. Below assert actions have been added to work with string haystacks:
128-
- `assertStringContainsString`
129-
- `assertStringNotContainsString`
130-
- `assertStringContainsStringIgnoringCase`
131-
- `assertStringNotContainsStringIgnoringCase`
129+
**Action**: `assertContains` and `assertNotContains` now only supports iterable haystacks. These assert actions have been added to work with string haystacks:
130+
131+
- `assertStringContainsString`
132+
- `assertStringNotContainsString`
133+
- `assertStringContainsStringIgnoringCase`
134+
- `assertStringNotContainsStringIgnoringCase`
132135

133136
**Reason**: With PHPUnit 9, `assertContains` and `assertNotContains` only allows iterable haystacks. New assertions have been introduced to support string haystacks.
134137

135138
**Details**:
136139

137-
Usages of `assertContains` and `assertNotContains` with string haystacks should be replaced with appropriate assertion from above list.
140+
Usages of `assertContains` and `assertNotContains` with string haystacks should be replaced with appropriate assertion from the above list.
138141

139142
Usage example for string haystacks:
143+
140144
```xml
141145
<assertStringContainsString stepKey="assertDiscountOnPrice2">
142-
<actualResult type="const">$grabSimpleProdPrice2</actualResult>
143-
<expectedResult type="string">$110.70</expectedResult>
146+
<actualResult type="const">$grabSimpleProdPrice2</actualResult>
147+
<expectedResult type="string">$110.70</expectedResult>
144148
</assertStringContainsString>
145149
```
146150

@@ -153,6 +157,7 @@ Usage example for string haystacks:
153157
**Details**: Format input to specified currency according to the locale specified.
154158

155159
Usage example:
160+
156161
```xml
157162
<formatCurrency userInput="1234.56789000" locale="de_DE" currency="USD" stepKey="usdInDE"/>
158163
```

0 commit comments

Comments
 (0)