Skip to content
Snippets Groups Projects
Commit 1caaf094 authored by Luquor's avatar Luquor
Browse files

Tests' implementation

parent 172beffe
No related branches found
No related tags found
No related merge requests found
Pipeline #11099 failed
...@@ -11,8 +11,38 @@ class PremierCest ...@@ -11,8 +11,38 @@ class PremierCest
{ {
} }
// tests
public function tryToTest(AcceptanceTester $I) /**
* Test if the home page is accessible by seeking the word "Example :" in the page
*/
public function homePageTest(AcceptanceTester $I)
{ {
$I->amOnPage('/');
$I->see('Example :');
}
/**
* Test if there is a changement in the page when the form is filled and the button is clicked
*/
public function fillFormTest(AcceptanceTester $I)
{
$I->amOnPage('/');
$I->fillField('question', 'Check if word is a palindromic word');
$I->click('Envoyer');
$I->see('Request :');
}
/**
* Test if the code is generated when the form is filled by seeking in the source
* This is the only way to test if the code is generated because the code is generated in a textarea
*/
public function checkAnswerTest(AcceptanceTester $I)
{
$I->amOnPage('/');
$I->fillField('question', 'Check if word is a palindromic word');
$I->click('Envoyer');
$I->seeInSource('public');
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment