Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LQDN Adminsys
don
Commits
a4e96b6c
Commit
a4e96b6c
authored
Jul 22, 2018
by
Mindiell
Browse files
Travail sur les tests
parent
3753d9e6
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
a4e96b6c
...
...
@@ -12,5 +12,6 @@ phinx.yml
app/env
.php_cs.cache
tests/_data
tests/_output
tests/_support/_generated
tests/_support/AcceptanceTester.php
View file @
a4e96b6c
...
...
@@ -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
);
}
}
tests/acceptance.suite.yml
View file @
a4e96b6c
...
...
@@ -8,5 +8,5 @@ class_name: AcceptanceTester
modules
:
enabled
:
-
PhpBrowser
:
url
:
http://
127.0.0.1:8000
url
:
http://
don
-
\Helper\Acceptance
tests/acceptance/AddressCept.php
View file @
a4e96b6c
<?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');
*/
tests/acceptance/HomepageCept.php
deleted
100644 → 0
View file @
3753d9e6
<?php
$I
=
new
AcceptanceTester
(
$scenario
);
$I
->
wantTo
(
'Ensure that homepage works.'
);
$I
->
amOnPage
(
'/'
);
$I
->
see
(
'Soutenez La Quadrature du Net !'
);
tests/acceptance/HomepageCest.php
0 → 100644
View file @
a4e96b6c
<?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'
);
}
}
tests/acceptance/PrivateProfileCept.php
View file @
a4e96b6c
<?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');
*/
tests/acceptance/visiting.feature
0 → 100644
View file @
a4e96b6c
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"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment