feat: tab service added (#3367)

This commit is contained in:
Anwarul Islam
2023-10-11 18:51:07 +06:00
committed by GitHub
parent 51510566bc
commit ba31cdabea
60 changed files with 1112 additions and 841 deletions

View File

@@ -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: [],