This app can be used for complete end to end testing of Tray's connectivity API offering. Skip to instructions
Here are the features of the app:
- Onboard new end users
- Generate a UI form for any connector/ any operation. You can generate a complete form that includes all fields or only the required form, which will only show the required input fields for the operation.
- Create new Auths for a connector using auth dialogue popup.
- Call the connector by hitting the form submit button.
- Visualise the input payload for the Call connector which is generated live while the form is being filled.
- Editable codeblock to modify the payload before hitting the submit button to test for unhappy paths. (ex. Edit the spreadsheet_id before calling ‘get_rows’ operation for the Sheets connector to see what the response is for non-existent spreadsheet)
Pre requisites before using this app:
Setting up the server
- Clone this repo.
- Open terminal in the root folder of the repo.
- Switch to backend folder using
cd backend - Create a .env file in the backend folder and add your master token as
MASTER_TOKEN='<YOUR_MASTER_TOKEN>' - Run
npm install - Run
npm start
You server would be running on http://localhost:5001 now.
Now that the server is up and running successfully:
- Open a new terminal window and switch to frontend folder.
- Open
config.jsfile in src folder in frontend directory. - Edit the API_URL to
http://localhost:5001. Change the PARTNER_NAME to your embeddedId. - (Optional step) Inside
config.js, AUTH_DIALOG_URL by default isembedded.tray.io. Change it your white-labelld URL if you want to test whitelabelling. - Run
npm install - Run
npm run dev
The above step should deploy the app on http://localhost:5173
All done!