Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/vinceAmstoutz/afup-web in…
Browse files Browse the repository at this point in the history
…to feat-1256-runner-to-not-use-meetup-api-to-display-events
  • Loading branch information
vinceAmstoutz committed Nov 26, 2023
2 parents b52b8c3 + c51de10 commit cb5e668
Show file tree
Hide file tree
Showing 69 changed files with 709 additions and 1,081 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,11 @@ test:


test-functional: data config htdocs/uploads
CURRENT_UID=$(CURRENT_UID) docker-compose stop dbtest apachephptest mailcatcher
CURRENT_UID=$(CURRENT_UID) docker-compose up -d dbtest apachephptest mailcatcher
CURRENT_UID=$(CURRENT_UID) docker-compose stop dbtest apachephptest planetetest mailcatcher
CURRENT_UID=$(CURRENT_UID) docker-compose up -d dbtest apachephptest planetetest mailcatcher
CURRENT_UID=$(CURRENT_UID) docker-compose run --no-deps --rm cliphp ./bin/behat
CURRENT_UID=$(CURRENT_UID) docker-compose stop dbtest apachephptest mailcatcher
CURRENT_UID=$(CURRENT_UID) docker-compose run --no-deps --rm cliphp ./bin/behat -c behat-planete.yml
CURRENT_UID=$(CURRENT_UID) docker-compose stop dbtest apachephptest planetetest mailcatcher

