1ScreenLogCest.php 540 B

123456789101112131415161718192021222324252627
  1. <?php
  2. use Codeception\Util\Locator;
  3. class ScreenLogCest
  4. {
  5. public function frontpageWorks(AcceptanceTester $I)
  6. {
  7. #log in
  8. $head = shell_exec('git rev-parse HEAD');
  9. $head = substr($head,0,-1);
  10. $directorio = '01_login/';
  11. $I->amOnPage('/');
  12. $I->see('Nombre de usuario');
  13. $I->fillField('_username', 'admin');
  14. $I->fillField('_password', 'admin');
  15. shell_exec('mkdir -p ./tests/_output/debug/' . $head . "/" . $directorio);
  16. $I->makeScreenshot($head . "/" . $directorio . '1log');
  17. $I->click('_submit');
  18. $I->wait('3');
  19. }
  20. }