123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283 |
- <?php
- use Codeception\Util\Locator;
- class BaseCest
- {
- public function frontpageWorks(AcceptanceTester $I)
- {
- #log in
- $I->amOnPage('/');
- $I->see('Nombre de usuario');
- $I->fillField('_username', 'admin');
- $I->fillField('_password', 'adminpass');
- $I->click('_submit');
- $I->wait('3');
- # ____________________ Base _____________________
- /*
- # Codigos de Autenticación
- $I->amOnUrl('http://base.fd3.flowdat.com/admin/base/oauthserver/authcode/create');
- $I->fillField('Usuario', 'iksop'."\n");
- $I->fillField('Token', '002');
- $I->fillField('URI de Redirección','TestDirección');
- $I->fillField('Expiración','4');
- $I->fillField('Alcance','TestFernando');
- $I->click('button.btn.btn-success');
- $I->wait('1');
- # Clientes OAuth
- $I->amOnUrl('http://base.fd3.flowdat.com/admin/base/oauthserver/oauthclient/create');
- $I->click('button.btn.btn-success');
- $I->wait('1');
- # Tokens de Acceso
- $I->amOnUrl('http://base.fd3.flowdat.com/admin/base/oauthserver/accesstoken/create');
- $I->fillField('Usuario', 'iksop'."\n");
- $I->fillField('Token', '002');
- $I->fillField('Expiración','4');
- $I->fillField('Alcance','TestFernando');
- $I->click('button.btn.btn-success');
- $I->wait('1');
- # Tokens de Refresco
- $I->amOnUrl('http://base.fd3.flowdat.com/admin/base/oauthserver/refreshtoken/create');
- $I->fillField('Usuario', 'iksop'."\n");
- $I->fillField('Token', '002');
- $I->fillField('Expiración','4');
- $I->fillField('Alcance','TestFernando');
- $I->click('button.btn.btn-success');
- $I->wait('1');
- # Workflow
- $I->amOnUrl('http://base.fd3.flowdat.com/admin/workflow/workflow/create');
- $I->fillField('Nombre','FernandoTest');
- $I->fillField('Descripción', 'FernandoTest');
- # _____________ No funciona select __________________
- # $I->selectOption('Tipo de Workflow', 'workflow');
- $I->fillField('Supports', 'ClientBundle\Entity\Client'."\n");
- $I->click('button.btn.btn-success');
- $I->wait('1');
- # Action
- $I->amOnUrl('http://base.fd3.flowdat.com/admin/workflow/action/create');
- $I->fillField('Nombre', 'FernandoTest');
- $I->fillField('Evento', 'transition'."\n");
- $I->fillField('Workflow', 'FernandoTest');
- $I->fillField('Referencia', 'FernandoTest'."\t");
- $I->fillField('Clase', "\n"."\n");
- $I->fillField("//*[@class='ace_text-input']", 'template');
- $I->wait('5');
- $I->click('button.btn.btn-success');
- # Alertas
- # __________ ERROR EN SELECT TIPO _____________________
- $I->amOnUrl('http://base.fd3.flowdat.com/admin/alert/alert/create');
- $I->fillField('Título','TestFernando');
- $I->fillField('Cuerpo','TestFernando');
- $I->click('span.control-label__text');
- $I->click('button.btn.btn-success');
- # Tipo de Alertas
- $I->amOnUrl('http://base.fd3.flowdat.com/admin/alert/alerttype/create');
- $I->fillField('Nombre Corto','Test');
- $I->fillField("(//*[@class=' form-control'])[2]",'TestFernando');
- $I->wait('5');
- $I->click("(//*[@class='iCheck-helper'])[1]");
- $I->click("(//*[@class='iCheck-helper'])[2]");
- $I->click('button.btn.btn-success');
- # Crear Usuarios
- # _________________ No encuentra checkbox _____________________
- $I->amOnUrl('http://base.fd3.flowdat.com/admin/user/create');
- $I->fillField('Nombre de Usuario', 'TestFernando');
- $I->fillField('E-Mail', 'TestFernando@test');
- $I->fillField('Contraseña', 'TestFernando');
- $I->fillField('Nombre', 'TestFernando');
- $I->fillField('Apellido', 'TestFernando');
- # Roles
- $I->click("(//*[@class='iCheck-helper'])[2]");
- $I->click("(//*[@class='iCheck-helper'])[3]");
- $I->click("(//*[@class='iCheck-helper'])[5]");
- $I->fillField('Acción inicial',"\n"."\n");
- $I->fillField('Tenencias', 'Tenencia Base'."\n");
- $I->click('Crear y regresar al listado');
- # Grupos
- $I->amOnUrl('http://base.fd3.flowdat.com/admin/group/create');
- $I->fillField('Nombre de Grupo', 'TestFernando');
- $I->click("(//*[@class='icheckbox_square-blue'])[1]"); # selecciona el checkbox 1
- $I->fillField('Usuarios', 'TestFernando'."\n");
- $I->click('Crear y regresar al listado');
- # Tenencias
- # ________________________ NO BORRA LA TENENCIA DESPUÉS ________________________
- $I->amOnUrl('http://base.fd3.flowdat.com/admin/tenancy/create');
- $I->fillField('Tenencia','TestFernando');
- $I->click("(//*[@class='icheckbox_square-blue'])[1]");
- $I->click('Crear y regresar al listado');
- # Clientes
- $I->amOnUrl('http://base.fd3.flowdat.com/admin/client/client/create');
- $I->fillField('External Id', 'extId_001336');
- $I->fillField('Nombre', 'TestFernando');
- $I->fillField('Companía', 'TestFernando');
- $I->fillField('Comentario', 'TestFernando');
- $I->fillField('Email', 'fernando@interlink.com.ar');
- $I->fillField('Teléfono', '034070304');
- $I->click('Crear y regresar al listado');
- # Dispositivos
- $I->amOnUrl('http://base.fd3.flowdat.com/admin/license/device/create');
- $I->fillField('Id Dispositivo', '342234');
- $I->fillField('Ip', '193.12.29.4');
- $I->click('Crear y regresar al listado');
- # ____________ FTTH _________________
- # ONU
- # ___________________ No me deja crear la ONU para mi cliente TestFernando _______________
- $I->amOnUrl('http://ftth.fd3.flowdat.com/admin/ftth/onu/create');
- $I->click('span.select2-selection__arrow');
- $I->wait('3');
- $I->fillField("//*[@class='select2-search__field']",'TestFernando'."\n");
- $I->wait('3');
- $I->pressKey("//*[@class='select2-search__field']",WebDriverKeys::ENTER);
- $I->wait('3');
- $I->fillField('Número Serie Pon','fhtt041a89pe');
- $I->selectOption('Perfil','1');
- $I->selectOption('NAP','4');
- $I->selectOption('Modelo','1');
- $I->click('Crear y regresar al listado');
- $I->wait('5');
- #$I->click("(//*[@class='icheckbox_square-blue'])[1]");
- # OLT
- # _____________ Crea la OLT NO HABILITADA ___________________
- $I->amOnUrl('http://ftth.fd3.flowdat.com/admin/ftth/olt/create');
- $I->fillField('Nombre', 'TestFernando');
- $I->fillField('Modelo',"\n"."\n");
- $I->click('Crear y regresar al listado');
- $I->wait('1');
- $I->fillField('Ip','195.12.1.6');
- $I->fillField('SSH USER','TestFernando');
- $I->fillField('SSH PASS','TestFernando');
- $I->click('Crear y regresar al listado');
- # Modelo OLT
- $I->amOnUrl('http://ftth.fd3.flowdat.com/admin/ftth/oltmodel/create');
- $I->fillField('Nombre','TestFernando');
- $I->fillField('Propiedades','TestFernando');
- #$I->fillField('Extra Data','TestFernando');
- $I->click('Crear y regresar al listado');
- # Modelo ONU
- $I->amOnUrl('http://ftth.fd3.flowdat.com/admin/ftth/onumodel/create');
- $I->fillField('Nombre','TestFernando');
- $I->fillField('Extra Data','
- {
- "type": "HG260",
- "telnet": "/tmp"
- }');
- $I->click('Crear y regresar al listado');
- # Perfil
- $I->amOnUrl('http://ftth.fd3.flowdat.com/admin/ftth/profile/create');
- $I->fillField('Nombre','TestFernando');
- $I->fillField('Upload','6');
- $I->fillField('Download','10');
- $I->click('Crear y regresar al listado');
- # NAP
- $I->amOnUrl('http://ftth.fd3.flowdat.com/admin/ftth/nap/create');
- $I->fillField('Nombre','TestFernando');
- $I->fillField('Padre','Centro'."\n");
- $I->click('Crear y regresar al listado');
- # Workflow
- $I->amOnUrl('http://ftth.fd3.flowdat.com/admin/workflow/workflow/create');
- $I->fillField('Nombre','TestFernando');
- $I->fillField('Descripción','TestFernando');
- $I->fillField('Supports',"\n"."\n");
- $I->click('Crear y regresar al listado');
- # Action Workflow
- $I->amOnUrl('http://ftth.fd3.flowdat.com/admin/workflow/action/create');
- $I->fillField('Nombre','TestFernando');
- $I->fillField('Evento','enter'."\n");
- $I->fillField('Workflow','TestFernando');
- $I->fillField('Referencia', 'TestFernando');
- $I->fillField('Clase',"\n"."\n");
- $I->fillField("//*[@class='ace_text-input']",'TestFernando');
- $I->click('Crear y regresar al listado');
- # Template
- $I->amOnUrl('http://ftth.fd3.flowdat.com/admin/template/template/create');
- $I->fillField('Nombre','TestFernando');
- $I->fillField('Contenido','TestFernando');
- $I->click('Crear y regresar al listado');
- # ____________ Maps ______________
- # Mapas
- $I->amOnUrl('http://mapas.fd3.flowdat.com/admin/map/map/create');
- # Vectores
- $I->amOnUrl('http://mapas.fd3.flowdat.com/admin/map/vector/create');
- # Objetos
- $I->amOnUrl('http://mapas.fd3.flowdat.com/admin/map/object/create');
- # Tipos
- $I->amOnUrl('http://mapas.fd3.flowdat.com/admin/map/objecttype/create');
- # ________________ STATS ________________________
- # Servidor Dispositivos
- $I->amOnUrl('http://stats.fd3.flowdat.com/admin/stats/deviceserver/create');
- $I->fillField('Nombre','TestFernando');
- $I->fillField('Url','http://base.fd3.flowdat.com/api/devices.json');
- $I->click("//*[@class='icheckbox_square-blue']");
- $I->click('Crear y regresar al listado');
- # Dispositivo
- # ____________ Está roto el formulario ________________________
- $I->amOnUrl('http://stats.fd3.flowdat.com/admin/stats/device/create');
- $I->fillField('Servidor','TestFernando'."\n");
- $I->fillField('Id Dispositivo','3');
- $I->fillField('Tipo Dispositivo',"\n"."\n");
- $I->fillField('Ip','199.29.43.9');
- $I->click('Crear y regresar al listado');
- $I->wait('5');
- }
- }
|