|
16907 | 16907 | },
|
16908 | 16908 | "response": []
|
16909 | 16909 | },
|
| 16910 | + { |
| 16911 | + "name": "create work period2", |
| 16912 | + "event": [ |
| 16913 | + { |
| 16914 | + "listen": "test", |
| 16915 | + "script": { |
| 16916 | + "exec": [ |
| 16917 | + "pm.test('Status code is 200', function () {\r", |
| 16918 | + " pm.response.to.have.status(200);\r", |
| 16919 | + " if(pm.response.status === \"OK\"){\r", |
| 16920 | + " const response = pm.response.json()\r", |
| 16921 | + " pm.environment.set(\"workPeriodId2\", response.id);\r", |
| 16922 | + " }\r", |
| 16923 | + "});" |
| 16924 | + ], |
| 16925 | + "type": "text/javascript" |
| 16926 | + } |
| 16927 | + } |
| 16928 | + ], |
| 16929 | + "request": { |
| 16930 | + "method": "POST", |
| 16931 | + "header": [ |
| 16932 | + { |
| 16933 | + "key": "Authorization", |
| 16934 | + "type": "text", |
| 16935 | + "value": "Bearer {{token_bookingManager}}" |
| 16936 | + } |
| 16937 | + ], |
| 16938 | + "body": { |
| 16939 | + "mode": "raw", |
| 16940 | + "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-14\",\r\n \"endDate\": \"2021-03-20\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}", |
| 16941 | + "options": { |
| 16942 | + "raw": { |
| 16943 | + "language": "json" |
| 16944 | + } |
| 16945 | + } |
| 16946 | + }, |
| 16947 | + "url": { |
| 16948 | + "raw": "{{URL}}/work-periods", |
| 16949 | + "host": [ |
| 16950 | + "{{URL}}" |
| 16951 | + ], |
| 16952 | + "path": [ |
| 16953 | + "work-periods" |
| 16954 | + ] |
| 16955 | + } |
| 16956 | + }, |
| 16957 | + "response": [] |
| 16958 | + }, |
16910 | 16959 | {
|
16911 | 16960 | "name": "create work period with m2m",
|
16912 | 16961 | "event": [
|
|
17007 | 17056 | },
|
17008 | 17057 | "response": []
|
17009 | 17058 | },
|
| 17059 | + { |
| 17060 | + "name": "create multiple work period payments with boooking manager", |
| 17061 | + "event": [ |
| 17062 | + { |
| 17063 | + "listen": "test", |
| 17064 | + "script": { |
| 17065 | + "exec": [ |
| 17066 | + "pm.test('Status code is 200', function () {\r", |
| 17067 | + " pm.response.to.have.status(200);\r", |
| 17068 | + "});" |
| 17069 | + ], |
| 17070 | + "type": "text/javascript" |
| 17071 | + } |
| 17072 | + } |
| 17073 | + ], |
| 17074 | + "request": { |
| 17075 | + "method": "POST", |
| 17076 | + "header": [ |
| 17077 | + { |
| 17078 | + "key": "Authorization", |
| 17079 | + "type": "text", |
| 17080 | + "value": "Bearer {{token_bookingManager}}" |
| 17081 | + } |
| 17082 | + ], |
| 17083 | + "body": { |
| 17084 | + "mode": "raw", |
| 17085 | + "raw": "[{\r\n \"workPeriodId\": \"{{workPeriodId}}\",\r\n \"amount\": 600\r\n},{\r\n \"workPeriodId\": \"{{workPeriodId2}}\",\r\n \"amount\": 900\r\n}]", |
| 17086 | + "options": { |
| 17087 | + "raw": { |
| 17088 | + "language": "json" |
| 17089 | + } |
| 17090 | + } |
| 17091 | + }, |
| 17092 | + "url": { |
| 17093 | + "raw": "{{URL}}/work-period-payments", |
| 17094 | + "host": [ |
| 17095 | + "{{URL}}" |
| 17096 | + ], |
| 17097 | + "path": [ |
| 17098 | + "work-period-payments" |
| 17099 | + ] |
| 17100 | + } |
| 17101 | + }, |
| 17102 | + "response": [] |
| 17103 | + }, |
| 17104 | + { |
| 17105 | + "name": "create query work period payments with boooking manager", |
| 17106 | + "event": [ |
| 17107 | + { |
| 17108 | + "listen": "test", |
| 17109 | + "script": { |
| 17110 | + "exec": [ |
| 17111 | + "pm.test('Status code is 200', function () {\r", |
| 17112 | + " pm.response.to.have.status(200);\r", |
| 17113 | + "});" |
| 17114 | + ], |
| 17115 | + "type": "text/javascript" |
| 17116 | + } |
| 17117 | + } |
| 17118 | + ], |
| 17119 | + "request": { |
| 17120 | + "method": "POST", |
| 17121 | + "header": [ |
| 17122 | + { |
| 17123 | + "key": "Authorization", |
| 17124 | + "type": "text", |
| 17125 | + "value": "Bearer {{token_bookingManager}}" |
| 17126 | + } |
| 17127 | + ], |
| 17128 | + "body": { |
| 17129 | + "mode": "raw", |
| 17130 | + "raw": "{\"query\": { \"workPeriods.paymentStatus\": \"pending\" } }", |
| 17131 | + "options": { |
| 17132 | + "raw": { |
| 17133 | + "language": "json" |
| 17134 | + } |
| 17135 | + } |
| 17136 | + }, |
| 17137 | + "url": { |
| 17138 | + "raw": "{{URL}}/work-period-payments/query", |
| 17139 | + "host": [ |
| 17140 | + "{{URL}}" |
| 17141 | + ], |
| 17142 | + "path": [ |
| 17143 | + "work-period-payments", |
| 17144 | + "query" |
| 17145 | + ] |
| 17146 | + } |
| 17147 | + }, |
| 17148 | + "response": [] |
| 17149 | + }, |
17010 | 17150 | {
|
17011 | 17151 | "name": "create work period payment with m2m create",
|
17012 | 17152 | "event": [
|
|
29066 | 29206 | },
|
29067 | 29207 | "response": []
|
29068 | 29208 | },
|
| 29209 | + { |
| 29210 | + "name": "✔ create multiple work period payment with administrator", |
| 29211 | + "event": [ |
| 29212 | + { |
| 29213 | + "listen": "test", |
| 29214 | + "script": { |
| 29215 | + "exec": [ |
| 29216 | + "pm.test('Status code is 200', function () {\r", |
| 29217 | + " pm.response.to.have.status(200);\r", |
| 29218 | + "});" |
| 29219 | + ], |
| 29220 | + "type": "text/javascript" |
| 29221 | + } |
| 29222 | + } |
| 29223 | + ], |
| 29224 | + "request": { |
| 29225 | + "method": "POST", |
| 29226 | + "header": [ |
| 29227 | + { |
| 29228 | + "key": "Authorization", |
| 29229 | + "type": "text", |
| 29230 | + "value": "Bearer {{token_administrator}}" |
| 29231 | + } |
| 29232 | + ], |
| 29233 | + "body": { |
| 29234 | + "mode": "raw", |
| 29235 | + "raw": "{\"query\": { \"workPeriods.paymentStatus\": \"pending\" } }", |
| 29236 | + "options": { |
| 29237 | + "raw": { |
| 29238 | + "language": "json" |
| 29239 | + } |
| 29240 | + } |
| 29241 | + }, |
| 29242 | + "url": { |
| 29243 | + "raw": "{{URL}}/work-period-payments/query", |
| 29244 | + "host": [ |
| 29245 | + "{{URL}}" |
| 29246 | + ], |
| 29247 | + "path": [ |
| 29248 | + "work-period-payments", |
| 29249 | + "query" |
| 29250 | + ] |
| 29251 | + } |
| 29252 | + }, |
| 29253 | + "response": [] |
| 29254 | + }, |
29069 | 29255 | {
|
29070 | 29256 | "name": "✔ get work period payment with administrator",
|
29071 | 29257 | "event": [
|
|
31518 | 31704 | },
|
31519 | 31705 | "response": []
|
31520 | 31706 | },
|
| 31707 | + { |
| 31708 | + "name": "✘ create query work period payment with member", |
| 31709 | + "event": [ |
| 31710 | + { |
| 31711 | + "listen": "test", |
| 31712 | + "script": { |
| 31713 | + "exec": [ |
| 31714 | + "pm.test('Status code is 403', function () {\r", |
| 31715 | + " pm.response.to.have.status(403);\r", |
| 31716 | + " const response = pm.response.json()\r", |
| 31717 | + " pm.expect(response.message).to.eq(\"You are not allowed to perform this action!\")\r", |
| 31718 | + "});" |
| 31719 | + ], |
| 31720 | + "type": "text/javascript" |
| 31721 | + } |
| 31722 | + } |
| 31723 | + ], |
| 31724 | + "request": { |
| 31725 | + "method": "POST", |
| 31726 | + "header": [ |
| 31727 | + { |
| 31728 | + "key": "Authorization", |
| 31729 | + "type": "text", |
| 31730 | + "value": "Bearer {{token_member_tester1234}}" |
| 31731 | + } |
| 31732 | + ], |
| 31733 | + "body": { |
| 31734 | + "mode": "raw", |
| 31735 | + "raw": "{\"query\": { \"workPeriods.paymentStatus\": \"pending\" } }", |
| 31736 | + "options": { |
| 31737 | + "raw": { |
| 31738 | + "language": "json" |
| 31739 | + } |
| 31740 | + } |
| 31741 | + }, |
| 31742 | + "url": { |
| 31743 | + "raw": "{{URL}}/work-period-payments/query", |
| 31744 | + "host": [ |
| 31745 | + "{{URL}}" |
| 31746 | + ], |
| 31747 | + "path": [ |
| 31748 | + "work-period-payments", |
| 31749 | + "query" |
| 31750 | + ] |
| 31751 | + } |
| 31752 | + }, |
| 31753 | + "response": [] |
| 31754 | + }, |
31521 | 31755 | {
|
31522 | 31756 | "name": "✘ get work period payment with member",
|
31523 | 31757 | "event": [
|
|
34032 | 34266 | },
|
34033 | 34267 | "response": []
|
34034 | 34268 | },
|
| 34269 | + { |
| 34270 | + "name": "✘ create query work period payment with connect manager", |
| 34271 | + "event": [ |
| 34272 | + { |
| 34273 | + "listen": "test", |
| 34274 | + "script": { |
| 34275 | + "exec": [ |
| 34276 | + "pm.test('Status code is 403', function () {\r", |
| 34277 | + " pm.response.to.have.status(403);\r", |
| 34278 | + " const response = pm.response.json()\r", |
| 34279 | + " pm.expect(response.message).to.eq(\"You are not allowed to perform this action!\")\r", |
| 34280 | + "});" |
| 34281 | + ], |
| 34282 | + "type": "text/javascript" |
| 34283 | + } |
| 34284 | + } |
| 34285 | + ], |
| 34286 | + "request": { |
| 34287 | + "method": "POST", |
| 34288 | + "header": [ |
| 34289 | + { |
| 34290 | + "key": "Authorization", |
| 34291 | + "type": "text", |
| 34292 | + "value": "Bearer {{token_connect_manager_pshahcopmanag2}}" |
| 34293 | + } |
| 34294 | + ], |
| 34295 | + "body": { |
| 34296 | + "mode": "raw", |
| 34297 | + "raw": "{\"query\": { \"workPeriods.paymentStatus\": \"pending\" } }", |
| 34298 | + "options": { |
| 34299 | + "raw": { |
| 34300 | + "language": "json" |
| 34301 | + } |
| 34302 | + } |
| 34303 | + }, |
| 34304 | + "url": { |
| 34305 | + "raw": "{{URL}}/work-period-payments/query", |
| 34306 | + "host": [ |
| 34307 | + "{{URL}}" |
| 34308 | + ], |
| 34309 | + "path": [ |
| 34310 | + "work-period-payments", |
| 34311 | + "query" |
| 34312 | + ] |
| 34313 | + } |
| 34314 | + }, |
| 34315 | + "response": [] |
| 34316 | + }, |
34035 | 34317 | {
|
34036 | 34318 | "name": "✘ get work period payment with connect manager",
|
34037 | 34319 | "event": [
|
|
0 commit comments