File tree Expand file tree Collapse file tree 2 files changed +16
-9
lines changed
src/Magento/FunctionalTestingFramework Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Original file line number Diff line number Diff line change 88namespace Magento \FunctionalTestingFramework \Console ;
99
1010use Codeception \Configuration ;
11+ use Magento \FunctionalTestingFramework \Util \Path \UrlFormatter ;
1112use Symfony \Component \EventDispatcher \EventDispatcher ;
1213use Codeception \SuiteManager ;
1314use Magento \FunctionalTestingFramework \Config \MftfApplicationConfig ;
@@ -128,9 +129,14 @@ private function checkAuthenticationToMagentoAdmin()
128129 $ this ->ioStyle ->success ('Successful ' );
129130 $ result = true ;
130131 } catch (TestFrameworkException $ e ) {
132+ if (getenv ('MAGENTO_BACKEND_BASE_URL ' )) {
133+ $ urlVar = 'MAGENTO_BACKEND_BASE_URL ' ;
134+ } else {
135+ $ urlVar = 'MAGENTO_BASE_URL ' ;
136+ }
131137 $ this ->ioStyle ->error (
132- $ e ->getMessage ()
133- . "\n Please verify MAGENTO_ADMIN_USERNAME and MAGENTO_ADMIN_PASSWORD in .env. "
138+ $ e ->getMessage () . "\n Please verify if " . $ urlVar . " , "
139+ . "MAGENTO_ADMIN_USERNAME and MAGENTO_ADMIN_PASSWORD in .env are valid . "
134140 );
135141 }
136142 return $ result ;
Original file line number Diff line number Diff line change 1515 */
1616class MagentoWebDriverDoctor extends MagentoWebDriver
1717{
18- const MAGENTO_CLI_COMMAND = 'list ' ;
18+ const MAGENTO_CLI_COMMAND = 'info:currency: list ' ;
1919 const EXCEPTION_CONTEXT_SELENIUM = 'selenium ' ;
2020 const EXCEPTION_CONTEXT_ADMIN = 'admin ' ;
2121 const EXCEPTION_CONTEXT_STOREFRONT = 'store ' ;
@@ -150,18 +150,19 @@ private function loadPageAtUrl($url)
150150 private function runMagentoCLI ()
151151 {
152152 try {
153- $ regex = '~^.*(?<name>Magento CLI ).*[\r\n]+ (?<usage>Usage: ).*~ ' ;
153+ $ regex = '~^.*[\r\n]+.* (?<name>Currency ).*(?<code>Code ).*~ ' ;
154154 $ output = parent ::magentoCLI (self ::MAGENTO_CLI_COMMAND );
155155 preg_match ($ regex , $ output , $ matches );
156156
157- if (isset ($ matches ['name ' ]) && isset ($ matches ['usage ' ])) {
157+ if (isset ($ matches ['name ' ]) && isset ($ matches ['code ' ])) {
158158 return ;
159159 }
160160 } catch (\Exception $ e ) {
161- throw new TestFrameworkException (
162- "Failed to run Magento CLI command \n"
163- . "Please reference Magento DevDoc to setup command.php and .htaccess files. "
164- );
165161 }
162+
163+ throw new TestFrameworkException (
164+ "Failed to run Magento CLI command \n"
165+ . "Please reference Magento DevDoc to setup command.php and .htaccess files. "
166+ );
166167 }
167168}
You can’t perform that action at this time.
0 commit comments