From 668fbfb0e0a2d62312a70f782cade2a376f5e85a Mon Sep 17 00:00:00 2001
From: Bacteria <32611672+bacteriostat@users.noreply.github.com>
Date: Wed, 9 Jul 2025 19:03:12 +0530
Subject: [PATCH] bugfix: Use SingleLineEditor in New Request form to add env
variable highlighting (#4954)
* Use SingleLineEditor in New Request form to add variable highlighting
---
.../002-create-new-collection.spec.ts | 6 ++--
.../components/RequestPane/QueryUrl/index.js | 1 +
.../components/Sidebar/NewRequest/index.js | 32 +++++++++++--------
.../src/components/SingleLineEditor/index.js | 4 +++
4 files changed, 27 insertions(+), 16 deletions(-)
diff --git a/e2e-tests/001-sanity-tests/002-create-new-collection.spec.ts b/e2e-tests/001-sanity-tests/002-create-new-collection.spec.ts
index 4996ce580..705a2bc3b 100644
--- a/e2e-tests/001-sanity-tests/002-create-new-collection.spec.ts
+++ b/e2e-tests/001-sanity-tests/002-create-new-collection.spec.ts
@@ -12,10 +12,10 @@ test('Create new collection and add a simple HTTP request', async ({ page, creat
await page.getByRole('button', { name: 'Save' }).click();
await page.locator('#create-new-tab').getByRole('img').click();
await page.getByPlaceholder('Request Name').fill('r1');
- await page.getByPlaceholder('Request URL').click();
- await page.getByPlaceholder('Request URL').fill('http://localhost:8081');
+ await page.locator('#new-request-url .CodeMirror').click();
+ await page.locator('textarea').fill('http://localhost:8081');
await page.getByRole('button', { name: 'Create' }).click();
- await page.locator('pre').filter({ hasText: 'http://localhost:' }).click();
+ await page.locator('#request-url .CodeMirror').click();
await page.locator('textarea').fill('/ping');
await page.locator('#send-request').getByRole('img').nth(2).click();
diff --git a/packages/bruno-app/src/components/RequestPane/QueryUrl/index.js b/packages/bruno-app/src/components/RequestPane/QueryUrl/index.js
index 321ed4fd5..2035ba00c 100644
--- a/packages/bruno-app/src/components/RequestPane/QueryUrl/index.js
+++ b/packages/bruno-app/src/components/RequestPane/QueryUrl/index.js
@@ -83,6 +83,7 @@ const QueryUrl = ({ item, collection, handleRun }) => {