|
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": [
|
|
27377 | 27517 | },
|
27378 | 27518 | "response": []
|
27379 | 27519 | },
|
| 27520 | + { |
| 27521 | + "name": "✔ create multiple work period payment with administrator", |
| 27522 | + "event": [ |
| 27523 | + { |
| 27524 | + "listen": "test", |
| 27525 | + "script": { |
| 27526 | + "exec": [ |
| 27527 | + "pm.test('Status code is 200', function () {\r", |
| 27528 | + " pm.response.to.have.status(200);\r", |
| 27529 | + "});" |
| 27530 | + ], |
| 27531 | + "type": "text/javascript" |
| 27532 | + } |
| 27533 | + } |
| 27534 | + ], |
| 27535 | + "request": { |
| 27536 | + "method": "POST", |
| 27537 | + "header": [ |
| 27538 | + { |
| 27539 | + "key": "Authorization", |
| 27540 | + "type": "text", |
| 27541 | + "value": "Bearer {{token_administrator}}" |
| 27542 | + } |
| 27543 | + ], |
| 27544 | + "body": { |
| 27545 | + "mode": "raw", |
| 27546 | + "raw": "{\"query\": { \"workPeriods.paymentStatus\": \"pending\" } }", |
| 27547 | + "options": { |
| 27548 | + "raw": { |
| 27549 | + "language": "json" |
| 27550 | + } |
| 27551 | + } |
| 27552 | + }, |
| 27553 | + "url": { |
| 27554 | + "raw": "{{URL}}/work-period-payments/query", |
| 27555 | + "host": [ |
| 27556 | + "{{URL}}" |
| 27557 | + ], |
| 27558 | + "path": [ |
| 27559 | + "work-period-payments", |
| 27560 | + "query" |
| 27561 | + ] |
| 27562 | + } |
| 27563 | + }, |
| 27564 | + "response": [] |
| 27565 | + }, |
27380 | 27566 | {
|
27381 | 27567 | "name": "✔ get work period payment with administrator",
|
27382 | 27568 | "event": [
|
|
29829 | 30015 | },
|
29830 | 30016 | "response": []
|
29831 | 30017 | },
|
| 30018 | + { |
| 30019 | + "name": "✘ create query work period payment with member", |
| 30020 | + "event": [ |
| 30021 | + { |
| 30022 | + "listen": "test", |
| 30023 | + "script": { |
| 30024 | + "exec": [ |
| 30025 | + "pm.test('Status code is 403', function () {\r", |
| 30026 | + " pm.response.to.have.status(403);\r", |
| 30027 | + " const response = pm.response.json()\r", |
| 30028 | + " pm.expect(response.message).to.eq(\"You are not allowed to perform this action!\")\r", |
| 30029 | + "});" |
| 30030 | + ], |
| 30031 | + "type": "text/javascript" |
| 30032 | + } |
| 30033 | + } |
| 30034 | + ], |
| 30035 | + "request": { |
| 30036 | + "method": "POST", |
| 30037 | + "header": [ |
| 30038 | + { |
| 30039 | + "key": "Authorization", |
| 30040 | + "type": "text", |
| 30041 | + "value": "Bearer {{token_member_tester1234}}" |
| 30042 | + } |
| 30043 | + ], |
| 30044 | + "body": { |
| 30045 | + "mode": "raw", |
| 30046 | + "raw": "{\"query\": { \"workPeriods.paymentStatus\": \"pending\" } }", |
| 30047 | + "options": { |
| 30048 | + "raw": { |
| 30049 | + "language": "json" |
| 30050 | + } |
| 30051 | + } |
| 30052 | + }, |
| 30053 | + "url": { |
| 30054 | + "raw": "{{URL}}/work-period-payments/query", |
| 30055 | + "host": [ |
| 30056 | + "{{URL}}" |
| 30057 | + ], |
| 30058 | + "path": [ |
| 30059 | + "work-period-payments", |
| 30060 | + "query" |
| 30061 | + ] |
| 30062 | + } |
| 30063 | + }, |
| 30064 | + "response": [] |
| 30065 | + }, |
29832 | 30066 | {
|
29833 | 30067 | "name": "✘ get work period payment with member",
|
29834 | 30068 | "event": [
|
|
32343 | 32577 | },
|
32344 | 32578 | "response": []
|
32345 | 32579 | },
|
| 32580 | + { |
| 32581 | + "name": "✘ create query work period payment with connect manager", |
| 32582 | + "event": [ |
| 32583 | + { |
| 32584 | + "listen": "test", |
| 32585 | + "script": { |
| 32586 | + "exec": [ |
| 32587 | + "pm.test('Status code is 403', function () {\r", |
| 32588 | + " pm.response.to.have.status(403);\r", |
| 32589 | + " const response = pm.response.json()\r", |
| 32590 | + " pm.expect(response.message).to.eq(\"You are not allowed to perform this action!\")\r", |
| 32591 | + "});" |
| 32592 | + ], |
| 32593 | + "type": "text/javascript" |
| 32594 | + } |
| 32595 | + } |
| 32596 | + ], |
| 32597 | + "request": { |
| 32598 | + "method": "POST", |
| 32599 | + "header": [ |
| 32600 | + { |
| 32601 | + "key": "Authorization", |
| 32602 | + "type": "text", |
| 32603 | + "value": "Bearer {{token_connect_manager_pshahcopmanag2}}" |
| 32604 | + } |
| 32605 | + ], |
| 32606 | + "body": { |
| 32607 | + "mode": "raw", |
| 32608 | + "raw": "{\"query\": { \"workPeriods.paymentStatus\": \"pending\" } }", |
| 32609 | + "options": { |
| 32610 | + "raw": { |
| 32611 | + "language": "json" |
| 32612 | + } |
| 32613 | + } |
| 32614 | + }, |
| 32615 | + "url": { |
| 32616 | + "raw": "{{URL}}/work-period-payments/query", |
| 32617 | + "host": [ |
| 32618 | + "{{URL}}" |
| 32619 | + ], |
| 32620 | + "path": [ |
| 32621 | + "work-period-payments", |
| 32622 | + "query" |
| 32623 | + ] |
| 32624 | + } |
| 32625 | + }, |
| 32626 | + "response": [] |
| 32627 | + }, |
32346 | 32628 | {
|
32347 | 32629 | "name": "✘ get work period payment with connect manager",
|
32348 | 32630 | "event": [
|
|
0 commit comments