Skip to content

Commit 5ba2400

Browse files
committed
MQE-2978: [MFTF] Investigate removal of hoa/console
- moving `hoa/console` to suggest section
1 parent d691ce4 commit 5ba2400

File tree

5 files changed

+86
-51
lines changed

5 files changed

+86
-51
lines changed

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@
4646
"sebastian/phpcpd": "~6.0.0",
4747
"squizlabs/php_codesniffer": "~3.6.0"
4848
},
49+
"suggest": {
50+
"hoa/console": "Enables <pause /> action and interactive console functionality"
51+
},
4952
"autoload": {
5053
"files": ["src/Magento/FunctionalTestingFramework/_bootstrap.php"],
5154
"psr-4": {

composer.lock

Lines changed: 71 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/tests/functional/tests/MFTF/DevDocs/Test/DevDocsTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,6 @@
5151
<actualResult type="array">{{ExtendedMessageData.numbers}}</actualResult>
5252
<expectedResult type="array">["Something New", "0", "1", "2", "3", "TESTING CASE"]</expectedResult>
5353
</assertEqualsCanonicalizing>
54+
<pause stepKey="testingPause" />
5455
</test>
5556
</tests>

docs/interactive-pause.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ Check [pause on codeception.com][] for documentation and a video to see `Interac
1010

1111
In short, when a test gets to `$I->pause()` step, it stops and shows a console where you can try all available commands with auto-completion, stash commands, save screenshots, etc.
1212

13-
## MFTF Run Commands
13+
## How to Configure Interactive Pause
14+
15+
To be able to use Interactive console you need to install `hoa/console` library by running `composer require hoa/console` command in your project. This will allow `<pause />` action to work.
16+
MFTF supports `Interactive Pause` when `ENABLE_PAUSE` is set to `true` in `<project_root>/dev/tests/acceptance/.env` file.
1417

15-
The following MFTF run commands support `Interactive Pause` when `ENABLE_PAUSE` is set to `true`.
18+
## MFTF Run Commands
1619

1720
```bash
1821
vendor/bin/mftf run:group

src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,6 +1040,12 @@ public function switchToIFrame($locator = null)
10401040
*/
10411041
public function pause($pauseOnFail = false)
10421042
{
1043+
if (\Composer\InstalledVersions::isInstalled('hoa/console') === false) {
1044+
$message = "<pause /> action is unavailable." . PHP_EOL;
1045+
$message .= "Please install `hoa/console` via \"composer require hoa/console\"" . PHP_EOL;
1046+
print($message);
1047+
return;
1048+
}
10431049
if (!\Codeception\Util\Debug::isEnabled()) {
10441050
return;
10451051
}

0 commit comments

Comments
 (0)