3ScreenFTTHCest.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <?php
  2. use Codeception\Util\Locator;
  3. class ScreenFTTHCest
  4. {
  5. public function frontpageWorks(AcceptanceTester $I)
  6. {
  7. $cliente = "galvez";
  8. $head = shell_exec('git rev-parse HEAD');
  9. $head = substr($head,0,-1);
  10. #log in
  11. $I->amOnPage('/');
  12. $I->see('Nombre de usuario');
  13. $I->fillField('_username', 'admin');
  14. $I->fillField('_password', 'adminpass');
  15. $I->click('_submit');
  16. $I->wait('3');
  17. $directorio = '03_ftth/';
  18. shell_exec('mkdir -p ./tests/_output/debug/' . $cliente . "/" . $head . "/" . $directorio);
  19. #Screen lista Dash FTTH
  20. try{
  21. $I->amOnUrl('http://ftth.'.$cliente.'.flowdat.com/admin/dashboard');
  22. $I->makeScreenshot($cliente."/".$head."/".$directorio.'15dashftth');
  23. $I->scrollTo(['css' => 'h3.box-title'], 0, 0);
  24. $I->makeScreenshot($cliente."/".$head."/".$directorio.'15dashftth1');
  25. }catch(\Exception $e){
  26. }
  27. #Screen lista ONU
  28. try{
  29. $I->amOnUrl('http://ftth.'.$cliente.'.flowdat.com/admin/ftth/onu/list');
  30. $I->makeScreenshot($cliente."/".$head."/".$directorio.'16ONU');
  31. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 0);
  32. $I->makeScreenshot($cliente."/".$head."/".$directorio.'16ONU1');
  33. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 600);
  34. $I->makeScreenshot($cliente."/".$head."/".$directorio.'16ONU2');
  35. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 1200);
  36. $I->makeScreenshot($cliente."/".$head."/".$directorio.'16ONU3');
  37. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 1800);
  38. $I->makeScreenshot($cliente."/".$head."/".$directorio.'16ONU4');
  39. }catch(\Exception $e){
  40. }
  41. #Screen lista OLT
  42. try{
  43. $I->amOnUrl('http://ftth.'.$cliente.'.flowdat.com/admin/ftth/olt/list');
  44. $I->makeScreenshot($cliente."/".$head."/".$directorio.'17OLT');
  45. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 0);
  46. $I->makeScreenshot($cliente."/".$head."/".$directorio.'17OLT1');
  47. }catch(\Exception $e){
  48. }
  49. #Screen lista Modelo OLT
  50. try{
  51. $I->amOnUrl('http://ftth.'.$cliente.'.flowdat.com/admin/ftth/oltmodel/list');
  52. $I->makeScreenshot($cliente."/".$head."/".$directorio.'18mOLT');
  53. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 0);
  54. $I->makeScreenshot($cliente."/".$head."/".$directorio.'18mOLT1');
  55. }catch(\Exception $e){
  56. }
  57. #Screen lista Modelo ONU
  58. try{
  59. $I->amOnUrl('http://ftth.'.$cliente.'.flowdat.com/admin/ftth/onumodel/list');
  60. $I->makeScreenshot($cliente."/".$head."/".$directorio.'19mONU');
  61. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 0);
  62. $I->makeScreenshot($cliente."/".$head."/".$directorio.'19mONU1');
  63. }catch(\Exception $e){
  64. }
  65. #Screen lista Perfiles
  66. try{
  67. $I->amOnUrl('http://ftth.'.$cliente.'.flowdat.com/admin/ftth/profile/list');
  68. $I->makeScreenshot($cliente."/".$head."/".$directorio.'20perfiles');
  69. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 0);
  70. $I->makeScreenshot($cliente."/".$head."/".$directorio.'20perfiles1');
  71. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 600);
  72. $I->makeScreenshot($cliente."/".$head."/".$directorio.'20perfiles2');
  73. }catch(\Exception $e){
  74. }
  75. #Screen lista NAP
  76. try{
  77. $I->amOnUrl('http://ftth.'.$cliente.'.flowdat.com/admin/ftth/nap/list');
  78. $I->makeScreenshot($cliente."/".$head."/".$directorio.'21NAP');
  79. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 0);
  80. $I->makeScreenshot($cliente."/".$head."/".$directorio.'21NAP1');
  81. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 600);
  82. $I->makeScreenshot($cliente."/".$head."/".$directorio.'21NAP2');
  83. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 1200);
  84. $I->makeScreenshot($cliente."/".$head."/".$directorio.'21NAP3');
  85. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 1800);
  86. $I->makeScreenshot($cliente."/".$head."/".$directorio.'21NAP4');
  87. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 2400);
  88. $I->makeScreenshot($cliente."/".$head."/".$directorio.'21NAP5');
  89. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 3000);
  90. $I->makeScreenshot($cliente."/".$head."/".$directorio.'21NAP5');
  91. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 3600);
  92. $I->makeScreenshot($cliente."/".$head."/".$directorio.'21NAP6');
  93. }catch(\Exception $e){
  94. }
  95. #Screen lista Workflow FTTH
  96. try{
  97. $I->amOnUrl('http://ftth.'.$cliente.'.flowdat.com/admin/workflow/workflow/list');
  98. $I->makeScreenshot($cliente."/".$head."/".$directorio.'22workflowftth');
  99. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 0);
  100. $I->makeScreenshot($cliente."/".$head."/".$directorio.'22workflowftth1');
  101. }catch(\Exception $e){
  102. }
  103. #Screen lista Acciones FTTH
  104. try{
  105. $I->amOnUrl('http://ftth.'.$cliente.'.flowdat.com/admin/workflow/action/list');
  106. $I->makeScreenshot($cliente."/".$head."/".$directorio.'23accionftth');
  107. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 0);
  108. $I->makeScreenshot($cliente."/".$head."/".$directorio.'23accionftth1');
  109. }catch(\Exception $e){
  110. }
  111. #Screen lista Template FTTH
  112. try{
  113. $I->amOnUrl('http://ftth.'.$cliente.'.flowdat.com/admin/template/template/list');
  114. $I->makeScreenshot($cliente."/".$head."/".$directorio.'24templateftth');
  115. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 0);
  116. $I->makeScreenshot($cliente."/".$head."/".$directorio.'24templateftth1');
  117. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 600);
  118. $I->makeScreenshot($cliente."/".$head."/".$directorio.'24templateftth2');
  119. }catch(\Exception $e){
  120. }
  121. }
  122. }