More tests

This commit is contained in:
Matteo Gheza 2020-06-09 22:44:56 +02:00
parent 88af2e6573
commit c78953564b
2 changed files with 46 additions and 2 deletions

View File

@ -335,7 +335,8 @@ CREATE TABLE `".$prefix."_dbversion` (
PRIMARY KEY (`id`),
KEY `Id` (`id`)
)ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `".$prefix."_dbversion` (`version`, `timestamp`) VALUES('1', current_timestamp());");
INSERT INTO `".$prefix."_dbversion` (`version`, `timestamp`) VALUES('1', current_timestamp());
INSERT INTO `".$prefix."_tipo` (`id`, `name`) VALUES (NULL, 'type1'), (NULL, 'type2');");
} catch (Exception $e) {
if(is_cli()){
echo($e);

View File

@ -2,7 +2,7 @@
class FirstCest
{
public function frontpageWorks(AcceptanceTester $I)
public function installWorks(AcceptanceTester $I)
{
$I->amOnPage('/install/install.php');
$I->click('Invia');
@ -28,5 +28,48 @@ class FirstCest
$I->seeCurrentURLEquals('/lista.php');
$I->see('admin_user');
}
public function logsWorks(AcceptanceTester $I)
{
$I->amOnPage('/');
$I->amOnPage('/lista.php');
$I->click('Attivo');
$I->click('Log');
$I->seeCurrentURLEquals('/log.php');
$I->see('Attivazione disponibilita\'');
$I->click('Lista Disponibilità');
$I->seeCurrentURLEquals('/lista.php');
$I->click('Non Attivo');
$I->seeCurrentURLEquals('/lista.php');
$I->click('Log');
$I->seeCurrentURLEquals('/log.php');
$I->see('Rimozione disponibilita\'');
}
public function interventiWorks(AcceptanceTester $I)
{
/**
* @var FakerGenerator
*/
/* TODO: Add more users
$faker = \Faker\Factory::create();
$I->amOnPage('/lista.php');
$I->click('Interventi');
$I->seeCurrentURLEquals('/interventi.php');
$I->click('add intervento');
$I->seeCurrentURLEquals('/modifica_intervento.php');
$I->fillField('data', '2020-01-01');
$I->fillField('uscita', '12:12');
$I->fillField('rientro', '14:14');
//TODO: check options
$I->type('luogo', $faker->word);
$I->type('note', $faker->word);
$I->click('invia');
$I->seeCurrentURLEquals('/interventi.php');
$I->see('type2');
*/
}
}