-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat (afup#1110): functional test Divers Sponsors
- Loading branch information
Showing
2 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
use Phinx\Seed\AbstractSeed; | ||
|
||
class NiveauPartenariat extends AbstractSeed | ||
{ | ||
public function run() | ||
{ | ||
$data = [ | ||
['titre' => 'Platine'], | ||
['titre' => 'Or'], | ||
['titre' => 'Argent'], | ||
['titre' => 'Bronze'], | ||
]; | ||
|
||
$table = $this->table('afup_niveau_partenariat'); | ||
$table->truncate(); | ||
|
||
$table | ||
->insert($data) | ||
->save(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Feature: Administration - Sponsors/Partenaires | ||
|
||
@reloadDbWithTestData | ||
Scenario: Afficher Sponsors/Partenaires création / modification / suppression | ||
Given I am logged in as admin and on the Administration | ||
And I follow "Sponsors/Partenaires" | ||
Then I should see "Liste des sponsors/partenaires de forum" | ||
And I should see "Aucun inscrit" | ||
# Création | ||
When I follow "Ajouter un partenaire" | ||
Then I should see "Ajouter un partenaire" | ||
# Choix du Forum | ||
And I fill in "id_forum" with "1" | ||
# Choix du niveau Or | ||
And I fill in "id_niveau_partenariat" with "2" | ||
And I fill in "ranking" with "42" | ||
And I fill in "nom" with "Un partenaire en Or" | ||
And I fill in "presentation" with "La présentation du partenaire en Or" | ||
And I fill in "site" with "https://www.exemple.com" | ||
And I attach the file "avatar1.png" to "logo" | ||
When I press "Soumettre" | ||
# Liste | ||
Then the ".content .message" element should contain "Le partenaire a été ajouté" | ||
And I should see "forum Or Un partenaire en Or https://www.exemple.com avatar1.png 42" | ||
# Modification | ||
When I follow "Modifier le partenaire Un partenaire en Or" | ||
Then I should see "Partenaire de forum" | ||
And I fill in "ranking" with "73" | ||
And I fill in "nom" with "Un partenaire modifié" | ||
And I fill in "presentation" with "La présentation du partenaire modifié" | ||
And I fill in "site" with "https://www.exemple.com/updated" | ||
When I press "Soumettre" | ||
Then the ".content .message" element should contain "Le partenaire a été modifié" | ||
And I should see "forum Or Un partenaire modifié https://www.exemple.com/updated avatar1.png 73" | ||
# Suppression | ||
When I follow "Supprimer le partenaire Un partenaire modifié" | ||
Then the ".content .message" element should contain "Le partenaire a été supprimé" | ||
And I should see "Aucun inscrit" | ||
|
||
|
||
|
||
|