Postman tests up
[portal.git] / portal-BE / deliveries / postman / Portal.postman_collection.json
1 {
2         "info": {
3                 "_postman_id": "1c6e52dd-039b-400b-a986-49d25e5a1428",
4                 "name": "Portal",
5                 "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
6         },
7         "item": [
8                 {
9                         "name": "LanguageController",
10                         "item": [
11                                 {
12                                         "name": "localhost:8080/auxapi/languageSetting/user/2",
13                                         "event": [
14                                                 {
15                                                         "listen": "test",
16                                                         "script": {
17                                                                 "id": "2fc1aa20-6048-4500-bdd2-5b2cc070f27c",
18                                                                 "exec": [
19                                                                         "pm.test(\"Status code is 200\", function () {",
20                                                                         "    pm.response.to.have.status(200);",
21                                                                         "});",
22                                                                         "pm.test(\"Response time is less than 200ms\", function () {",
23                                                                         "    pm.expect(pm.response.responseTime).to.be.below(200);",
24                                                                         "});"
25                                                                 ],
26                                                                 "type": "text/javascript"
27                                                         }
28                                                 }
29                                         ],
30                                         "request": {
31                                                 "auth": {
32                                                         "type": "basic",
33                                                         "basic": [
34                                                                 {
35                                                                         "key": "password",
36                                                                         "value": "4Gl6WL1bmwviYm+XZa6pS1vC0qKXWtn9wcZWdLx61L0=",
37                                                                         "type": "string"
38                                                                 },
39                                                                 {
40                                                                         "key": "username",
41                                                                         "value": "demo",
42                                                                         "type": "string"
43                                                                 }
44                                                         ]
45                                                 },
46                                                 "method": "GET",
47                                                 "header": [],
48                                                 "body": {
49                                                         "mode": "raw",
50                                                         "raw": ""
51                                                 },
52                                                 "url": {
53                                                         "raw": "localhost:8080/auxapi/languageSetting/user/2",
54                                                         "host": [
55                                                                 "localhost"
56                                                         ],
57                                                         "port": "8080",
58                                                         "path": [
59                                                                 "auxapi",
60                                                                 "languageSetting",
61                                                                 "user",
62                                                                 "2"
63                                                         ]
64                                                 }
65                                         },
66                                         "response": []
67                                 },
68                                 {
69                                         "name": "localhost:8080/auxapi/language",
70                                         "request": {
71                                                 "method": "GET",
72                                                 "header": [],
73                                                 "body": {
74                                                         "mode": "raw",
75                                                         "raw": ""
76                                                 },
77                                                 "url": {
78                                                         "raw": "localhost:8080/auxapi/language",
79                                                         "host": [
80                                                                 "localhost"
81                                                         ],
82                                                         "port": "8080",
83                                                         "path": [
84                                                                 "auxapi",
85                                                                 "language"
86                                                         ]
87                                                 }
88                                         },
89                                         "response": []
90                                 },
91                                 {
92                                         "name": "localhost:8080/auxapi/language",
93                                         "event": [
94                                                 {
95                                                         "listen": "test",
96                                                         "script": {
97                                                                 "id": "2fc1aa20-6048-4500-bdd2-5b2cc070f27c",
98                                                                 "exec": [
99                                                                         "pm.test(\"Status code is 200\", function () {",
100                                                                         "    pm.response.to.have.status(200);",
101                                                                         "});",
102                                                                         "pm.test(\"Response time is less than 200ms\", function () {",
103                                                                         "    pm.expect(pm.response.responseTime).to.be.below(200);",
104                                                                         "});"
105                                                                 ],
106                                                                 "type": "text/javascript"
107                                                         }
108                                                 }
109                                         ],
110                                         "request": {
111                                                 "auth": {
112                                                         "type": "basic",
113                                                         "basic": [
114                                                                 {
115                                                                         "key": "password",
116                                                                         "value": "4Gl6WL1bmwviYm+XZa6pS1vC0qKXWtn9wcZWdLx61L0=",
117                                                                         "type": "string"
118                                                                 },
119                                                                 {
120                                                                         "key": "username",
121                                                                         "value": "demo",
122                                                                         "type": "string"
123                                                                 }
124                                                         ]
125                                                 },
126                                                 "method": "POST",
127                                                 "header": [
128                                                         {
129                                                                 "key": "Content-Type",
130                                                                 "name": "Content-Type",
131                                                                 "value": "application/json",
132                                                                 "type": "text"
133                                                         }
134                                                 ],
135                                                 "body": {
136                                                         "mode": "raw",
137                                                         "raw": "{\n    \"languageName\": \"PL\",\n    \"languageAlias\": \"Polish\"\n}"
138                                                 },
139                                                 "url": {
140                                                         "raw": "localhost:8080/auxapi/language",
141                                                         "host": [
142                                                                 "localhost"
143                                                         ],
144                                                         "port": "8080",
145                                                         "path": [
146                                                                 "auxapi",
147                                                                 "language"
148                                                         ]
149                                                 }
150                                         },
151                                         "response": []
152                                 },
153                                 {
154                                         "name": "localhost:8080/auxapi/language",
155                                         "event": [
156                                                 {
157                                                         "listen": "test",
158                                                         "script": {
159                                                                 "id": "2fc1aa20-6048-4500-bdd2-5b2cc070f27c",
160                                                                 "exec": [
161                                                                         "pm.test(\"Status code is 200\", function () {",
162                                                                         "    pm.response.to.have.status(200);",
163                                                                         "});",
164                                                                         "",
165                                                                         "pm.test(\"Response time is less than 200ms\", function () {",
166                                                                         "    pm.expect(pm.response.responseTime).to.be.below(200);",
167                                                                         "});",
168                                                                         "",
169                                                                         "var customer = JSON.parse(responseBody);",
170                                                                         "",
171                                                                         "tests[\"Message is valid\"] = customer.message === \"FAILURE\"",
172                                                                         "tests[\"Status is valid\"] = customer.status === \"ERROR\"",
173                                                                         "tests[\"Response is valid\"] = customer.response === \"FnLanguage is not valid, may have unsafe html content\""
174                                                                 ],
175                                                                 "type": "text/javascript"
176                                                         }
177                                                 }
178                                         ],
179                                         "request": {
180                                                 "auth": {
181                                                         "type": "basic",
182                                                         "basic": [
183                                                                 {
184                                                                         "key": "password",
185                                                                         "value": "4Gl6WL1bmwviYm+XZa6pS1vC0qKXWtn9wcZWdLx61L0=",
186                                                                         "type": "string"
187                                                                 },
188                                                                 {
189                                                                         "key": "username",
190                                                                         "value": "demo",
191                                                                         "type": "string"
192                                                                 }
193                                                         ]
194                                                 },
195                                                 "method": "POST",
196                                                 "header": [
197                                                         {
198                                                                 "key": "Content-Type",
199                                                                 "name": "Content-Type",
200                                                                 "value": "application/json",
201                                                                 "type": "text"
202                                                         }
203                                                 ],
204                                                 "body": {
205                                                         "mode": "raw",
206                                                         "raw": "{\n    \"languageName\": \"PL\",\n    \"languageAlias\": \"<script>alert(“XSS”)</script>\"\n}"
207                                                 },
208                                                 "url": {
209                                                         "raw": "localhost:8080/auxapi/language",
210                                                         "host": [
211                                                                 "localhost"
212                                                         ],
213                                                         "port": "8080",
214                                                         "path": [
215                                                                 "auxapi",
216                                                                 "language"
217                                                         ]
218                                                 },
219                                                 "description": "XSS test"
220                                         },
221                                         "response": []
222                                 }
223                         ],
224                         "auth": {
225                                 "type": "basic",
226                                 "basic": [
227                                         {
228                                                 "key": "password",
229                                                 "value": "4Gl6WL1bmwviYm+XZa6pS1vC0qKXWtn9wcZWdLx61L0=",
230                                                 "type": "string"
231                                         },
232                                         {
233                                                 "key": "username",
234                                                 "value": "demo",
235                                                 "type": "string"
236                                         }
237                                 ]
238                         }
239                 },
240                 {
241                         "name": "http://localhost:8080/logout",
242                         "request": {
243                                 "auth": {
244                                         "type": "noauth"
245                                 },
246                                 "method": "GET",
247                                 "header": [],
248                                 "body": {
249                                         "mode": "raw",
250                                         "raw": ""
251                                 },
252                                 "url": {
253                                         "raw": "http://localhost:8080/logout",
254                                         "protocol": "http",
255                                         "host": [
256                                                 "localhost"
257                                         ],
258                                         "port": "8080",
259                                         "path": [
260                                                 "logout"
261                                         ]
262                                 }
263                         },
264                         "response": []
265                 }
266         ]
267 }