Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api): added rest-client tests for VS Code
- Loading branch information
Showing
4 changed files
with
75 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
{ | ||
"recommendations": [ | ||
"nrwl.angular-console", | ||
"angular.ng-template", | ||
"ms-vscode.vscode-typescript-tslint-plugin", | ||
"esbenp.prettier-vscode" | ||
] | ||
"recommendations": [ | ||
"nrwl.angular-console", | ||
"angular.ng-template", | ||
"ms-vscode.vscode-typescript-tslint-plugin", | ||
"esbenp.prettier-vscode", | ||
"googlecloudtools.cloudcode", | ||
"DavidAnson.vscode-markdownlint", | ||
"ms-azuretools.vscode-docker", | ||
"EditorConfig.EditorConfig", | ||
"donjayamanne.githistory", | ||
"eamodio.gitlens", | ||
"humao.rest-client" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"editor.fontFamily": "FiraCode-Retina", | ||
"editor.fontLigatures": true, | ||
|
||
// REST CLIENT | ||
"rest-client.environmentVariables": { | ||
"$shared": { | ||
"client-id": "ngxapi", | ||
"username": "sumo3", | ||
"password": "demo" | ||
}, | ||
"local": { | ||
"oidc-issuer-url": "https://keycloak.kashmora.com/auth/realms/ngx", | ||
"api-url": "http://localhost:3000" | ||
}, | ||
"local-admin": { | ||
"oidc-issuer-url": "https://keycloak.kashmora.com/auth/realms/ngx", | ||
"api-url": "http://localhost:3000", | ||
"username": "ngxadmin", | ||
"password": "ngxadmin" | ||
}, | ||
"production": { | ||
"oidc-issuer-url": "https://keycloak.kashmora.com/auth/realms/ngx", | ||
"api-url": "https://api.kashmora.com" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
### Generate JWT access token | ||
# @name login | ||
POST {{oidc-issuer-url}}/protocol/openid-connect/token | ||
Content-Type: application/x-www-form-urlencoded | ||
|
||
username={{username}}&password={{password}}&client_id={{client-id}}&grant_type=password&scope=openid | ||
|
||
@authToken = {{login.response.body.access_token}} | ||
|
||
### Test create notification | ||
# @name createNotification | ||
POST {{api-url}}/api/notifications | ||
content-type: application/json; charset=utf-8 | ||
Authorization: Bearer {{authToken}} | ||
|
||
{"title":"test123","body":"test12345","target":"sumo-topic","targetType":"topic","icon":"notifications","color":"warn","native":true} | ||
|
||
### Test get notifications | ||
# @name getNotification | ||
GET {{api-url}}/api/notifications | ||
Accept: application/json | ||
Authorization: Bearer {{authToken}} | ||
|
||
|
||
### Test send notification | ||
# @name sendNotification | ||
POST {{api-url}}/api/notifications/send | ||
content-type: application/json; charset=utf-8 | ||
Authorization: Bearer {{authToken}} | ||
|
||
{ "id" : "6a06cb98-1a3f-43ac-84e1-2312097decf9", "target": "sumo-topic" } | ||
|
||
### | ||
|
||
|
File renamed without changes.