Explorar o código

dhcp test y mapas

Fernando Alonso %!s(int64=7) %!d(string=hai) anos
pai
achega
b0245399fd

+ 85 - 17
behat/abm_fd3/tests/acceptance/1_baseCest.php

@@ -15,13 +15,14 @@ try{
 		$I->see('Nombre de usuario');
 		$I->fillField('_username', 'admin');
 		$I->fillField('_password', 'admin');
+$I->click("//*[@title='Close Toolbar']");
 		$I->click('_submit');
 		$I->wait('3');
 	}catch(\Exception $e){
 		$I->makeScreenshot('Add/0_login');
 	}
 
-
+/*
 # ____________________ Base _____________________
 
 # Codigos de Autenticación
@@ -77,6 +78,7 @@ try{
 	}catch(\Exception $e){
 		$I->makeScreenshot('Add/4_refreshtoken');
 	}
+*/
 # Workflow
 
 try{
@@ -187,6 +189,7 @@ try{
 	}catch(\Exception $e){
 		$I->makeScreenshot('Add/11_tenancy');
 	}
+
 # Clientes
 
 try{
@@ -197,12 +200,21 @@ try{
 		$I->fillField('Comentario', 'TestFernando');
 		$I->fillField('Email', 'fernando@interlink.com.ar');
 		$I->fillField('Teléfono', '034070304');
+
+$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('5');
+		$I->wait('8');
 		$I->see('ha sido creado con éxito');
 	}catch(\Exception $e){
 		$I->makeScreenshot('Add/12_client');
 	}
+
 # Dispositivos
 
 try{
@@ -217,13 +229,13 @@ try{
 	}
 # ____________ FTTH _________________
 
-
 # Modelo OLT
 
 try{
 		$I->amOnUrl('http://ftth.'.$cliente.'.flowdat.com/admin/ftth/oltmodel/create');
 		$I->fillField('Nombre','TestFernando');
 		$I->fillField('Propiedades','TestFernando');
+$I->click("//*[@title='Close Toolbar']");
 		#$I->fillField('Extra Data','TestFernando');
 		$I->click('Crear y regresar al listado');
 		$I->wait('5');
@@ -263,8 +275,6 @@ try{
 		$I->makeScreenshot('Add/16_profile');
 	}
 
-
-
 # OLT
 # _____________ Crea la OLT NO HABILITADA ___________________
 
@@ -278,29 +288,44 @@ try{
 		$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('5');
+		$I->wait('10');
 		$I->see('ha sido creado con éxito');
 	}catch(\Exception $e){
 		$I->makeScreenshot('Add/17_olt');
 	}
 
-
 # NAP
 
 try{
 		$I->amOnUrl('http://ftth.'.$cliente.'.flowdat.com/admin/ftth/nap/create');
 		$I->fillField('Nombre','TestFernando');
 #		$I->fillField('Padre','Centro'."\n");
+		$I->fillField('OLT', 'TestFernando'."\n");
+		$I->fillField('Slot', '5');
+		$I->fillField('Link', '5');
 
-		$I->click('Crear y regresar al listado');
-		$I->wait('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('Add/18_nap');
 	}
-	
-
 
 # ONU
 # ___________________ No me deja crear la ONU para mi cliente TestFernando _______________
@@ -313,30 +338,73 @@ try{
 		$I->wait('3');
 		$I->click("//*[@class='ui-corner-all']");
 		$I->wait('3');
+#$I->click("//*[@title='Close Toolbar']");
 		$I->fillField('Número Serie Pon','fhtt041a89pe');
 		$I->fillField('Perfil','Base'."\n");
 		$I->fillField('NAP','TestFernando'."\n");
 		$I->fillField('Modelo','TestFernando'."\n");
 $I->wait('3');
+
 		$I->click('Avanzado');
-$I->wait('5');
-		$I->fillField('Número Serie', '234234232');
+$I->wait('8');
+#		$I->fillField('Número Serie', '2342342');
 		$I->fillField('Mac', 'fd34sd24fgr4');
 		$I->fillField('OLT', 'TestFernando'."\n");
 
-#			$I->click("(//*[@class='select2-arrow'])[5]");
-#$I->wait('3');
-#			$I->click("(//*[@class='select2-result-label'])[1]");
+$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');
 
-#$I->click("(//*[@class='icheckbox_square-blue'])[1]");
 }catch(\Exception $e){
 	$I->makeScreenshot('Add/19_onu');
 }
 
+# ONU 2
+# ___________________ No me deja crear la ONU para mi cliente TestFernando _______________
+# Clave duplicada
+
+try{
+		$I->amOnUrl('http://ftth.'.$cliente.'.flowdat.com/admin/ftth/onu/create');
+		$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('Número Serie Pon','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', '2342342');
+		$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('Add/19_onu2');
+}
+
 
 # Workflow
 

+ 4 - 5
behat/abm_fd3/tests/acceptance/1_dhcpCest.php

@@ -99,7 +99,7 @@ try{
 
 try{
 		$I->amOnUrl('http://dhcp.' . $cliente . '.flowdat.com/admin/ipv4/subnet/create');
-		$I->fillField('Dirección', '255.0.0.0/24');
+		$I->fillField('Dirección', '200.50.160.0/24');
 		$I->fillField('Opciones', 'Test Fernando');
 		$I->fillField('Tipo de Host permitido', 'TestFernando'."\n");
 		$I->fillField('Grupo de red', 'TestFernando'."\n");
@@ -117,11 +117,10 @@ try{
 try{
 		$I->amOnUrl('http://dhcp.' . $cliente . '.flowdat.com/admin/ipv4/pool/create');
 		$I->fillField('Nombre', 'TestFernando');
-		$I->fillField('Primer IP', '12.9.9.1');
-		$I->fillField('Última IP', '12.9.9.100');
-		$I->fillField('Subred', '255.0.0.0/0'."\n");
+		$I->fillField('Primer IP', '200.50.160.1');
+		$I->fillField('Última IP', '200.50.160.254');
+		$I->fillField('Subred', '200.50.160.0/24'."\n");
 		$I->fillField('Prioridad', '2');
-
 		$I->click('button.btn.btn-success');
 		$I->wait('5');
 		$I->see('ha sido creado con éxito');

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 1
behat/abm_fd3/tests/acceptance/2_deleteCest.php


+ 1 - 1
behat/abm_fd3/tests/acceptance/2_deleteDHCPCest.php

@@ -111,7 +111,7 @@ try{
 # Subred
 
 try{
-		$I->amOnUrl('http://dhcp.'.$cliente.'.flowdat.com/admin/ipv4/subnet/list?filter%5Baddress%5D%5Btype%5D=&filter%5Baddress%5D%5Bvalue%5D=255.255.255.0&filter%5Boptions%5D%5Btype%5D=&filter%5Boptions%5D%5Bvalue%5D=&filter%5B_page%5D=1&filter%5B_sort_by%5D=id&filter%5B_sort_order%5D=ASC&filter%5B_per_page%5D=32');
+		$I->amOnUrl('http://dhcp.'.$cliente.'.flowdat.com/admin/ipv4/subnet/list?filter%5Baddress%5D%5Btype%5D=&filter%5Baddress%5D%5Bvalue%5D=200.50.160.0%2F24&filter%5Boptions%5D%5Btype%5D=&filter%5Boptions%5D%5Bvalue%5D=&filter%5B_page%5D=1&filter%5B_sort_by%5D=id&filter%5B_sort_order%5D=ASC&filter%5B_per_page%5D=32');
 		$I->click("//*[@class='iCheck-helper']");
 		$I->click('input.btn.btn-small.btn-primary');
 		$I->wait('5');