<?php | |||||
return [ | |||||
'components' => [ | |||||
'view' => [ | |||||
'class' => 'common\components\ViewBackend', | |||||
], | |||||
], | |||||
]; |
/** | /** | ||||
* Application configuration for all backend test types | * Application configuration for all backend test types | ||||
*/ | */ | ||||
return []; | |||||
return [ | |||||
'components' => [ | |||||
'view' => [ | |||||
'class' => 'common\components\ViewBackend', | |||||
], | |||||
], | |||||
]; |
* Application configuration for all frontend test types | * Application configuration for all frontend test types | ||||
*/ | */ | ||||
return []; | |||||
return [ | |||||
'components' => [ | |||||
'view' => [ | |||||
'class' => 'common\components\ViewFrontend', | |||||
], | |||||
], | |||||
]; |
* Application configuration for all frontend test types | * Application configuration for all frontend test types | ||||
*/ | */ | ||||
return []; | |||||
return [ | |||||
'components' => [ | |||||
'view' => [ | |||||
'class' => 'producer\components\ProducerView', | |||||
], | |||||
], | |||||
]; |
$contactPage = ContactPage::openBy($I); | $contactPage = ContactPage::openBy($I); | ||||
$I->wantTo("m'assurer que le formulaire de contact fonctionne"); | $I->wantTo("m'assurer que le formulaire de contact fonctionne"); | ||||
$I->see('Me contacter', 'h1'); | |||||
$I->see('Contact', 'h1'); | |||||
$I->amGoingTo("envoyer un message"); | $I->amGoingTo("envoyer un message"); | ||||
$contactPage->submit([ | $contactPage->submit([ | ||||
'body' => 'Message', | 'body' => 'Message', | ||||
'isTest' => 'isTest' | 'isTest' => 'isTest' | ||||
]); | ]); | ||||
$I->see('Votre message a bien été envoyé', '.alert-success'); | |||||
$I->see('Merci pour votre message', '.alert-success'); |
$I = new FunctionalTester($scenario); | $I = new FunctionalTester($scenario); | ||||
$I->wantTo("m'assurer que la page d'accueil s'affiche"); | $I->wantTo("m'assurer que la page d'accueil s'affiche"); | ||||
$I->amOnPage('site/index'); | $I->amOnPage('site/index'); | ||||
$I->see('distribution alimentaire', 'h1'); | |||||
$I->see('Fonctionnalités', '.the-title'); | |||||
$I->see('Tarifs', '.the-title'); | |||||
$I->see('un outil pour organiser des ventes en circuit court', 'h1'); |
<?php | |||||
use tests\codeception\frontend\FunctionalTester; | |||||
/* @var $scenario Codeception\Scenario */ | |||||
$I = new FunctionalTester($scenario); | |||||
$I->wantTo("m'assurer que la page des tarifs s'affiche"); | |||||
$I->amOnPage('site/prices'); | |||||
$I->see('Tarifs', 'h1'); |
<?php | |||||
use tests\codeception\frontend\FunctionalTester; | |||||
/* @var $scenario Codeception\Scenario */ | |||||
$I = new FunctionalTester($scenario); | |||||
$I->wantTo("m'assurer que la page 'fonctionnalités, services & tarifs' fonctionne"); | |||||
$I->amOnPage('site/service'); | |||||
$I->see('Fonctionnalités, services & tarifs', 'h1'); |
'id_producer' => '32', | 'id_producer' => '32', | ||||
'is_test' => 'isTest' | 'is_test' => 'isTest' | ||||
]); | ]); | ||||
$I->see('Inscription confirmée', 'h1'); | |||||
$I->see('Votre inscription a bien été prise en compte', '.alert-success'); | |||||
$I->amOnPage('logout'); | $I->amOnPage('logout'); | ||||
$I->see('distribution alimentaire', 'h1'); | |||||
$I->see('un outil pour organiser des ventes en circuit court', 'h1'); | |||||
$I->amOnPage($signupPage->route); | $I->amOnPage($signupPage->route); | ||||
'cgv' => '1', | 'cgv' => '1', | ||||
'is_test' => 'isTest' | 'is_test' => 'isTest' | ||||
]); | ]); | ||||
$I->see('Inscription confirmée', 'h1'); | |||||
$I->see('Votre inscription a bien été prise en compte', '.alert-success'); |