4ScreenMapCest.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. use Codeception\Util\Locator;
  3. class ScreenMapCest
  4. {
  5. public function frontpageWorks(AcceptanceTester $I)
  6. {
  7. $dom = "galvez";
  8. $head = shell_exec('git rev-parse HEAD');
  9. $head = substr($head,0,-1);
  10. $directorio = '04_map/';
  11. shell_exec('mkdir -p ./tests/_output/debug/' . $head . "/" . $directorio);
  12. #log in
  13. $I->amOnUrl('http://base.'.$dom.'.flowdat.com/login');
  14. $I->see('Nombre de usuario');
  15. $I->fillField('_username', 'admin');
  16. $I->fillField('_password', 'adminpass');
  17. $I->click('_submit');
  18. $I->wait('3');
  19. #Screen lista Dash Maps
  20. try{
  21. $I->amOnUrl('http://mapas.'.$dom.'.flowdat.com/admin/dashboard');
  22. $I->makeScreenshot($head."/".$directorio.'25dashmap');
  23. $I->scrollTo(['css' => 'h3.box-title'], 0, 0);
  24. $I->makeScreenshot($head."/".$directorio.'25dashmap1');
  25. }catch(\Exception $e){
  26. }
  27. #Screen lista Listado Mapas
  28. try{
  29. $I->amOnUrl('http://mapas.'.$dom.'.flowdat.com/admin/map/map/list');
  30. $I->makeScreenshot($head."/".$directorio.'26listmap');
  31. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 0);
  32. $I->makeScreenshot($head."/".$directorio.'26listmap1');
  33. }catch(\Exception $e){
  34. }
  35. #Screen lista Listado Vectores
  36. try{
  37. $I->amOnUrl('http://mapas.'.$dom.'.flowdat.com/admin/map/vector/list');
  38. $I->makeScreenshot($head."/".$directorio.'28listvec');
  39. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 0);
  40. $I->makeScreenshot($head."/".$directorio.'28listvec1');
  41. }catch(\Exception $e){
  42. }
  43. #Screen lista Listado Objetos
  44. $I->amOnUrl('http://mapas.'.$dom.'.flowdat.com/admin/map/object/list');
  45. $I->makeScreenshot($head."/".$directorio.'29listobj');
  46. #Screen lista Tpos de Objetos
  47. $I->amOnUrl('http://mapas.'.$dom.'.flowdat.com/admin/map/objecttype/list');
  48. $I->makeScreenshot($head."/".$directorio.'30listcon');
  49. }
  50. }