浏览代码

Onu test & map test

Fernando Alonso 8 年之前
父节点
当前提交
d24710727a

文件差异内容过多而无法显示
+ 0 - 1179
behat/testScreenshot/tests/_output/SecondCest.frontpageWorks.fail.html


二进制
behat/testScreenshot/tests/_output/SecondCest.frontpageWorks.fail.png


二进制
behat/testScreenshot/tests/_output/debug/form1.png


二进制
behat/testScreenshot/tests/_output/debug/form2.png


+ 33 - 0
behat/testScreenshot/tests/acceptance/ClientCest.php

@@ -0,0 +1,33 @@
+<?php
+use Codeception\Util\Locator;
+class ClientCest
+{
+	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('5');
+		$I->seeInTitle('Administrador Panel principal');
+
+#crea el Cliente
+		$I->amOnPage('/admin/client/client/create');
+$I->wait('5');
+		$I->see('External Id');
+		$I->fillField('External Id', 'extid_001338');
+		$I->fillField('Nombre', 'TestFer');
+		$I->fillField('Companía', 'Interlink');
+		$I->fillField('Comentario', 'Test');
+		$I->fillField('Email', 'fernandoik@interlink.com');
+		$I->fillField('Teléfono', '03407138383');	
+		$I->makeScreenshot('form1');
+		$I->click('btn_create_and_list');
+$I->wait('5');
+#		$I->see('El elemento "TestFer" ha sido creado con éxito');
+
+	}
+
+}

+ 33 - 0
behat/testScreenshot/tests/acceptance/MapCest.php

@@ -0,0 +1,33 @@
+<?php
+use Codeception\Util\Locator;
+class MapCest
+{
+	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('5');
+		$I->seeInTitle('Administrador Panel principal');
+
+#Crear capa
+		$I->amOnUrl('http://mapas.fd3.flowdat.com/admin/map/layer/create');
+$I->wait('5');		
+		$I->seeInTitle('Administrador Crear');
+		$I->fillField('Nombre','TestFer');
+
+		$I->fillField('Mapa', 'Galvez, Santa Fe'."\n\t");
+
+		$I->fillField('Vectors','New Rectangle'."\n");
+
+		$I->fillField('Data','Test data');
+		$I->fillField('Índice Z','10');
+		$I->click('Crear y regresar al listado');
+$I->wait('5');		
+
+	}
+
+}

+ 70 - 0
behat/webdriver/tests/acceptance/OnuCest.php

@@ -0,0 +1,70 @@
+<?php
+
+class OnuCest
+{
+	public function frontpageWorks(AcceptanceTester $I)
+	{
+		$I->amOnPage('/');
+		$I->see('Nombre de usuario');
+		$I->fillField('_username', 'admin');
+		$I->fillField('_password', 'adminpass');
+		$I->click('_submit');
+		$I->see('Administrador Panel principal');
+		$I->amOnPage('/admin/client/client/create');
+#crea el Cliente
+		$I->see('External Id');
+		$I->fillField('External Id', 'extid_001338');
+		$I->fillField('Nombre', 'TestFer');
+		$I->fillField('Companía', 'Interlink');
+		$I->fillField('Comentario', 'Test');
+		$I->fillField('Email', 'fernandoik@interlink.com');
+		$I->fillField('Teléfono', '03407138383');	
+		$I->click('btn_create_and_list');
+#		$I->see('El elemento "TestFer" ha sido creado con éxito');
+
+		$I->amOnUrl('http://ftth.fd3.flowdat.com/admin/ftth/onu/create');
+
+$uri = $I->grabFromCurrentUrl();
+echo $uri . "\n";
+
+$I->see('Administrador Crear');
+
+		$I->sendAjaxGetRequest('http://ftth.fd3.flowdat.com/ajax_client_list?q=TestFer'."\n", array('notifications' => true));
+
+#		$I->selectOption('Cliente', array('value' => '1476'));
+#$I->see('TestFer');
+
+		$I->fillField('Número Serie Pon', '0002');
+		$I->selectOption('Perfil',array('value' => '3'));
+		$I->selectOption('NAP',array('value' => '1'));
+		$I->selectOption('Modelo',array('value' => '1'));
+		$I->fillField('Número Serie','12345');
+		$I->fillField('Mac','01');
+		$I->selectOption('OLT',array('value' => '4'));
+	
+		$I->click('Crear y regresar al listado');
+
+$uri = $I->grabFromCurrentUrl();
+echo $uri . "\n";
+
+$I->see('Máxima cantidad de ONU por NAP.');
+		
+#$I->selectOption('Cliente', array('text' => 'TestFer'));
+
+#		$I->fillField('Nombre', 'TestFer');
+#		$I->fillField('Companía', 'Interlink');
+#		$I->fillField('Comentario', 'Test');
+#		$I->fillField('Email', 'fernandoik@interlink.com');
+#		$I->fillField('Teléfono', '03407138383');	
+#		$I->click('btn_create_and_create');
+#		$I->see('El elemento "TestFer" ha sido creado con éxito');
+#		$I->amOnPage('/admin/client/client/list');
+#		$I->see('Administrador - Listado Clientes');
+#		$I->fillField(array('id' => 'filter_externalId_value'),'extid_001338');
+#		$I->click('Filtrar');
+#		$I->see('TestFer');
+#		$I->click('Borrar');
+#		$I->click('Sí, borrar');
+	}
+
+}