Added a lot of unit tests
This commit is contained in:
parent
0938fb98b7
commit
16d4a0724c
32 changed files with 4268 additions and 497 deletions
92
tests/data/configuration/clubs.yaml
Normal file
92
tests/data/configuration/clubs.yaml
Normal file
|
@ -0,0 +1,92 @@
|
|||
clubs:
|
||||
- name: Super Club
|
||||
url: https://www.super-club.com
|
||||
id: sc
|
||||
bookingPlatform:
|
||||
id: gestion-sports
|
||||
clubId: 54
|
||||
url: https://superclub.flapi.fr
|
||||
hoursBeforeCancellation: 10
|
||||
bookingOpening:
|
||||
daysBefore: 10
|
||||
time: 22:37
|
||||
totalBookings:
|
||||
peakHours: 3
|
||||
offPeakHours: unlimited
|
||||
sports:
|
||||
- name: Sport1
|
||||
id: 22
|
||||
duration: 55
|
||||
price: 78
|
||||
players: 4
|
||||
courts:
|
||||
- name: Court 1
|
||||
number: 1
|
||||
id: 54
|
||||
isIndoor: True
|
||||
- name: Court 2
|
||||
number: 2
|
||||
id: 67
|
||||
isIndoor: False
|
||||
- name: Court 3
|
||||
number: 3
|
||||
id: 26
|
||||
isIndoor: True
|
||||
- name: Sport2
|
||||
id: 25
|
||||
duration: 22
|
||||
price: 3
|
||||
players: 2
|
||||
courts:
|
||||
- name: Court 1
|
||||
id: 99
|
||||
number: 1
|
||||
isIndoor: True
|
||||
- name: Court 2
|
||||
number: 2
|
||||
id: 101
|
||||
isIndoor: False
|
||||
|
||||
- name: Club Pourri
|
||||
url: https://www.clubpourri.fr
|
||||
id: cp
|
||||
bookingPlatform:
|
||||
id: gestion-sports
|
||||
clubId: 1111
|
||||
url: https://clubpourri.flapi.fr
|
||||
hoursBeforeCancellation: 24
|
||||
bookingOpening:
|
||||
daysBefore: 2
|
||||
time: 02:54
|
||||
totalBookings:
|
||||
peakHours: 4
|
||||
offPeakHours: unlimited
|
||||
sports:
|
||||
- name: Sport1
|
||||
id: 465
|
||||
duration: 44
|
||||
price: 98
|
||||
players: 4
|
||||
courts:
|
||||
- name: Court 7
|
||||
number: 15
|
||||
id: 987
|
||||
isIndoor: True
|
||||
- name: prout prout
|
||||
number: 555
|
||||
id: 747
|
||||
isIndoor: False
|
||||
- name: Sport3
|
||||
id: 321
|
||||
duration: 11
|
||||
price: 18
|
||||
players: 2
|
||||
courts:
|
||||
- name: Court 1
|
||||
id: 613
|
||||
isIndoor: True
|
||||
number: 1
|
||||
- name: Court 2
|
||||
id: 614
|
||||
isIndoor: True
|
||||
number: 2
|
|
@ -0,0 +1 @@
|
|||
ajax=removeResa&hash={{ hash }}&id={{ booking_id }}
|
|
@ -0,0 +1 @@
|
|||
ajax=addResa&date={{ date.date().strftime("%d/%m/%Y") }}&hour={{ date.time().strftime("%H:%M") }}&duration=90&partners=null|null|null&paiement=facultatif&idSport={{ sport_id }}&creaPartie=false&idCourt={{ court_id }}&pay=false&token=undefined&totalPrice=48&saveCard=0&foodNumber=0
|
|
@ -0,0 +1 @@
|
|||
ajax=connexionUser&id_club={{ club.booking_platform.club_id }}&email={{ user.login }}&form_ajax=1&pass={{ user.password }}&compte=user&playeridonesignal=0&identifiant=identifiant&externCo=true
|
12
tests/data/configuration/gestion-sports/post-headers.json
Normal file
12
tests/data/configuration/gestion-sports/post-headers.json
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"Connection": "keep-alive",
|
||||
"Accept-Language": "en-US,en;q=0.5",
|
||||
"Accept-Encoding": "gzip, deflate, br",
|
||||
"DNT": "1",
|
||||
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
|
||||
"Accept": "application/json, text/javascript, */*; q=0.01",
|
||||
"X-Requested-With": "XMLHttpRequest",
|
||||
"Sec-Fetch-Dest": "empty",
|
||||
"Sec-Fetch-Mode": "cors",
|
||||
"Sec-Fetch-Site": "same-origin"
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
ajax=loadResa&hash={{ hash }}
|
19
tests/data/configuration/platforms.yaml
Normal file
19
tests/data/configuration/platforms.yaml
Normal file
|
@ -0,0 +1,19 @@
|
|||
platforms:
|
||||
- name: flapi
|
||||
url: https://flapi.fr/
|
||||
id: gestion-sports
|
||||
urls:
|
||||
- name: landing-page
|
||||
path: /landing.html
|
||||
- name: login
|
||||
path: /login.html
|
||||
payloadTemplate: gestion-sports/login-payload.txt
|
||||
- name: booking
|
||||
path: /booking.html
|
||||
payloadTemplate: gestion-sports/booking-payload.txt
|
||||
- name: user-bookings
|
||||
path: /user_bookings.html
|
||||
payloadTemplate: gestion-sports/user-bookings-payload.txt
|
||||
- name: cancellation
|
||||
path: /cancel.html
|
||||
payloadTemplate: gestion-sports/booking-cancellation-payload.txt
|
13
tests/data/configuration/users.yaml
Normal file
13
tests/data/configuration/users.yaml
Normal file
|
@ -0,0 +1,13 @@
|
|||
clubs:
|
||||
- id: tpc
|
||||
users:
|
||||
- login: padel.testing@jouf.fr
|
||||
password: ridicule
|
||||
- login: mateochal31@gmail.com
|
||||
password: pleanyakis
|
||||
- id: padeltolosa
|
||||
users:
|
||||
- login: padel.testing@jouf.fr
|
||||
password: ridicule
|
||||
- login: mateochal31@gmail.com
|
||||
password: pleanyakis
|
Loading…
Add table
Add a link
Reference in a new issue