3ScreenFTTHCest.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. $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. #Screen lista Dash FTTH
  19. $I->amOnUrl('http://ftth.fd3.flowdat.com/admin/dashboard');
  20. $I->makeScreenshot($head."/".$directorio.'15dashftth');
  21. $I->scrollTo(['css' => 'h3.box-title'], 0, 0);
  22. $I->makeScreenshot($head."/".$directorio.'15dashftth1');
  23. #Screen lista ONU
  24. $I->amOnUrl('http://ftth.fd3.flowdat.com/admin/ftth/onu/list');
  25. $I->makeScreenshot($head."/".$directorio.'16ONU');
  26. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 0);
  27. $I->makeScreenshot($head."/".$directorio.'16ONU1');
  28. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 600);
  29. $I->makeScreenshot($head."/".$directorio.'16ONU2');
  30. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 1200);
  31. $I->makeScreenshot($head."/".$directorio.'16ONU3');
  32. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 1800);
  33. $I->makeScreenshot($head."/".$directorio.'16ONU4');
  34. #Screen lista OLT
  35. $I->amOnUrl('http://ftth.fd3.flowdat.com/admin/ftth/olt/list');
  36. $I->makeScreenshot($head."/".$directorio.'17OLT');
  37. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 0);
  38. $I->makeScreenshot($head."/".$directorio.'17OLT1');
  39. #Screen lista Modelo OLT
  40. $I->amOnUrl('http://ftth.fd3.flowdat.com/admin/ftth/oltmodel/list');
  41. $I->makeScreenshot($head."/".$directorio.'18mOLT');
  42. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 0);
  43. $I->makeScreenshot($head."/".$directorio.'18mOLT1');
  44. #Screen lista Modelo ONU
  45. $I->amOnUrl('http://ftth.fd3.flowdat.com/admin/ftth/onumodel/list');
  46. $I->makeScreenshot($head."/".$directorio.'19mONU');
  47. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 0);
  48. $I->makeScreenshot($head."/".$directorio.'19mONU1');
  49. #Screen lista Perfiles
  50. $I->amOnUrl('http://ftth.fd3.flowdat.com/admin/ftth/profile/list');
  51. $I->makeScreenshot($head."/".$directorio.'20perfiles');
  52. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 0);
  53. $I->makeScreenshot($head."/".$directorio.'20perfiles1');
  54. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 600);
  55. $I->makeScreenshot($head."/".$directorio.'20perfiles2');
  56. #Screen lista NAP
  57. $I->amOnUrl('http://ftth.fd3.flowdat.com/admin/ftth/nap/list');
  58. $I->makeScreenshot($head."/".$directorio.'21NAP');
  59. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 0);
  60. $I->makeScreenshot($head."/".$directorio.'21NAP1');
  61. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 600);
  62. $I->makeScreenshot($head."/".$directorio.'21NAP2');
  63. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 1200);
  64. $I->makeScreenshot($head."/".$directorio.'21NAP3');
  65. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 1800);
  66. $I->makeScreenshot($head."/".$directorio.'21NAP4');
  67. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 2400);
  68. $I->makeScreenshot($head."/".$directorio.'21NAP5');
  69. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 3000);
  70. $I->makeScreenshot($head."/".$directorio.'21NAP5');
  71. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 3600);
  72. $I->makeScreenshot($head."/".$directorio.'21NAP6');
  73. #Screen lista Workflow FTTH
  74. $I->amOnUrl('http://ftth.fd3.flowdat.com/admin/workflow/workflow/list');
  75. $I->makeScreenshot($head."/".$directorio.'22workflowftth');
  76. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 0);
  77. $I->makeScreenshot($head."/".$directorio.'22workflowftth1');
  78. #Screen lista Acciones FTTH
  79. $I->amOnUrl('http://ftth.fd3.flowdat.com/admin/workflow/action/list');
  80. $I->makeScreenshot($head."/".$directorio.'23accionftth');
  81. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 0);
  82. $I->makeScreenshot($head."/".$directorio.'23accionftth1');
  83. #Screen lista Template FTTH
  84. $I->amOnUrl('http://ftth.fd3.flowdat.com/admin/template/template/list');
  85. $I->makeScreenshot($head."/".$directorio.'24templateftth');
  86. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 0);
  87. $I->makeScreenshot($head."/".$directorio.'24templateftth1');
  88. $I->scrollTo(['id' => 'list_batch_checkbox'], 0, 600);
  89. $I->makeScreenshot($head."/".$directorio.'24templateftth2');
  90. }
  91. }