markshust / magento2-module-disabletwofactorauth

The DisableTwoFactorAuth module provides the ability to disable two-factor authentication.
MIT License
194 stars 39 forks source link

Fix compatibility with MFTF 3.10.0 #16

Closed sprankhub closed 1 year ago

sprankhub commented 1 year ago

MFTF 3.10.0 changed the behaviour of \Magento\FunctionalTestingFramework\Module\MagentoWebDriver::magentoCLI: When no output is returned in the CLI, the method now returns the string "CLI did not return output.". This was introduced in https://github.com/magento/magento2-functional-testing-framework/commit/fe04f75ccc9d8e6ba6a305cc8d7ff42bf31de59e. However, a non-empty string is obviously true when casted to a bool, so that we currently return a wrong result from \MarkShust\DisableTwoFactorAuth\Test\Mftf\Helper\FillOtpOverride::checkIfTwoFactorIsEnabled. This breaks the MFTF backend login and my PR fixes this.

sprankhub commented 1 year ago

@markshust, mind checking this? Thanks :)

markshust commented 1 year ago

@sprankhub thanks for this! (and for reminding me... I've been quite absent-minded on GitHub lately).

Merging in, will tag & release 👍