File tree 2 files changed +7
-9
lines changed
src/Magento/FunctionalTestingFramework/Suite/views
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
47
47
48
48
try {
49
49
{{> 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
+
50
56
} catch (\Exception $exception) {
51
57
$this -> preconditionFailure = $exception -> getMessage ();
52
58
}
@@ -86,11 +92,10 @@ class {{suiteName}} extends \Codeception\GroupObject
86
92
if ($error -> failedTest ()-> getTestMethod () == $cest -> getName ()) {
87
93
// Do not attempt to run _after if failure was in the _after block
88
94
// 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 " );
90
96
}
91
97
}
92
98
}
93
-
94
99
{ {> testActions} }
95
100
} catch (\Exception $exception) {
96
101
print $exception -> getMessage ();
Original file line number Diff line number Diff line change @@ -11,13 +11,6 @@ if ($webDriver->webDriver != null) {
11
11
// initialize the webdriver session
12
12
$webDriver->_initializeSession();
13
13
{ {/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} }
21
14
{ {#action} }
22
15
{ {{action} }}
23
16
{ {/action} }
You can’t perform that action at this time.
0 commit comments