Commit a4e96b6c authored by Mindiell's avatar Mindiell

Travail sur les tests

parent 3753d9e6
Pipeline #1950 failed with stages
in 6 seconds
......@@ -12,5 +12,6 @@ phinx.yml
app/env
.php_cs.cache
tests/_data
tests/_output
tests/_support/_generated
......@@ -35,4 +35,22 @@ class AcceptanceTester extends \Codeception\Actor
$I->click('submit');
$I->see('Se déconnecter', '.navbar');
}
/**
* @Given I am on page :arg1
*/
public function iAmOnPage($arg1)
{
$this->amOnPage($arg1);
}
/**
* @Then I should see :arg1
*/
public function iShouldSee($arg1)
{
$this->see($arg1);
}
}
......@@ -8,5 +8,5 @@ class_name: AcceptanceTester
modules:
enabled:
- PhpBrowser:
url: http://127.0.0.1:8000
url: http://don
- \Helper\Acceptance
<?php
/*
$I = new AcceptanceTester($scenario);
$I->wantTo('Ensure that I can deal with addresses.');
......@@ -46,3 +47,4 @@ $I->submitForm('form#up2', [
$I->amOnPage('/perso');
$I->dontSee('Second address', '#section-addresses');
$I->see('New address name', '#section-addresses');
*/
<?php
$I = new AcceptanceTester($scenario);
$I->wantTo('Ensure that homepage works.');
$I->amOnPage('/');
$I->see('Soutenez La Quadrature du Net !');
<?php
class HomepageCest
{
public function frontpageWorks(AcceptanceTester $I)
{
$I->wantTo('Ensure that homepage works.');
$I->amOnPage('/');
$I->see('Soutenez La Quadrature du Net !');
}
public function faqpageWorks(AcceptanceTester $I)
{
$I->wantTo('Ensure that FAQ works.');
$I->amOnPage('/faq');
$I->see('Foire aux questions');
}
}
<?php
/*
$I = new AcceptanceTester($scenario);
$I->wantTo('Ensure that private profile works.');
$I->login('alice@example.org', 'password');
// Check private profile
$I->amOnPage('/perso');
$I->see('Mes informations personnelles', 'h2');
$I->see('Mes dons', 'h2');
$I->see('Mes contreparties', 'h2');
*/
Feature: visiting
In order to visit the website
As an anonymous user
I need to see the Homepage
Scenario: Visiting the home page
Given I am on page "/"
Then I should see "Soutenez La Quadrature du Net"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment