|
| 1 | +--- |
| 2 | +test_name: A fully worked example creating the Lucan GP 2018 event |
| 3 | + |
| 4 | +stages: |
| 5 | + - name: Create the club |
| 6 | + request: |
| 7 | + url: "{api.server}/api/clubs/" |
| 8 | + json: |
| 9 | + title: Lucan Cycling Road Club |
| 10 | + url: http://www.lucancrc.com/ |
| 11 | + social_media: |
| 12 | + handle: '@lucancrc' |
| 13 | + facebook_page: https://www.facebook.com/lucancrc/ |
| 14 | + method: POST |
| 15 | + headers: |
| 16 | + content-type: application/json |
| 17 | + response: |
| 18 | + status_code: 201 |
| 19 | + save: |
| 20 | + body: |
| 21 | + club_id: id |
| 22 | + |
| 23 | + - name: Create the event from CI calendar and details pages information |
| 24 | + request: |
| 25 | + url: "{api.server}/api/events/" |
| 26 | + json: &initial_event_info |
| 27 | + title: Lucan GP |
| 28 | + date: "2018-09-15" |
| 29 | + event_type: road race |
| 30 | + location: Dunsany, Co. Meath |
| 31 | + organised_by: |
| 32 | + club_id: {club_id} |
| 33 | + contacts: |
| 34 | + - name: John Priest |
| 35 | + |
| 36 | + phone: "863835925" |
| 37 | + url_primary: https://cyclingireland.azolve.com/Workbench.mvc/public/eventDetails?EventId=1074983 |
| 38 | + url_ci: https://cyclingireland.azolve.com/Workbench.mvc/public/eventDetails?EventId=1074983 |
| 39 | + sign_on: |
| 40 | + venue: Dunsany GAA Club, Dunsany, Ireland |
| 41 | + start_time: "2018-09-15 09:00" |
| 42 | + end_time: "2018-09-15 10:00" |
| 43 | + media: |
| 44 | + poster: https://scontent-frx5-1.xx.fbcdn.net/v/t1.0-9/41027649_1588111107960123_5235790701211418624_n.jpg?_nc_cat=0&oh=437e0c0e6a31888ddbaca957c797e0a9&oe=5C2C4F24 |
| 45 | + races: |
| 46 | + - title: Lucan GP |
| 47 | + eligible_categories: |
| 48 | + - A+ |
| 49 | + - A1 |
| 50 | + - A2 |
| 51 | + stage_type: road race |
| 52 | + start_time: "2018-09-15 10:30" |
| 53 | + course: |
| 54 | + distance_km: 80 |
| 55 | + - title: Lucan GP A3 |
| 56 | + eligible_categories: |
| 57 | + - A3 |
| 58 | + - J |
| 59 | + stage_type: road race |
| 60 | + start_time: "2018-09-15 10:30" |
| 61 | + course: |
| 62 | + distance_km: 80 |
| 63 | + - title: Lucan GP A4 |
| 64 | + eligible_categories: |
| 65 | + - A4 |
| 66 | + stage_type: road race |
| 67 | + start_time: "2018-09-15 10:30" |
| 68 | + course: |
| 69 | + distance_km: 60 |
| 70 | + method: POST |
| 71 | + headers: |
| 72 | + content-type: application/json |
| 73 | + response: |
| 74 | + status_code: 201 |
| 75 | + save: |
| 76 | + body: |
| 77 | + event_id: id |
| 78 | + |
| 79 | + - name: Merge the A3/J race into the headline race with a handicap |
| 80 | + request: |
| 81 | + url: "{api.server}/api/events/{event_id}" |
| 82 | + json: |
| 83 | + <<: *initial_event_info |
| 84 | + races: |
| 85 | + - title: Lucan GP |
| 86 | + eligible_categories: |
| 87 | + - A+ |
| 88 | + - A1 |
| 89 | + - A2 |
| 90 | + - A3 |
| 91 | + stage_type: road race |
| 92 | + handicapped: true |
| 93 | + start_time: "2018-09-15 10:30" |
| 94 | + course: |
| 95 | + distance_km: 80 |
| 96 | + - title: Lucan GP A4 |
| 97 | + eligible_categories: |
| 98 | + - A4 |
| 99 | + - W |
| 100 | + stage_type: road race |
| 101 | + start_time: "2018-09-15 10:30" |
| 102 | + course: |
| 103 | + distance_km: 60 |
| 104 | + method: PUT |
| 105 | + response: |
| 106 | + status_code: 204 |
| 107 | + |
| 108 | + - name: Delete the event |
| 109 | + request: |
| 110 | + url: "{api.server}/api/events/{event_id}" |
| 111 | + method: DELETE |
| 112 | + response: |
| 113 | + status_code: 204 |
0 commit comments