feat: tab service added (#3367)
This commit is contained in:
@@ -29,8 +29,9 @@ import {
|
||||
setGlobalEnvVariables,
|
||||
updateEnvironment,
|
||||
} from "~/newstore/environments"
|
||||
import { HoppRESTTab } from "./rest/tab"
|
||||
import { Ref } from "vue"
|
||||
import { HoppTab } from "~/services/tab"
|
||||
import { HoppRESTDocument } from "./rest/document"
|
||||
|
||||
const getTestableBody = (
|
||||
res: HoppRESTResponse & { type: "success" | "fail" }
|
||||
@@ -69,7 +70,7 @@ export const executedResponses$ = new Subject<
|
||||
>()
|
||||
|
||||
export function runRESTRequest$(
|
||||
tab: Ref<HoppRESTTab>
|
||||
tab: Ref<HoppTab<HoppRESTDocument>>
|
||||
): [
|
||||
() => void,
|
||||
Promise<
|
||||
@@ -127,7 +128,7 @@ export function runRESTRequest$(
|
||||
)()
|
||||
|
||||
if (E.isRight(runResult)) {
|
||||
tab.value.testResults = translateToSandboxTestResults(
|
||||
tab.value.document.testResults = translateToSandboxTestResults(
|
||||
runResult.right
|
||||
)
|
||||
|
||||
@@ -163,7 +164,7 @@ export function runRESTRequest$(
|
||||
)()
|
||||
}
|
||||
} else {
|
||||
tab.value.testResults = {
|
||||
tab.value.document.testResults = {
|
||||
description: "",
|
||||
expectResults: [],
|
||||
tests: [],
|
||||
|
||||
Reference in New Issue
Block a user