Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
APIChatGPT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Arrêt du service - 27/06 de 07h45 à 08h00 - Mise à jour de sécurité
Show more breadcrumbs
SIGNORELLI Lucas
APIChatGPT
Commits
1caaf094
Commit
1caaf094
authored
2 years ago
by
Luquor
Browse files
Options
Downloads
Patches
Plain Diff
Tests' implementation
parent
172beffe
No related branches found
No related tags found
No related merge requests found
Pipeline
#11099
failed
2 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/Acceptance/PremierCest.php
+32
-2
32 additions, 2 deletions
tests/Acceptance/PremierCest.php
with
32 additions
and
2 deletions
tests/Acceptance/PremierCest.php
+
32
−
2
View file @
1caaf094
...
@@ -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'
);
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment