If there is a problem with ssh and despite fact that ssh is configured "permission promlem" comes out try to run bellow command:
ssh-agent -s
ssh-add ~/.ssh/id_rsa
| VISITORS_URI = mongodb+srv://Troll:[email protected]/Portfolio?retryWrites=true&w=majority |
If there is a problem with ssh and despite fact that ssh is configured "permission promlem" comes out try to run bellow command:
ssh-agent -s
ssh-add ~/.ssh/id_rsa
| Methods used with Json | |
| JSON.parse() - converts json object into javascript object | |
| JSON.parse() - converts javascript object into json object |
| replaceQuotationMarks(content) { | |
| let replacement = { | |
| """:'"', | |
| """:'"', | |
| "'":"'", | |
| "'":"'" | |
| } | |
| if ( Object.keys(replacement).map( item => | |
| content.includes(item) | |
| )){ |
func azure functionapp publish TescoSharePoint --javascript --publish-settings-only, -o - Deploys only local.setting.js to azure portal via azure CLI where --javascript describes environment.
func azure functionapp publish TescoSharePoint --javascript - Deploy cloud function to portal without local.settings.json
| var axios = require('axios').default; | |
| var qs = require('qs'); | |
| var options = { | |
| method: 'POST', | |
| url: '', | |
| headers: { | |
| cookie: 'fpc=ArTFiOPNPIFFlPNbhNqGpRrzEHueAQAAAH3DndgOAAAA; esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrQWi1S_kz74vM8SLurovqdECNMqdXKsFlLRa4IG3XZ-RacqzlQH6w2fl4bXqFj9sD_AXQ7DRwdHtPqTfBSMw3VAb5rgy0qQsH5InyS21xD8oEdOJ45J2JY-UdYJnli2hDDBTv0gf5jFf_19sGfNAg8yPnTdYWcRi1GHvE7PyV5C0gAA; x-ms-gateway-slice=estsfd; stsservicecookie=estsfd', | |
| 'Content-Type': 'application/x-www-form-urlencoded', | |
| }, |
POST https://{{env.CREATE_TICKET_URL}}
Headers
{
'Content-Type': 'application/json'
}
Body
In the mapStateToProps function of both BotResponseContainer and UserQueryContainer, you referenced the bot-accessibility parameter directly from the redux state, we don't reference parameters directly because we use selectors that compile multiple sources of config into a single object (for example div params, custom param JSON, etc.). Therefore can you do the following:
Create a new file accessibilitySelector.js within the selector's folder
Create a selector called accessibilitySelector that returns an object with a key-value pair of enabled which is a boolean that represents the bot-accessibility param (don't forget to use the booleanString` function).
Reference accessibilitySelector in both BotResponseContainer and UserQueryContainer by writing accessibility: accessibilitySelector(state)
Update any locations where you previously mentioned accessibility to now be accessibility.enabled`
To test elements and content in javascript files, you can use testing library JEST it is small and ease to use testing lib. To use Jest with React additionally we need add ENZYME
To install Jest, run command npm install --save-dev jest
To install Enzyme for React 16 and less, run command npm i --save-dev enzyme enzyme-adapter-react-16
For react v17 need be installed @wojtekmaj/enzyme-adapter-react-17' and then create in root directory setupTests.js with content: