maximizeWindow(); $cliente = 'test01'; shell_exec('mkdir -p ./tests/_output/debug/User/'); #log in try{ $I->amOnPage('/'); try{ $I->acceptPopup(); }catch(\Exception $e){} $I->see('Nombre de usuario'); $I->fillField('_username', 'TestFernando'); $I->fillField('_password', 'TestFernando'); $I->click('_submit'); $I->wait('3'); }catch(\Exception $e){ $I->makeScreenshot('User/0_login'); } # ____________________ Base _____________________ # Codigos de Autenticación try{ $I->amOnUrl('https://base.'.$cliente.'.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('5'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('User/1_oauthcode'); } # Clientes OAuth try{ $I->amOnUrl('https://base.'.$cliente.'.flowdat.com/admin/base/oauthserver/oauthclient/create'); $I->click('button.btn.btn-success'); $I->wait('5'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('User/2_oauthclient'); } # Tokens de Acceso try{ $I->amOnUrl('https://base.'.$cliente.'.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('5'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('User/3_accesstoken'); } # Tokens de Refresco try{ $I->amOnUrl('https://base.'.$cliente.'.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('5'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('User/4_refreshtoken'); } # Workflow try{ $I->amOnUrl('https://base.'.$cliente.'.flowdat.com/admin/workflow/workflow/create'); $I->fillField('Nombre','fernandotest'); $I->fillField('Descripción', 'FernandoTest'); $I->fillField('Tipo de Workflow', 'workflow'."\n"); $I->fillField('Supports', 'ClientBundle\Entity\Client'."\n"); $I->click('button.btn.btn-success'); $I->wait('18'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('User/5_workflow'); } # Action try{ $I->amOnUrl('https://base.'.$cliente.'.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'); $I->wait('5'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('User/6_action'); } # Alertas try{ $I->amOnUrl('https://base.'.$cliente.'.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'); $I->wait('5'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('User/7_alert'); } # Tipo de Alertas try{ $I->amOnUrl('https://base.'.$cliente.'.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'); $I->wait('5'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('User/8_alerttype'); } # Crear Usuarios try{ $I->amOnUrl('https://base.'.$cliente.'.flowdat.com/admin/user/create'); $I->fillField('Nombre de Usuario', 'TestFernand'); $I->fillField('E-Mail', 'TestFernand@test'); $I->fillField('Contraseña', 'TestFernand'); $I->fillField('Nombre', 'TestFernand'); $I->fillField('Apellido', 'TestFernand'); # 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'); $I->wait('5'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('User/9_user'); } # Grupos try{ $I->amOnUrl('https://base.'.$cliente.'.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'); $I->wait('5'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('User/10_group'); } # Tenencias # ________________________ NO BORRA LA TENENCIA DESPUÉS ________________________ try{ $I->amOnUrl('https://base.'.$cliente.'.flowdat.com/admin/tenancy/create'); $I->fillField('Tenencia','TestFernando'); $I->click("(//*[@class='icheckbox_square-blue'])[1]"); $I->click('Crear y regresar al listado'); $I->wait('5'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('User/11_tenancy'); } # Clientes try{ $I->amOnUrl('https://base.'.$cliente.'.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'); $I->wait('5'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('User/12_client'); } # Dispositivos try{ $I->amOnUrl('https://base.'.$cliente.'.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'); $I->wait('8'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('User/13_device'); } # ____________ FTTH _________________ # ONU # ___________________ No me deja crear la ONU para mi cliente TestFernando _______________ # Clave duplicada try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat.com/admin/ftth/onu/create'); $I->click("//*[@class='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','fhtt041a8pe'); $I->selectOption('Perfil','3'); $I->selectOption('NAP','2'); $I->selectOption('Modelo','2'); $I->wait('3'); # $I->click("(//*[@class='select2-arrow'])[5]"); #$I->wait('3'); # $I->click("(//*[@class='select2-result-label'])[1]"); $I->click('Crear y regresar al listado'); $I->wait('18'); $I->see('ha sido creado con éxito'); #$I->click("(//*[@class='icheckbox_square-blue'])[1]"); }catch(\Exception $e){ $I->makeScreenshot('User/14_onu'); } # OLT # _____________ Crea la OLT NO HABILITADA ___________________ try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat.com/admin/ftth/olt/create'); $I->fillField('Nombre', 'TestFernando'); $I->selectOption('Modelo','FiberHome-AN5516-01'); $I->click('Configuración'); $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'); $I->wait('5'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('User/15_olt'); } # Modelo OLT try{ $I->amOnUrl('https://ftth.'.$cliente.'.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'); $I->wait('5'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('User/16_oltmodel'); } # Modelo ONU try{ $I->amOnUrl('https://ftth.'.$cliente.'.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'); $I->wait('5'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('User/17_onumodel'); } # Perfil try{ $I->amOnUrl('https://ftth.'.$cliente.'.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'); $I->wait('5'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('User/18_profile'); } # NAP try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat.com/admin/ftth/nap/create'); $I->fillField('Nombre','TestFernando'); $I->fillField('Padre','Centro'."\n"); $I->click('Crear y regresar al listado'); $I->wait('5'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('User/19_nap'); } # Workflow try{ $I->amOnUrl('https://ftth.'.$cliente.'.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'); $I->wait('8'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('User/20_workflow'); } # Action Workflow try{ $I->amOnUrl('https://ftth.'.$cliente.'.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'); $I->wait('5'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('User/21_action'); } # Template try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat.com/admin/template/template/create'); $I->fillField('Nombre','TestFernando'); $I->fillField('Contenido','TestFernando'); $I->click('Crear y regresar al listado'); $I->wait('5'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('User/22_template'); } /* # ____________ Maps ______________ # Mapas $I->amOnUrl('https://mapas.'.$cliente.'.flowdat.com/admin/map/map/create'); # Vectores $I->amOnUrl('https://mapas.'.$cliente.'.flowdat.com/admin/map/vector/create'); # Objetos $I->amOnUrl('https://mapas.'.$cliente.'.flowdat.com/admin/map/object/create'); # Tipos $I->amOnUrl('https://mapas.'.$cliente.'.flowdat.com/admin/map/objecttype/create'); */ # ________________ STATS ________________________ # Servidor Dispositivos # $I->amOnUrl('https://stats.'.$cliente.'.flowdat.com/admin/stats/deviceserver/create'); # $I->fillField('Nombre','TestFernando'); # $I->fillField('Url','https://base.'.$cliente.'.flowdat.com/api/devices.json'); # $I->click("//*[@class='icheckbox_square-blue']"); # $I->click('Crear y regresar al listado'); # $I->wait('5'); # $I->see('ha sido creado con éxito'); # Dispositivo # ____________ Está roto el formulario ________________________ # $I->amOnUrl('https://stats.'.$cliente.'.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'); # $I->see('ha sido creado con éxito'); } }