From afc109965a66843024f9b9a8839b8db66d8149d5 Mon Sep 17 00:00:00 2001
From: liyasthomas
Date: Tue, 22 Feb 2022 12:55:19 +0530
Subject: [PATCH] feat: indicate global variable
---
.../components/http/TestResult.vue | 14 ++++++
.../components/http/TestResultEnv.vue | 45 ++++++++++++-------
.../lenses/ResponseBodyRenderer.vue | 6 ++-
3 files changed, 47 insertions(+), 18 deletions(-)
diff --git a/packages/hoppscotch-app/components/http/TestResult.vue b/packages/hoppscotch-app/components/http/TestResult.vue
index 52c6c567c..e03535d28 100644
--- a/packages/hoppscotch-app/components/http/TestResult.vue
+++ b/packages/hoppscotch-app/components/http/TestResult.vue
@@ -59,6 +59,20 @@
+
+
-
-
+
+
+ {{ getIcon(status) }}
+
+
+ {{ env.key }}
+
+
+ {{ ` \xA0 — \xA0 ${env.value}` }}
+
+
+ {{ ` \xA0 ← \xA0 ${env.previousValue}` }}
+
+
+
- {{ getIcon(status) }}
-
-
- {{ env.key }}
-
-
- {{ ` \xA0 — \xA0 ${env.value}` }}
-
-
- {{ ` \xA0 ← \xA0 ${env.previousValue}` }}
+ Global
@@ -31,9 +39,12 @@ type Props = {
previousValue?: string
}
status: Status
+ global: boolean
}
-defineProps()
+withDefaults(defineProps(), {
+ global: false,
+})
const t = useI18n()
diff --git a/packages/hoppscotch-app/components/lenses/ResponseBodyRenderer.vue b/packages/hoppscotch-app/components/lenses/ResponseBodyRenderer.vue
index 2c0406032..693e18c57 100644
--- a/packages/hoppscotch-app/components/lenses/ResponseBodyRenderer.vue
+++ b/packages/hoppscotch-app/components/lenses/ResponseBodyRenderer.vue
@@ -24,7 +24,11 @@
:label="$t('test.results')"
:indicator="
testResults &&
- (testResults.expectResults.length || testResults.tests.length)
+ (testResults.expectResults.length ||
+ testResults.tests.length ||
+ testResults.envDiff.selected.additions.length ||
+ testResults.envDiff.selected.updations.length ||
+ testResults.envDiff.global.updations.length)
? true
: false
"