File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed
src/Magento/FunctionalTestingFramework/Suite/views Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,12 @@ class {{suiteName}} extends \Codeception\GroupObject
4747
4848 try {
4949 {{> testActions} }
50+
51+ // reset configuration and close session
52+ $this->getModule('\Magento\FunctionalTestingFramework\Module\MagentoWebDriver')->_resetConfig();
53+ $webDriver->webDriver->close();
54+ $webDriver->webDriver = null;
55+
5056 } catch (\Exception $exception) {
5157 $this -> preconditionFailure = $exception -> getMessage ();
5258 }
@@ -86,11 +92,10 @@ class {{suiteName}} extends \Codeception\GroupObject
8692 if ($error -> failedTest ()-> getTestMethod () == $cest -> getName ()) {
8793 // Do not attempt to run _after if failure was in the _after block
8894 // Try to run _after but catch exceptions to prevent them from overwriting original failure.
89- \PHPUnit_Framework_Assert::fail (" LAST TESTS FAILED IN SUITE, SUITE_AFTER CANNOT BE RUN " );
95+ print (" LAST TEST IN SUITE FAILED, TEST AFTER MAY NOT BE SUCCESSFUL \n " );
9096 }
9197 }
9298 }
93-
9499 { {> testActions} }
95100 } catch (\Exception $exception) {
96101 print $exception -> getMessage ();
Original file line number Diff line number Diff line change @@ -11,13 +11,6 @@ if ($webDriver->webDriver != null) {
1111// initialize the webdriver session
1212$webDriver->_initializeSession();
1313{ {/webDriverInit} }
14- { {#webDriverReset} }
15-
16- // reset configuration and close session
17- $this->getModule('\Magento\FunctionalTestingFramework\Module\MagentoWebDriver')->_resetConfig();
18- $webDriver->webDriver->close();
19- $webDriver->webDriver = null;
20- { {/webDriverReset} }
2114{ {#action} }
2215{ {{action} }}
2316{ {/action} }
You can’t perform that action at this time.
0 commit comments