data:
mkdir data
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,16 @@ Lancement des tests unitaires :
```
- Une alternative est d'utiliser la commande `make test` qui effectuer la même action.

Lancement des tests unitaires :
Lancement des tests fonctionnels :
- Se connecter dans le conteneur php `docker/bin/bash`
- Lancer les tests :
- Lancer les tests pour le site web :
```
./bin/behat
```
- Lancer les tests pour le site Planete PHP :
```
./bin/behat -c behat-planete.yml
```
- Une alternative est d'utiliser la commande `make test-functional`, attention cette commande arrête les containeurs de tests à la fin de l'exécution de la suite de test. Si par la suite vous souhaitez lancer un test, il faut bien penser à les allumer de nouveau.

Dans chacun des cas, il est possible de spécifier un test dans la ligne de commande. Exemple: `./bin/behat tests/behat/features/Admin/AdminFeuilles.feature`
Expand All @@ -84,7 +88,7 @@ Il est possible de tester les paiements Paybox en environnement de développemen
Pour cela, les identifiant, site et rang [de test](https://www.paybox.com/espace-integrateur-documentation/comptes-de-tests/) sont déjà configurés dans le fichier parameters.yml par défaut.

Ensuite pour le paiement il faut utiliser ces informations [de carte](https://www.paybox.com/espace-integrateur-documentation/cartes-de-tests/) (celle _"Carte participant au programme 3-D Secure (enrôlée)"_) :
* Numéro de carte : `1111 2222 3333 4444`
* Numéro de carte : `1111222233334444`
* Validité : `12/25`
* CVV : `123`

Expand Down
2 changes: 1 addition & 1 deletion app/Resources/translations/messages.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Language: Language
'Recevoir le dossier': 'Get it'
'Page précédente': 'Previous page'
'Page suivante': 'Next page'
Billetterie: Ticketting
Billetterie: Ticketing
'Vous êtes connecté avec un compte AFUP d''entreprise. Pour acheter des places au tarif AFUP, celles-ci doivent être enregistrées pour les membres de votre adhésion.': 'You are connected with an enterprise membership account. You can only buy tickets for the accounts of your memberships.'
'Vous êtes connecté avec un compte AFUP personnel. Vous pouvez acheter une place au tarif membre pour vous seul.': 'You are connected with a personnal account. You can buy one member ticket for yourself.'
'Attention votre cotisation ne sera plus valable le jour de l''évènement. Vous pouvez commander des billets au tarif AFUP mais vous devrez renouveler votre cotisation pour pouvoir accéder à l''évènement.': 'Please take care of your membership. It won''t be valid at the date of the event. You can order members tickets but you will have to pay your membership fee before the event.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
"lien": path('member_techletter'),
"is_active": current == "techletter",
},
{
"nom": "Listes de diffusion",
"lien": path('my_groups'),
"is_active": current == "mygroups",
},
{
"nom": "Assemblée générale",
"lien": path('member_general_meeting'),
Expand Down
6 changes: 3 additions & 3 deletions app/Resources/views/event/speaker/page.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
{{ form_errors(speakers_contact_form.phone_number) }}
</span>
<span>
{{ form_widget(speakers_contact_form.submit) }}
{{ form_widget(speakers_contact_form.submit, {attr: {title: "Enregistrer le contact"}}) }}
</span>
</div>

Expand Down Expand Up @@ -150,7 +150,7 @@
</div>

<div class="submit-container">
{{ form_widget(speakers_diner_form.submit) }}
{{ form_widget(speakers_diner_form.submit, {attr: {title: "Enregistrer mes préférences pour le restaurant"}}) }}
</div>

{{ form_end(speakers_diner_form) }}
Expand Down Expand Up @@ -196,7 +196,7 @@
</div>

<div class="submit-container">
{{ form_widget(hotel_reservation_form.submit) }}
{{ form_widget(hotel_reservation_form.submit, {attr: {title: "Enregistrer les nuitées"}}) }}
</div>

{{ form_end(hotel_reservation_form) }}
Expand Down
15 changes: 2 additions & 13 deletions app/Resources/views/site/member/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
</a>
<span class="member-index-item--title">Mes coordonnées</span> : {{ user.label }}
<div class="member-index-item--link">
<a class="button-inverted button__medium" href="{{ href }}">Modifier</a>
<a class="button-inverted button__medium" href="{{ href }}"
title="Modifier les coordonnées">Modifier</a>
</div>
<div class="member-index-item--description">
Modifiez votre adresse de facturation et votre adresse email, changez votre mot de passe
Expand Down Expand Up @@ -104,18 +105,6 @@
</div>
</div>
</div>
<div class="col-md-6 col-sm-12">
<div class="member-index-item">
{% set href = path('my_groups') %}
<a href="{{ href }}">
<i class="fa fa-envelope"></i>
</a>
<span class="member-index-item--title">Listes de diffusion</span>
<div class="member-index-item--link">
<a class="button-inverted button__medium" href="{{ href }}">Gérer mes abonnements</a>
</div>
</div>
</div>
</div>

<div class="container">
Expand Down
3 changes: 2 additions & 1 deletion app/Resources/views/site/news/list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@

{% if articles|length %}
{% for article in articles %}
<a class="article article-teaser" href="{{ path('news_display', { code: article.slug}) }}">
<a class="article article-teaser" href="{{ path('news_display', { code: article.slug}) }}"
title="Lire l'article: {{ article.title }}">
<h2>{{ article.title }}</h2>
<div class="article-date"><i>{{ article.publishedAt|localizeddate('long', 'none') }}</i></div>
<p>{{ article.getTeaser|raw }} <span class="home-read-more">Lire plus <i class="fa fa-arrow-right"></i></span></p>
Expand Down
7 changes: 0 additions & 7 deletions app/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -380,13 +380,6 @@ ting:
default:
connection: main
database: '%database_name%'
groups:
namespace : AppBundle\Groups\Model\Repository
directory : "@AppBundle/Groups/Model/Repository"
options:
default:
connection: main
database: '%database_name%'
throttling:
namespace : AppBundle\Security\ActionThrottling
directory : "@AppBundle/Security/ActionThrottling"
Expand Down
3 changes: 3 additions & 0 deletions app/config/config_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ services:
AppBundle\Offices\OfficeFinder:
class: AppBundle\Offices\NullOfficeFinder
arguments: [ '@Geocoder\Provider\GoogleMaps' ]

ewz_recaptcha:
enabled: false
2 changes: 0 additions & 2 deletions app/config/parameters.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ parameters:
meetup_api_consumer_key: ""
meetup_api_consumer_secret: ""

google_groups_api_key: ""

techno_watch_calendar_url: "https://docs.google.com/spreadsheets/d/2cUeAk86Ov7BLYyn0Ad9ge3ecbsdboeQH64wIU9a9Zzp/export?format=csv"
techno_watch_calendar_key: "9Yt0feebMyMrUWx"

Expand Down
2 changes: 0 additions & 2 deletions app/config/parameters.yml.dist-docker
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ parameters:
meetup_api_consumer_key: ""
meetup_api_consumer_secret: ""

google_groups_api_key: ""

techno_watch_calendar_url: "https://docs.google.com/spreadsheets/d/2cUeAk86Ov7BLYyn0Ad9ge3ecbsdboeQH64wIU9a9Zzp/export?format=csv"
techno_watch_calendar_key: "9Yt0feebMyMrUWx"

Expand Down
4 changes: 0 additions & 4 deletions app/config/routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ blog:
resource: "routing/blog.yml"
prefix: /blog

groups:
resource: "routing/groups.yml"
prefix: /admin/groups

cms_page:
resource: "routing/cms_page.yml"
prefix: /p
Expand Down
3 changes: 0 additions & 3 deletions app/config/routing/groups.yml

This file was deleted.

26 changes: 0 additions & 26 deletions app/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -451,11 +451,6 @@ services:
factory: ["@ting", get]
arguments: [AppBundle\Event\Model\Repository\TicketSpecialPriceRepository]

AppBundle\Groups\Model\Repository\MailingListRepository:
class: AppBundle\Groups\Model\Repository\MailingListRepository
factory: ["@ting", get]
arguments: [AppBundle\Groups\Model\Repository\MailingListRepository]

AppBundle\Site\Model\Repository\RubriqueRepository:
class: AppBundle\Site\Model\Repository\RubriqueRepository
factory: ["@ting", get]
Expand Down Expand Up @@ -597,27 +592,6 @@ services:
AppBundle\Event\JsonLd:
autowire: true

Google_Client:
class: Google_Client
calls:
- ["setAuthConfig", ["%google_groups_api_key%"]]
- ["setScopes", [[!php/const Google_Service_Directory::ADMIN_DIRECTORY_GROUP, !php/const Google_Service_Directory::ADMIN_DIRECTORY_GROUP_READONLY]]]
- ["setSubject", ['admin-mailing-listes-api@afup.org']]

Google_Service_Directory:
class: Google_Service_Directory
arguments: ["@Google_Client"]

AppBundle\Groups\GroupRepository:
autowire: true

AppBundle\Association\Listener\MembersGroupsListener:
arguments:
$logger: "@logger"
autowire: true
tags:
- { name: kernel.event_listener, event: member.new, method: onNewMemberEvent }

AppBundle\Offices\OfficeFinder:
arguments: ['@Geocoder\Provider\GoogleMaps']

Expand Down
16 changes: 16 additions & 0 deletions behat-planete.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
default:
suites:
features:
paths:
- %paths.base%/planete/tests
contexts:
- FeatureContext
- Behat\MinkExtension\Context\MinkContext
extensions:
Behat\MinkExtension:
base_url: 'https://planetetest:80'
sessions:
default:
goutte:
guzzle_parameters:
verify: false
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"ext-json": "*",
"ext-dom": "*",
"ext-libxml": "*",
"ext-openssl": "*",
"beberlei/assert": "^2.9",
"league/oauth2-github": "^0.2.1",
"symfony/symfony": "^3.4",
Expand All @@ -26,6 +27,7 @@
"smarty/smarty": "2.6.*",
"sabre/vobject": "^4.1",
"erusev/parsedown": "^1.6",
"dms/meetup-api-client": "^2.3",
"google/apiclient": "^2.0",
"robmorgan/phinx": "^0.9.2",
"presta/sitemap-bundle": "^1.5",
Expand Down
Loading

0 comments on commit cb5e668

Please sign in to comment.