3ScreenFTTHCest.php 4.5 KB

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