Bläddra i källkod

Tests : remise en place tests fonctionnels déjà écrits

feature/souke
Guillaume Bourgeois 1 år sedan
förälder
incheckning
1b2786b8d3
9 ändrade filer med 46 tillägg och 20 borttagningar
  1. +9
    -0
      backend/config/test-local.php
  2. +8
    -1
      tests/codeception/config/backend/config.php
  3. +7
    -1
      tests/codeception/config/frontend/config.php
  4. +7
    -1
      tests/codeception/config/producer/config.php
  5. +2
    -2
      tests/codeception/frontend/functional/ContactCept.php
  6. +1
    -3
      tests/codeception/frontend/functional/HomeCept.php
  7. +0
    -9
      tests/codeception/frontend/functional/PricesCept.php
  8. +9
    -0
      tests/codeception/frontend/functional/ServiceCept.php
  9. +3
    -3
      tests/codeception/frontend/functional/SignupCept.php

+ 9
- 0
backend/config/test-local.php Visa fil

@@ -0,0 +1,9 @@
<?php

return [
'components' => [
'view' => [
'class' => 'common\components\ViewBackend',
],
],
];

+ 8
- 1
tests/codeception/config/backend/config.php Visa fil

@@ -2,4 +2,11 @@
/**
* Application configuration for all backend test types
*/
return [];

return [
'components' => [
'view' => [
'class' => 'common\components\ViewBackend',
],
],
];

+ 7
- 1
tests/codeception/config/frontend/config.php Visa fil

@@ -3,4 +3,10 @@
* Application configuration for all frontend test types
*/

return [];
return [
'components' => [
'view' => [
'class' => 'common\components\ViewFrontend',
],
],
];

+ 7
- 1
tests/codeception/config/producer/config.php Visa fil

@@ -3,4 +3,10 @@
* Application configuration for all frontend test types
*/

return [];
return [
'components' => [
'view' => [
'class' => 'producer\components\ProducerView',
],
],
];

+ 2
- 2
tests/codeception/frontend/functional/ContactCept.php Visa fil

@@ -9,7 +9,7 @@ $I = new FunctionalTester($scenario);
$contactPage = ContactPage::openBy($I);

$I->wantTo("m'assurer que le formulaire de contact fonctionne");
$I->see('Me contacter', 'h1');
$I->see('Contact', 'h1');

$I->amGoingTo("envoyer un message");
$contactPage->submit([
@@ -19,4 +19,4 @@ $contactPage->submit([
'body' => 'Message',
'isTest' => 'isTest'
]);
$I->see('Votre message a bien été envoyé', '.alert-success');
$I->see('Merci pour votre message', '.alert-success');

+ 1
- 3
tests/codeception/frontend/functional/HomeCept.php Visa fil

@@ -6,6 +6,4 @@ use tests\codeception\frontend\FunctionalTester;
$I = new FunctionalTester($scenario);
$I->wantTo("m'assurer que la page d'accueil s'affiche");
$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');

+ 0
- 9
tests/codeception/frontend/functional/PricesCept.php Visa fil

@@ -1,9 +0,0 @@
<?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');

+ 9
- 0
tests/codeception/frontend/functional/ServiceCept.php Visa fil

@@ -0,0 +1,9 @@
<?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');

+ 3
- 3
tests/codeception/frontend/functional/SignupCept.php Visa fil

@@ -23,11 +23,11 @@ $signupPage->submit([
'id_producer' => '32',
'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->see('distribution alimentaire', 'h1');
$I->see('un outil pour organiser des ventes en circuit court', 'h1');


$I->amOnPage($signupPage->route);
@@ -47,4 +47,4 @@ $signupPage->submit([
'cgv' => '1',
'is_test' => 'isTest'
]);
$I->see('Inscription confirmée', 'h1');
$I->see('Votre inscription a bien été prise en compte', '.alert-success');

Laddar…
Avbryt
Spara