You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/backward-incompatible-changes.md
+46-41Lines changed: 46 additions & 41 deletions
Original file line number
Diff line number
Diff line change
@@ -4,66 +4,65 @@ This page highlights backward incompatible changes between releases that have a
4
4
5
5
## Version requirement changes
6
6
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.
8
8
9
9
## Folder structure changes
10
10
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`.
12
12
13
13
## XSD schema changes
14
14
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:
-`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.
|`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.|
36
34
|`renameMetadataFiles`| Renames Metadata filenames to `*Meta.xml`.|
37
35
|`removeModuleFileInSuiteFiles`| Removes occurrences of `<module file=""/>` from all `<suite>`s.|
38
36
|`removeUnusedArguments`| Removes unused arguments from action groups.|
39
37
|`upgradeTestSchema`| Replaces relative schema paths to URN in test files.|
40
38
41
-
Here's how you can upgrade tests:
39
+
To run the upgrade tests:
42
40
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.
47
45
48
46
## MFTF commands
49
47
50
48
`--debug` option `NONE` removed for strict schema validation. Ensure there are no schema validation errors in test modules before running MFTF commands.
51
49
52
50
## MFTF actions
53
51
54
-
###`executeInSelenium` and `performOn` removed
52
+
###`executeInSelenium` and `performOn` removed
55
53
56
54
**Action**: Deprecated actions `executeInSelenium` and `performOn` are removed in favor of new action `helper`.
57
55
58
56
**Reason**: `executeInSelenium` and `performOn` allowed custom PHP code to be written inline inside of XML files which was difficult to maintain, troubleshoot, and modify.
59
57
60
58
**Details**:
61
59
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.
63
61
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.
65
63
66
64
Old usage:
65
+
67
66
```xml
68
67
<executeInSeleniumfunction="function ($webdriver) use ($I) {
[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
+
99
100
```xml
100
101
<pausestepKey="pauseExecutionKey"/>
101
102
```
@@ -108,39 +109,42 @@ New usage:
108
109
109
110
### Updated assert actions
110
111
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`
118
120
119
121
**Reason**: PHPUnit 9 has dropped support for optional parameters for `assertEquals` and `assertNotEquals` and has introduced these new assertions.
120
122
121
123
**Details**:
122
124
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.
124
126
125
127
### `assertContains` supports only iterable haystacks
126
128
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`
132
135
133
136
**Reason**: With PHPUnit 9, `assertContains` and `assertNotContains` only allows iterable haystacks. New assertions have been introduced to support string haystacks.
134
137
135
138
**Details**:
136
139
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.
0 commit comments