Skip to content

Commit

Permalink
feat (#1110): functional test
Browse files Browse the repository at this point in the history
Site public :
- Membres
  • Loading branch information
stakovicz committed Nov 15, 2023
1 parent f457976 commit 358cabf
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
12 changes: 12 additions & 0 deletions db/seeds/Feuilles.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ public function run()
'image' => null,
'patterns' => null,
],
[
'id' => 89,
'id_parent' => Feuille::ID_FEUILLE_HEADER,
'nom' => 'Membres',
'lien' => '/profile/company',
'alt' => '',
'position' => 8,
'date' => 1700077154,
'etat' => 1,
'image' => null,
'patterns' => null,
],
[
'id' => Feuille::ID_FEUILLE_ANTENNES,
'id_parent' =>null,
Expand Down
3 changes: 2 additions & 1 deletion db/seeds/Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public function run()
'code_postal' => '69001',
'ville' => 'LYON',
'id_pays' => 'FR',
'etat' => 0,
'etat' => 1,
'public_profile_enabled' => 1,
'max_members' => 3
],
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ public function getCompanyBadges(CompanyMember $companyMember)

$badgesInfos = $this->sortBadgesInfos($badgesInfos);

$badgesCodes = $this->mapBadgesCodes($badgesInfos);
$badges = $this->filterExistingBadges($badgesInfos);

$badges = $this->filterExistingBadges($badgesCodes);
$badges = $this->mapBadgesCodes($badges);

return $badges;
}
Expand Down
13 changes: 13 additions & 0 deletions tests/behat/features/PublicSite/Members.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Feature: Site Public - Membres

@reloadDbWithTestData
@clearEmails
Scenario: Liste des entreprises
Given I am on the homepage
When I follow "Membres"
Then I should see "Entreprises adhérentes"
And I should see "MyCorp"
When I follow "MyCorp"
Then I should see "MyCorp"
Then I should see "L'entreprise"
Then I should see "MyCorp n'a pas renseigné d'antenne à proximité."

0 comments on commit 358cabf

Please sign in to comment.