maximizeWindow(); $cliente = "fd3"; shell_exec('mkdir -p ./tests/_output/debug/03_Add_FTTH/'); #log in try{ $I->amOnPage('/'); try{ $I->acceptPopup(); }catch(\Exception $e){} $I->see('Nombre de usuario'); $I->fillField('_username', 'admin'); $I->fillField('_password', 'admin'); #$I->click("//*[@title='Close Toolbar']"); $I->click('_submit'); $I->wait('5'); }catch(\Exception $e){ $I->makeScreenshot('03_Add_FTTH/0_login'); } # ____________ FTTH _________________ # Modelo OLT try{ try{ $I->acceptPopup(); }catch(\Exception $e){} $I->amOnUrl('https://ftth.'.$cliente.'.flowdat.com/admin/ftth/oltmodel/create'); try{ $I->acceptPopup(); }catch(\Exception $e){} $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('03_Add_FTTH/1_oltmodel'); } # Modelo ONU try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat.com/admin/ftth/onumodel/create'); try{ $I->acceptPopup(); }catch(\Exception $e){ } $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('03_Add_FTTH/2_onumodel'); } # Plantilla ONU try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat.com/admin/ftth/onutemplate/create'); try{ $I->acceptPopup(); }catch(\Exception $e){} $I->fillField('Modelo','FiberHome-AN5506-04-b2'."\n"); $I->fillField('Perfil','Base'."\n"); $I->click('Crear y regresar al listado'); $I->wait('5'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('03_Add_FTTH/3_plantillaONU'); } # Perfil try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat.com/admin/ftth/profile/create'); try{ $I->acceptPopup(); }catch(\Exception $e){ } $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('03_Add_FTTH/3_profile'); } # OLT # _____________ Crea la OLT NO HABILITADA ___________________ try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat.com/admin/ftth/olt/create'); try{ $I->acceptPopup(); }catch(\Exception $e){ } $I->fillField('Nombre', 'TestFernando'); $I->fillField('Modelo','FiberHome-AN5516-01'."\n"); $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('Mapa'); $I->wait('3'); $I->fillField("//*[@id='searchtext9']",'Mariano Moreno 900, Rosario'."\n"."\n"); $I->click("//*[@id='searchtext9']"); $I->pressKey("//*[@id='searchtext9']", WebDriverKeys::ENTER); $I->wait('3'); $I->click('Crear y regresar al listado'); $I->wait('10'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('03_Add_FTTH/4_olt'); } # NAP try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat.com/admin/ftth/nap/create'); try{ $I->acceptPopup(); }catch(\Exception $e){ } $I->fillField('Nombre','TestFernando'); # $I->fillField('Padre','Centro'."\n"); $I->fillField('OLT', 'TestFernando'."\n"); $I->fillField('Slot', '5'); $I->fillField('Link', '5'); $I->click('Mapa'); $I->wait('3'); $I->fillField("//*[@id='searchtext9']",'Mariano Moreno 500, Rosario'."\n"."\n"); $I->click("//*[@id='searchtext9']"); $I->pressKey("//*[@id='searchtext9']", WebDriverKeys::ENTER); $I->wait('3'); $I->click('Crear y regresar al listado'); $I->wait('8'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('03_Add_FTTH/5_nap'); } # 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'); try{ $I->acceptPopup(); }catch(\Exception $e){ } $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->click("//*[@title='Close Toolbar']"); $I->fillField('Identificador','fhtt041a89pe'); $I->fillField('Perfil','Base'."\n"); $I->fillField('NAP','TestFernando'."\n"); $I->fillField('Modelo','TestFernando'."\n"); $I->wait('3'); $I->click('Avanzado'); $I->wait('8'); $I->fillField('Número Serie', '1234567890987654'); $I->fillField('Número Serie Pon', '123456789098'); # $I->fillField('Mac', 'fd34sd24fgr4'); $I->fillField('OLT', 'TestFernando'."\n"); $I->click('Mapa'); $I->wait('3'); $I->fillField("//*[@id='searchtext9']",'Mariano Moreno 535, Rosario'."\n"."\n"); $I->click("//*[@id='searchtext9']"); $I->pressKey("//*[@id='searchtext9']", WebDriverKeys::ENTER); $I->wait('3'); $I->click('Crear y regresar al listado'); $I->wait('18'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('03_Add_FTTH/6_onu'); } # ONU 2 # ___________________ No me deja crear la ONU para mi cliente TestFernando _______________ # Clave duplicada try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat.com/admin/ftth/onu/create'); try{ $I->acceptPopup(); }catch(\Exception $e){ } $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->click("//*[@title='Close Toolbar']"); $I->fillField('Identificador','fhtt041a89pf'); $I->fillField('Perfil','Base'."\n"); $I->fillField('NAP','TestFernando'."\n"); $I->fillField('Modelo','TestFernando'."\n"); $I->wait('3'); $I->click('Avanzado'); $I->wait('8'); $I->fillField('Número Serie', '1234567890987653'); $I->fillField('Número Serie Pon', '123456789097'); # $I->fillField('Mac', 'fd34sd24fgf2'); $I->fillField('OLT', 'TestFernando'."\n"); $I->click('Mapa'); $I->wait('3'); $I->fillField("//*[@id='searchtext9']",'Mariano Moreno 525, Rosario'."\n"."\n"); $I->click("//*[@id='searchtext9']"); $I->pressKey("//*[@id='searchtext9']", WebDriverKeys::ENTER); $I->wait('3'); $I->click('Crear y regresar al listado'); $I->wait('18'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('03_Add_FTTH/7_onu2'); } # Workflow try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat.com/admin/workflow/workflow/create'); try{ $I->acceptPopup(); }catch(\Exception $e){ } $I->fillField('Nombre','testfernando'); $I->fillField('Descripción','TestFernando'); $I->fillField('Supports',"\n"."\n"); $I->click('Crear y regresar al listado'); $I->wait('15'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('03_Add_FTTH/8_workflow'); } # Action Workflow try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat.com/admin/workflow/action/create'); try{ $I->acceptPopup(); }catch(\Exception $e){ } $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('03_Add_FTTH/9_action'); } # Template try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat.com/admin/template/template/create'); try{ $I->acceptPopup(); }catch(\Exception $e){ } $I->fillField('Nombre','TestFernando'); $I->fillField('Contenido','TestFernandoTest'); $I->click('Crear y regresar al listado'); $I->wait('5'); $I->see('ha sido creado con éxito'); }catch(\Exception $e){ $I->makeScreenshot('03_Add_FTTH/10_template'); } /* # ____________ Maps ______________ # Mapas $I->amOnUrl('https://mapas.fd3.flowdat.com/admin/map/map/create'); # Vectores $I->amOnUrl('https://mapas.fd3.flowdat.com/admin/map/vector/create'); # Objetos $I->amOnUrl('https://mapas.fd3.flowdat.com/admin/map/object/create'); # Tipos $I->amOnUrl('https://mapas.fd3.flowdat.com/admin/map/objecttype/create'); */ # ________________ STATS ________________________ # Servidor Dispositivos # $I->amOnUrl('https://stats.fd3.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.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'); # $I->see('ha sido creado con éxito'); # SELECT * FROM `GuiaTelefonica` WHERE NOT `ciudad` IN (SELECT `ciudad` FROM `Prefijo`) # UPDATE `GuiaTelefonica` SET `ciudad`='San Jeronimo del Sauce' WHERE ciudad='San Jerónimo del Sauce' # INSERT INTO GuiaTelefonica(nombre, direccion, ciudad, telefono, prefijo) # SELECT nombre, direccion, ciudad, telefono, prefijo FROM TREntry try{ $I->acceptPopup(); }catch(\Exception $e){} } }