-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from humhub/enh/4-add-tests
Add tests
- Loading branch information
Showing
4 changed files
with
49 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace tests\codeception\_pages; | ||
|
||
use tests\codeception\_support\BasePage; | ||
|
||
/** | ||
* Represents 2FA verifying code page | ||
* @property \AcceptanceTester|\FunctionalTester $actor | ||
*/ | ||
class TwofaAuthPage extends BasePage | ||
{ | ||
|
||
public $route = 'twofa/check'; | ||
|
||
/** | ||
* @param string $code | ||
*/ | ||
public function verify($code) | ||
{ | ||
if(method_exists($this->actor, 'waitForText')) { | ||
$this->actor->waitForText('Two-factor authentication'); | ||
} | ||
$this->actor->fillField('CheckCode[code]', $code); | ||
$this->actor->click('#verify-button'); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters