123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- <?php
- use Codeception\Util\Locator;
- class CablemodemCest
- {
- public function frontpageWorks(AcceptanceTester $I)
- {
- shell_exec('mkdir -p ./tests/_output/debug/Add_Cablemodem/');
- #log in
- try{
- $I->amOnPage('/');
- $I->see('Nombre de usuario');
- $I->fillField('_username', 'admin');
- $I->fillField('_password', 'admin');
- $I->click('_submit');
- $I->wait('3');
- }catch(\Exception $e){
- $I->makeScreenshot('Add_Cablemodem/0_login');
- }
- /*
- # ____________________ Base _____________________
- # Nodo
- try{
- $I->amOnUrl('http://cablemodem.fd3.flowdat.com/admin/cablemodem/node/create');
- $I->fillField('Nombre', 'TestFernando'."\n");
- $I->click('Crear y regresar al listado');
- $I->wait('5');
- $I->see('ha sido creado con éxito.');
- }catch(\Exception $e){
- $I->makeScreenshot('Add_Cablemodem/1_Nodo');
- }
- # Nodo Padre
- try{
- $I->amOnUrl('http://cablemodem.fd3.flowdat.com/admin/cablemodem/node/create');
- $I->fillField('Nombre', 'TestFernandoP'."\n");
- $I->fillField('Padre','TestFernando'."\n");
- $I->click('Crear y regresar al listado');
- $I->wait('5');
- $I->see('ha sido creado con éxito.');
- }catch(\Exception $e){
- $I->makeScreenshot('Add_Cablemodem/2_NodoP');
- }
- # Perfil
- try{
- $I->amOnUrl('http://cablemodem.fd3.flowdat.com/admin/cablemodem/profile/create');
- $I->fillField('Nombre', 'TestFernando'."\n");
- $I->fillField('Downstream','5'."\n");
- $I->fillField('Upstream','5'."\n");
- $I->fillField('Filtro upload','5'."\n");
- $I->fillField('Filtro download','5'."\n");
- $I->fillField('Max cpe','5'."\n");
- $I->click('Crear y regresar al listado');
- $I->wait('5');
- $I->see('ha sido creado con éxito.');
- }catch(\Exception $e){
- $I->makeScreenshot('Add_Cablemodem/3_Perfil');
- }
-
- # Modelo Cablemodem
- try{
- $I->amOnUrl('http://cablemodem.fd3.flowdat.com/admin/cablemodem/cablemodemmodel/create');
- $I->fillField('Nombre', 'TestFernando'."\n");
- $I->click('Crear y regresar al listado');
- $I->wait('5');
- $I->see('ha sido creado con éxito.');
- }catch(\Exception $e){
- $I->makeScreenshot('Add_Cablemodem/4_ModCablemodem');
- }
- # Modelo CMTS
- try{
- $I->amOnUrl('http://cablemodem.fd3.flowdat.com/admin/cablemodem/cmtsmodel/create');
- $I->fillField('Nombre', 'TestFernando'."\n");
- $I->click('Crear y regresar al listado');
- $I->wait('5');
- $I->see('ha sido creado con éxito.');
- }catch(\Exception $e){
- $I->makeScreenshot('Add_Cablemodem/5_ModCMTS');
- }
- # CMTS
- try{
- $I->amOnUrl('http://cablemodem.fd3.flowdat.com/admin/cablemodem/cmts/create');
- $I->fillField('Nombre', 'TestFernando'."\n");
- $I->fillField('Host','cmts1.cabletv.com'."\n");
- $I->fillField('SNMP Comunity','ferNando2'."\n");
- $I->fillField('SNMP Version','2'."\n");
- $I->click('Crear y regresar al listado');
- $I->wait('5');
- $I->see('ha sido creado con éxito.');
- }catch(\Exception $e){
- $I->makeScreenshot('Add_Cablemodem/6_CMTS');
- }
- */
- # Cablemodem
- try{
- $I->amOnUrl('http://cablemodem.fd3.flowdat.com/admin/cablemodem/cablemodem/create');
- # $I->fillField('Cliente', 'TestFernando'."\n");
- $I->fillField('clientId_search', 'TestFernando');
- $I->pressKey("//*[@class='form-control ui-autocomplete-input']", WebDriverKeys::DOWN);
- $I->wait('3');
- $I->click("//*[@class='ui-corner-all']");
- $I->wait('3');
- $I->fillField('Mac','F0:E1:D2:C3:B4:A5'."\n");
- $I->fillField('Código activación','ferNando2'."\n");
- $I->click('Crear y regresar al listado');
- $I->wait('5');
- $I->see('ha sido creado con éxito.');
- }catch(\Exception $e){
- $I->makeScreenshot('Add_Cablemodem/7_Cablemodem');
- }
- }
- }
|