From 5c8d0a9e8a508c4ebc7329afcc646f3405d33ca3 Mon Sep 17 00:00:00 2001 From: Anoop M D Date: Sun, 22 Jan 2023 23:39:16 +0530 Subject: [PATCH] feat: script and tests functionality --- .../RequestPane/HttpRequestPane/index.js | 14 ++++ .../RequestPane/Script/StyledWrapper.js | 10 +++ .../components/RequestPane/Script/index.js | 39 +++++++++++ .../RequestPane/Tests/StyledWrapper.js | 10 +++ .../src/components/RequestPane/Tests/index.js | 39 +++++++++++ .../src/components/SingleLineEditor/index.js | 2 - .../ReduxStore/slices/collections/index.js | 30 +++++++++ .../bruno-app/src/utils/collections/index.js | 12 +++- .../{local-collection.js => collection.js} | 0 packages/bruno-lang/src/index.js | 28 +++++++- packages/bruno-lang/src/script-tag.js | 16 +++++ packages/bruno-lang/src/tests-tag.js | 16 +++++ packages/bruno-lang/tests/bru-to-json.spec.js | 8 ++- .../bruno-lang/tests/fixtures/request.bru | 8 +++ packages/bruno-lang/tests/json-to-bru.spec.js | 4 +- packages/bruno-lang/tests/script-tag.spec.js | 65 +++++++++++++++++++ packages/bruno-lang/tests/tests-tag.spec.js | 65 +++++++++++++++++++ .../bruno-schema/src/collections/index.js | 6 +- 18 files changed, 360 insertions(+), 12 deletions(-) create mode 100644 packages/bruno-app/src/components/RequestPane/Script/StyledWrapper.js create mode 100644 packages/bruno-app/src/components/RequestPane/Script/index.js create mode 100644 packages/bruno-app/src/components/RequestPane/Tests/StyledWrapper.js create mode 100644 packages/bruno-app/src/components/RequestPane/Tests/index.js rename packages/bruno-electron/src/ipc/{local-collection.js => collection.js} (100%) create mode 100644 packages/bruno-lang/src/script-tag.js create mode 100644 packages/bruno-lang/src/tests-tag.js create mode 100644 packages/bruno-lang/tests/script-tag.spec.js create mode 100644 packages/bruno-lang/tests/tests-tag.spec.js diff --git a/packages/bruno-app/src/components/RequestPane/HttpRequestPane/index.js b/packages/bruno-app/src/components/RequestPane/HttpRequestPane/index.js index ec66a44e0..fdc3e93c9 100644 --- a/packages/bruno-app/src/components/RequestPane/HttpRequestPane/index.js +++ b/packages/bruno-app/src/components/RequestPane/HttpRequestPane/index.js @@ -7,6 +7,8 @@ import QueryParams from 'components/RequestPane/QueryParams'; import RequestHeaders from 'components/RequestPane/RequestHeaders'; import RequestBody from 'components/RequestPane/RequestBody'; import RequestBodyMode from 'components/RequestPane/RequestBody/RequestBodyMode'; +import Script from 'components/RequestPane/Script'; +import Tests from 'components/RequestPane/Tests'; import StyledWrapper from './StyledWrapper'; const HttpRequestPane = ({ item, collection, leftPaneWidth }) => { @@ -34,6 +36,12 @@ const HttpRequestPane = ({ item, collection, leftPaneWidth }) => { case 'headers': { return ; } + case 'script': { + return