3ScreenFTTHCest.php 5.0 KB

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