feat: collection runner (#3600)
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com> Co-authored-by: nivedin <nivedinp@gmail.com>
This commit is contained in:
@@ -8,7 +8,6 @@ import { computed, markRaw, reactive } from "vue"
|
||||
import { Component, Ref, ref, watch } from "vue"
|
||||
import { HoppRESTResponse } from "~/helpers/types/HoppRESTResponse"
|
||||
import { RESTTabService } from "../tab/rest"
|
||||
|
||||
/**
|
||||
* Defines how to render the text in an Inspector Result
|
||||
*/
|
||||
@@ -127,18 +126,24 @@ export class InspectionService extends Service {
|
||||
watch(
|
||||
() => [this.inspectors.entries(), this.restTab.currentActiveTab.value.id],
|
||||
() => {
|
||||
const currentTabRequest = computed(() =>
|
||||
this.restTab.currentActiveTab.value.document.type === "request"
|
||||
const currentTabRequest = computed(() => {
|
||||
if (
|
||||
this.restTab.currentActiveTab.value.document.type === "test-runner"
|
||||
)
|
||||
return null
|
||||
|
||||
return this.restTab.currentActiveTab.value.document.type === "request"
|
||||
? this.restTab.currentActiveTab.value.document.request
|
||||
: this.restTab.currentActiveTab.value.document.response
|
||||
.originalRequest
|
||||
)
|
||||
})
|
||||
|
||||
const currentTabResponse = computed(() =>
|
||||
this.restTab.currentActiveTab.value.document.type === "request"
|
||||
? this.restTab.currentActiveTab.value.document.response
|
||||
: null
|
||||
)
|
||||
const currentTabResponse = computed(() => {
|
||||
if (this.restTab.currentActiveTab.value.document.type === "request") {
|
||||
return this.restTab.currentActiveTab.value.document.response
|
||||
}
|
||||
return null
|
||||
})
|
||||
|
||||
const reqRef = computed(() => currentTabRequest.value)
|
||||
const resRef = computed(() => currentTabResponse.value)
|
||||
@@ -147,6 +152,7 @@ export class InspectionService extends Service {
|
||||
const debouncedRes = refDebounced(resRef, 1000, { maxWait: 2000 })
|
||||
|
||||
const inspectorRefs = Array.from(this.inspectors.values()).map((x) =>
|
||||
// @ts-expect-error - This is a valid call
|
||||
x.getInspections(debouncedReq, debouncedRes)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user