mirror of
https://github.com/Kong/insomnia.git
synced 2026-11-04 12:03:53 -05:00
test(insomnia-test): adapt specs to ResponseView statusBar/preview
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6f807860ce
commit
9fc0aca923
56 files changed
+153
-153
No files matched your search
@@ -44,7 +44,7 @@ test("Verify Cookie With Mismatched Path Is Not Sent With HTTP Request", async (
|
||||
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
|
||||
const { cookies } = responseView.body as { cookies: Record<string, string> };
|
||||
const { cookies } = responseView.preview as { cookies: Record<string, string> };
|
||||
expect(cookies).not.toHaveProperty(mismatchedCookie.key);
|
||||
expect(cookies).toMatchObject({ [matchedCookie.key]: matchedCookie.value });
|
||||
});
|
||||
@@ -40,7 +40,7 @@ test("Verify Re-Linking Same Cookie Key Overwrites Previous Value", async ({
|
||||
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
|
||||
const { cookies } = responseView.body as { cookies: Record<string, string> };
|
||||
const { cookies } = responseView.preview as { cookies: Record<string, string> };
|
||||
expect(cookieList.filter((cookie) => cookie.key === key)).toHaveLength(1);
|
||||
expect(cookieList).toMatchObject([{ key, value: freshValue }]);
|
||||
expect(cookies).toMatchObject({ [key]: freshValue });
|
||||
|
||||
@@ -45,7 +45,7 @@ test("Verify Expired Cookie Is Not Sent With HTTP Request", async ({
|
||||
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
|
||||
const { cookies } = responseView.body as { cookies: Record<string, string> };
|
||||
const { cookies } = responseView.preview as { cookies: Record<string, string> };
|
||||
expect(cookies).not.toHaveProperty(expiredCookie.key);
|
||||
expect(cookies).toMatchObject({ [activeCookie.key]: activeCookie.value });
|
||||
});
|
||||
@@ -48,9 +48,9 @@ test("Verify Linked Cookie Is Sent With HTTP Request", async ({ user }) => {
|
||||
]);
|
||||
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
|
||||
const { cookies } = responseView.body as { cookies: Record<string, string> };
|
||||
const { cookies } = responseView.preview as { cookies: Record<string, string> };
|
||||
expect(Object.keys(cookies)).toHaveLength(2);
|
||||
|
||||
const expectedCookies = Object.fromEntries(
|
||||
|
||||
@@ -47,7 +47,7 @@ test("Verify __Host- Prefixed Cookie Is Only Sent When Marked HostOnly", async (
|
||||
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
|
||||
const { cookies } = responseView.body as { cookies: Record<string, string> };
|
||||
const { cookies } = responseView.preview as { cookies: Record<string, string> };
|
||||
expect(cookies).toMatchObject({
|
||||
[hostOnlyCookie.key]: hostOnlyCookie.value,
|
||||
});
|
||||
|
||||
@@ -46,15 +46,15 @@ test("Verify HttpOnly Cookie Flag Persists And Cookie Is Always Sent Over HTTP A
|
||||
const httpResponse = await httpRequestFlow.send(httpRequest);
|
||||
const httpsResponse = await httpRequestFlow.send(httpsRequest);
|
||||
|
||||
expect(httpResponse.statusCode).toBe(200);
|
||||
const { cookies: httpCookies } = httpResponse.body as {
|
||||
expect(httpResponse.statusBar.code).toBe(200);
|
||||
const { cookies: httpCookies } = httpResponse.preview as {
|
||||
cookies: Record<string, string>;
|
||||
};
|
||||
expect(httpCookies).toMatchObject({
|
||||
[httpOnlyCookie.key]: httpOnlyCookie.value,
|
||||
});
|
||||
expect(httpsResponse.statusCode).toBe(200);
|
||||
const { cookies: httpsCookies } = httpsResponse.body as {
|
||||
expect(httpsResponse.statusBar.code).toBe(200);
|
||||
const { cookies: httpsCookies } = httpsResponse.preview as {
|
||||
cookies: Record<string, string>;
|
||||
};
|
||||
expect(httpsCookies).toMatchObject({
|
||||
|
||||
@@ -41,7 +41,7 @@ test("Verify Editing A Cookie Via The Raw Tab Updates Its Fields And Is Sent", a
|
||||
await cookiePage.close();
|
||||
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
const { cookies: sentCookies } = responseView.body as {
|
||||
const { cookies: sentCookies } = responseView.preview as {
|
||||
cookies: Record<string, string>;
|
||||
};
|
||||
|
||||
|
||||
@@ -46,8 +46,8 @@ test("Verify Secure Cookie Is Sent Over HTTPS But Not Over Plain HTTP", async ({
|
||||
await cookieFlow.link(httpRequest, [secureCookie]);
|
||||
|
||||
const httpsResponse = await httpRequestFlow.send(httpsRequest);
|
||||
expect(httpsResponse.statusCode).toBe(200);
|
||||
const { cookies: httpsCookies } = httpsResponse.body as {
|
||||
expect(httpsResponse.statusBar.code).toBe(200);
|
||||
const { cookies: httpsCookies } = httpsResponse.preview as {
|
||||
cookies: Record<string, string>;
|
||||
};
|
||||
expect(httpsCookies).toMatchObject({
|
||||
@@ -55,7 +55,7 @@ test("Verify Secure Cookie Is Sent Over HTTPS But Not Over Plain HTTP", async ({
|
||||
});
|
||||
|
||||
const httpResponse = await httpRequestFlow.send(httpRequest);
|
||||
const { cookies: httpCookies } = httpResponse.body as {
|
||||
const { cookies: httpCookies } = httpResponse.preview as {
|
||||
cookies: Record<string, string>;
|
||||
};
|
||||
expect(httpCookies).not.toHaveProperty(secureCookie.key);
|
||||
|
||||
@@ -61,8 +61,8 @@ test("Verify Variable Names Are Case Sensitive Across Environment Levels", async
|
||||
} satisfies HttpRequest);
|
||||
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.body).toMatchObject({
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(responseView.preview).toMatchObject({
|
||||
args: { lower: baseValue, upper: subValue },
|
||||
});
|
||||
});
|
||||
@@ -53,6 +53,6 @@ test("Verify Circular Variable Reference Resolves To Literal Unresolved Text", a
|
||||
} satisfies HttpRequest);
|
||||
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.body).toMatchObject({ args: { value: `{{${variableA}}}` } });
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(responseView.preview).toMatchObject({ args: { value: `{{${variableA}}}` } });
|
||||
});
|
||||
+2
-2
@@ -55,6 +55,6 @@ test("Verify creating and duplicating a global environment", async ({
|
||||
|
||||
expect(duplicatedEnvironment.id).not.toBe(environment.id);
|
||||
expect(duplicatedEnvironment.name).toBe(duplicatedName);
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.body).toMatchObject({ args: { value: variableValue } });
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(responseView.preview).toMatchObject({ args: { value: variableValue } });
|
||||
});
|
||||
+2
-2
@@ -60,6 +60,6 @@ test("Verify a disabled sub-environment variable falls back to the base environm
|
||||
} satisfies HttpRequest);
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.body).toMatchObject({ args: { value: baseValue } });
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(responseView.preview).toMatchObject({ args: { value: baseValue } });
|
||||
});
|
||||
@@ -63,8 +63,8 @@ test("Verify Disabled Mid-Chain Variable Leaves Reference Unresolved", async ({
|
||||
} satisfies HttpRequest);
|
||||
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.body).toMatchObject({
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(responseView.preview).toMatchObject({
|
||||
args: { value: `{{${midVariable}}}` },
|
||||
});
|
||||
});
|
||||
+4
-4
@@ -65,12 +65,12 @@ test("Verify a folder environment overrides sub and base environments for its re
|
||||
const responseInFolder = await httpRequestFlow.send(requestInFolder);
|
||||
const responseOutsideFolder = await httpRequestFlow.send(requestOutsideFolder);
|
||||
|
||||
expect(responseInFolder.statusCode).toBe(200);
|
||||
expect(responseInFolder.body).toMatchObject({
|
||||
expect(responseInFolder.statusBar.code).toBe(200);
|
||||
expect(responseInFolder.preview).toMatchObject({
|
||||
args: { shared: folderShared, subOnly: subSubOnly },
|
||||
});
|
||||
expect(responseOutsideFolder.statusCode).toBe(200);
|
||||
expect(responseOutsideFolder.body).toMatchObject({
|
||||
expect(responseOutsideFolder.statusBar.code).toBe(200);
|
||||
expect(responseOutsideFolder.preview).toMatchObject({
|
||||
args: { shared: subShared, subOnly: subSubOnly },
|
||||
});
|
||||
});
|
||||
@@ -56,8 +56,8 @@ test("Verify Multiple Variables Mixed In A Single Value Resolve Together", async
|
||||
} satisfies HttpRequest);
|
||||
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.body).toMatchObject({
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(responseView.preview).toMatchObject({
|
||||
args: { value: `${firstValue}-${secondValue}` },
|
||||
});
|
||||
});
|
||||
@@ -62,6 +62,6 @@ test("Verify Multi-Level Nested Variable Resolution", async ({ user }) => {
|
||||
} satisfies HttpRequest);
|
||||
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.body).toMatchObject({ args: { value: finalValue } });
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(responseView.preview).toMatchObject({ args: { value: finalValue } });
|
||||
});
|
||||
+2
-2
@@ -83,8 +83,8 @@ testWithVaultKey(
|
||||
});
|
||||
const responseView = await httpRequestFlow.send(request!);
|
||||
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect((responseView.body as { data: string }).data).toBe(
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect((responseView.preview as { data: string }).data).toBe(
|
||||
`${secretValueFoo}\n${secretValueHello}`,
|
||||
);
|
||||
},
|
||||
|
||||
@@ -45,8 +45,8 @@ test("Verify Self-Referencing Variable Resolves To Literal Unresolved Text", asy
|
||||
} satisfies HttpRequest);
|
||||
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.body).toMatchObject({
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(responseView.preview).toMatchObject({
|
||||
args: { value: `{{${selfVariable}}}` },
|
||||
});
|
||||
});
|
||||
+4
-4
@@ -66,8 +66,8 @@ test("Verify an empty sub-environment falls back to the base environment until i
|
||||
]);
|
||||
const afterOwnValue = await httpRequestFlow.send(request);
|
||||
|
||||
expect(beforeOwnValue.statusCode).toBe(200);
|
||||
expect(beforeOwnValue.body).toMatchObject({ args: { value: baseValue } });
|
||||
expect(afterOwnValue.statusCode).toBe(200);
|
||||
expect(afterOwnValue.body).toMatchObject({ args: { value: subValue } });
|
||||
expect(beforeOwnValue.statusBar.code).toBe(200);
|
||||
expect(beforeOwnValue.preview).toMatchObject({ args: { value: baseValue } });
|
||||
expect(afterOwnValue.statusBar.code).toBe(200);
|
||||
expect(afterOwnValue.preview).toMatchObject({ args: { value: subValue } });
|
||||
});
|
||||
@@ -59,6 +59,6 @@ test("Verify Sub Environment Variable Overrides Base Environment", async ({
|
||||
url: `${HTTP_SERVER}/post?value={{${sharedVariable}}}`,
|
||||
} satisfies HttpRequest);
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.body).toMatchObject({ args: { value: subValue } });
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(responseView.preview).toMatchObject({ args: { value: subValue } });
|
||||
});
|
||||
+2
-2
@@ -146,9 +146,9 @@ for (const scenario of scenarios) {
|
||||
scenario.landingRow,
|
||||
);
|
||||
|
||||
expect(response.statusCode).toBe(200);
|
||||
expect(response.statusBar.code).toBe(200);
|
||||
expect(
|
||||
JSON.parse((response.body as { data: string }).data)[scenario.field],
|
||||
JSON.parse((response.preview as { data: string }).data)[scenario.field],
|
||||
).toBe(scenario.value);
|
||||
expect(modal.source).toContain(scenario.source);
|
||||
expect(modal.preview).toBe(scenario.value);
|
||||
|
||||
+4
-4
@@ -74,12 +74,12 @@ testWithVaultKey(
|
||||
await environmentFlow.activate(collection, "base with vault");
|
||||
const invalidRequest = await httpRequestFlow.get("legacy-invalid-vault");
|
||||
|
||||
expect(arrayResponse.statusCode).toBe(200);
|
||||
expect((arrayResponse.body as { data: string }).data).toBe(
|
||||
expect(arrayResponse.statusBar.code).toBe(200);
|
||||
expect((arrayResponse.preview as { data: string }).data).toBe(
|
||||
"vault_array_a\nvault_array_b",
|
||||
);
|
||||
expect(objectResponse.statusCode).toBe(200);
|
||||
expect((objectResponse.body as { data: string }).data).toBe("secv1\nsecv2");
|
||||
expect(objectResponse.statusBar.code).toBe(200);
|
||||
expect((objectResponse.preview as { data: string }).data).toBe("secv1\nsecv2");
|
||||
await expect(httpRequestFlow.send(invalidRequest!)).rejects.toThrow(
|
||||
/vault is a reserved key for insomnia vault/,
|
||||
);
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ test('Verify insomnia.test/insomnia.expect report PASS/FAIL results, including a
|
||||
});
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
await expect
|
||||
.poll(() => responseView.tests?.(), { timeout: DEFAULT_TIMEOUT })
|
||||
.toEqual(
|
||||
|
||||
@@ -50,7 +50,7 @@ test("Send HTTP Request with x-www-form-urlencoded Body", async ({ user }) => {
|
||||
|
||||
const persisted = await httpRequestFlow.create(collection, request);
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
const raw = (responseView.body as { data: string }).data;
|
||||
const raw = (responseView.preview as { data: string }).data;
|
||||
|
||||
expect(persisted.body?.mimeType).toBe(ContentType.Form);
|
||||
expect(persisted.body?.params).toMatchObject([
|
||||
@@ -58,12 +58,12 @@ test("Send HTTP Request with x-www-form-urlencoded Body", async ({ user }) => {
|
||||
{ name: "userId", value: userId },
|
||||
{ name: "excluded", disabled: true },
|
||||
]);
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(Object.fromEntries(new URLSearchParams(raw))).toEqual({
|
||||
title,
|
||||
userId,
|
||||
});
|
||||
expect(responseView.body).toMatchObject({
|
||||
expect(responseView.preview).toMatchObject({
|
||||
headers: expect.objectContaining({
|
||||
"content-type": expect.stringContaining(ContentType.Form),
|
||||
}),
|
||||
@@ -94,8 +94,8 @@ test("Send HTTP Request with JSON Body", async ({ user }) => {
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
|
||||
expect(persisted).toMatchObject(request);
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.body).toMatchObject({
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(responseView.preview).toMatchObject({
|
||||
json: payload,
|
||||
headers: expect.objectContaining({
|
||||
"content-type": expect.stringContaining(ContentType.JSON),
|
||||
@@ -128,8 +128,8 @@ test("Send HTTP Request with XML Body", async ({ user }) => {
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
|
||||
expect(persisted).toMatchObject(request);
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.body).toMatchObject({
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(responseView.preview).toMatchObject({
|
||||
data: xml,
|
||||
headers: expect.objectContaining({
|
||||
"content-type": expect.stringContaining(ContentType.XML),
|
||||
@@ -164,8 +164,8 @@ test("Send HTTP Request with No Body explicitly selected", async ({ user }) => {
|
||||
url: request.url,
|
||||
body: undefined,
|
||||
});
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.body).toMatchObject({
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(responseView.preview).toMatchObject({
|
||||
data: "",
|
||||
json: null,
|
||||
});
|
||||
@@ -204,7 +204,7 @@ test("Send HTTP Request with multipart/form-data Body including a file field", a
|
||||
await httpRequestFlow.create(collection, request);
|
||||
const persisted = await httpRequestFlow.get(request.name);
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
const raw = (responseView.body as { data: string }).data;
|
||||
const raw = (responseView.preview as { data: string }).data;
|
||||
|
||||
expect(persisted?.body?.mimeType).toBe(ContentType.Multipart);
|
||||
expect(persisted?.body?.params?.[0]).toMatchObject({
|
||||
@@ -213,12 +213,12 @@ test("Send HTTP Request with multipart/form-data Body including a file field", a
|
||||
});
|
||||
expect(persisted?.body?.params?.[1]?.name).toBe("upload");
|
||||
expect(persisted?.body?.params?.[1]?.fileName).toContain("upload-sample.txt");
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(raw).toContain('name="title"');
|
||||
expect(raw).toContain(title);
|
||||
expect(raw).toContain('name="upload"; filename="upload-sample.txt"');
|
||||
expect(raw).toContain("insomnia-e2e-upload-fixture");
|
||||
expect(responseView.body).toMatchObject({
|
||||
expect(responseView.preview).toMatchObject({
|
||||
headers: expect.objectContaining({
|
||||
"content-type": expect.stringContaining(ContentType.Multipart),
|
||||
}),
|
||||
|
||||
@@ -51,6 +51,6 @@ test("Verify Cancelling an In-Flight HTTP Request Shows a Cancellation Message a
|
||||
const laterResponse = await httpRequestFlow.send(laterRequest);
|
||||
|
||||
expect(requestStateAfterCancel).toBe(RequestState.Idle);
|
||||
expect(cancelledResponse.statusCode).toBeUndefined();
|
||||
expect(laterResponse.statusCode).toBe(200);
|
||||
expect(cancelledResponse.statusBar.code).toBeUndefined();
|
||||
expect(laterResponse.statusBar.code).toBe(200);
|
||||
});
|
||||
@@ -51,6 +51,6 @@ test("Verify A Response Tag Chain Resolves Through Multiple Requests", async ({
|
||||
|
||||
const responseView = await httpRequestFlow.send(third);
|
||||
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.body).toMatchObject({ data: "first and second and third" });
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(responseView.preview).toMatchObject({ data: "first and second and third" });
|
||||
});
|
||||
@@ -30,9 +30,9 @@ test("Verify Custom CA Root Certificate Establishes Trust For HTTPS Request", as
|
||||
url,
|
||||
});
|
||||
const responseBeforeCa = await httpRequestFlow.send(requestBeforeCa);
|
||||
expect(responseBeforeCa.statusCode).toBeUndefined();
|
||||
expect(responseBeforeCa.statusBar.code).toBeUndefined();
|
||||
await expect
|
||||
.poll(() => responseBeforeCa.console?.(), { timeout: DEFAULT_TIMEOUT })
|
||||
.poll(() => responseBeforeCa.console(), { timeout: DEFAULT_TIMEOUT })
|
||||
.toMatch(/unable to get local issuer certificate/i);
|
||||
|
||||
await certificatesFlow.setCaCertificate(
|
||||
@@ -46,8 +46,8 @@ test("Verify Custom CA Root Certificate Establishes Trust For HTTPS Request", as
|
||||
url,
|
||||
});
|
||||
const responseAfterCa = await httpRequestFlow.send(requestAfterCa);
|
||||
expect(responseAfterCa.statusCode).toBe(200);
|
||||
expect(responseAfterCa.body).toMatchObject({
|
||||
expect(responseAfterCa.statusBar.code).toBe(200);
|
||||
expect(responseAfterCa.preview).toMatchObject({
|
||||
headers: expect.objectContaining({ host: "localhost:4062" }),
|
||||
});
|
||||
});
|
||||
@@ -45,9 +45,9 @@ test("Verify a folder-level script wrapping insomnia.variables.replaceIn resolve
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
|
||||
await expect
|
||||
.poll(() => responseView.console?.(), { timeout: DEFAULT_TIMEOUT })
|
||||
.poll(() => responseView.console(), { timeout: DEFAULT_TIMEOUT })
|
||||
.toMatch(/log: string \S+/);
|
||||
const consoleText = await responseView.console?.();
|
||||
const consoleText = await responseView.console();
|
||||
expect(consoleText).not.toContain("Promise");
|
||||
expect(consoleText).not.toContain("undefined");
|
||||
});
|
||||
@@ -43,9 +43,9 @@ test("Verify Import from URL Moves Query String Into Params and Preserves It on
|
||||
expect.objectContaining({ name: paramName2, value: paramValue2 }),
|
||||
]),
|
||||
);
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
await expect
|
||||
.poll(() => responseView.console?.(), { timeout: DEFAULT_TIMEOUT })
|
||||
.poll(() => responseView.console(), { timeout: DEFAULT_TIMEOUT })
|
||||
.toContain(
|
||||
`Preparing request to ${baseUrl}?${paramName1}=${paramValue1}&${paramName2}=${paramValue2}`,
|
||||
);
|
||||
|
||||
@@ -32,7 +32,7 @@ test("Verify HTTP request succeeds against a local IPv6 address", async ({
|
||||
});
|
||||
const responseView = await httpRequestFlow.send(request!);
|
||||
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.statusMessage).toBe("OK");
|
||||
expect(responseView.body).toMatchObject({ data: bodyText });
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(responseView.statusBar.message).toBe("OK");
|
||||
expect(responseView.preview).toMatchObject({ data: bodyText });
|
||||
});
|
||||
@@ -49,8 +49,8 @@ test("Verify LiquidJS control flow tags render correctly", async ({ user }) => {
|
||||
} satisfies HttpRequest);
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.body).toMatchObject({
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(responseView.preview).toMatchObject({
|
||||
data: `${envValue}-big-123-yes`,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -37,9 +37,9 @@ test("Verify Client Certificate Toggle Controls mTLS Enforcement For HTTP Reques
|
||||
url,
|
||||
});
|
||||
const responseBeforeCert = await httpRequestFlow.send(requestBeforeCert);
|
||||
expect(responseBeforeCert.statusCode).toBeUndefined();
|
||||
expect(responseBeforeCert.statusBar.code).toBeUndefined();
|
||||
await expect
|
||||
.poll(() => responseBeforeCert.console?.(), { timeout: DEFAULT_TIMEOUT })
|
||||
.poll(() => responseBeforeCert.console(), { timeout: DEFAULT_TIMEOUT })
|
||||
.toMatch(/certificate required/i);
|
||||
|
||||
await certificatesFlow.addClientCertificate(collection, {
|
||||
@@ -54,8 +54,8 @@ test("Verify Client Certificate Toggle Controls mTLS Enforcement For HTTP Reques
|
||||
url,
|
||||
});
|
||||
const responseWithCert = await httpRequestFlow.send(requestWithCert);
|
||||
expect(responseWithCert.statusCode).toBe(200);
|
||||
expect(responseWithCert.body).toMatchObject({
|
||||
expect(responseWithCert.statusBar.code).toBe(200);
|
||||
expect(responseWithCert.preview).toMatchObject({
|
||||
headers: expect.objectContaining({ host: "localhost:4063" }),
|
||||
});
|
||||
|
||||
@@ -71,8 +71,8 @@ test("Verify Client Certificate Toggle Controls mTLS Enforcement For HTTP Reques
|
||||
url,
|
||||
});
|
||||
const responseAfterDisable = await httpRequestFlow.send(requestAfterDisable);
|
||||
expect(responseAfterDisable.statusCode).toBeUndefined();
|
||||
expect(responseAfterDisable.statusBar.code).toBeUndefined();
|
||||
await expect
|
||||
.poll(() => responseAfterDisable.console?.(), { timeout: DEFAULT_TIMEOUT })
|
||||
.poll(() => responseAfterDisable.console(), { timeout: DEFAULT_TIMEOUT })
|
||||
.toMatch(/certificate required/i);
|
||||
});
|
||||
@@ -40,10 +40,10 @@ test("Verify OAuth 1.0 auth fields persist and sign the sent request", async ({
|
||||
});
|
||||
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
const authHeader = (responseView.body as { headers: Record<string, string> })
|
||||
const authHeader = (responseView.preview as { headers: Record<string, string> })
|
||||
.headers.authorization;
|
||||
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(authHeader).toContain("OAuth ");
|
||||
expect(authHeader).toContain(
|
||||
`oauth_consumer_key="${authentication.consumerKey}"`,
|
||||
|
||||
@@ -49,14 +49,14 @@ for (const pkceMethod of ["S256", "plain"] as const) {
|
||||
).json();
|
||||
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
const body = responseView.body as { authorization?: string };
|
||||
const body = responseView.preview as { authorization?: string };
|
||||
|
||||
expect(tokens.accessToken).not.toBe("");
|
||||
expect(lastTokenRequest.grantType).toBe("authorization_code");
|
||||
expect(lastTokenRequest.pkceUsed).toBe(true);
|
||||
expect(lastTokenRequest.pkceMethod).toBe(pkceMethod);
|
||||
expect(lastTokenRequest.pkceVerified).toBe(true);
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(body.authorization).toBe(`Bearer ${tokens.accessToken}`);
|
||||
});
|
||||
}
|
||||
@@ -46,13 +46,13 @@ test("Verify Authorization Code grant fetches tokens via a popup and authorizes
|
||||
).json();
|
||||
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
const body = responseView.body as { authorization?: string };
|
||||
const body = responseView.preview as { authorization?: string };
|
||||
|
||||
expect(tokens.accessToken).not.toBe("");
|
||||
expect(tokens.refreshToken).not.toBe("");
|
||||
expect(tokens.identityToken).not.toBe("");
|
||||
expect(lastTokenRequest.grantType).toBe("authorization_code");
|
||||
expect(lastTokenRequest.pkceUsed).toBe(false);
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(body.authorization).toBe(`Bearer ${tokens.accessToken}`);
|
||||
});
|
||||
@@ -47,11 +47,11 @@ test("Verify Client Credentials grant fetches tokens with no popup and authorize
|
||||
).json();
|
||||
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
const body = responseView.body as { authorization?: string };
|
||||
const body = responseView.preview as { authorization?: string };
|
||||
|
||||
expect(tokens.accessToken).not.toBe("");
|
||||
expect(windowsAfterFetch).toBe(windowsBeforeFetch);
|
||||
expect(lastTokenRequest.grantType).toBe("client_credentials");
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(body.authorization).toBe(`Bearer ${tokens.accessToken}`);
|
||||
});
|
||||
@@ -45,9 +45,9 @@ test("Verify a request set to Inherit from parent picks up its folder's OAuth 2.
|
||||
await httpRequestPage.auth.setAuthType(AuthType.Inherit);
|
||||
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
const body = responseView.body as { authorization?: string };
|
||||
const body = responseView.preview as { authorization?: string };
|
||||
|
||||
expect(folderTokens.accessToken).not.toBe("");
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(body.authorization).toBe(`Bearer ${folderTokens.accessToken}`);
|
||||
});
|
||||
@@ -76,10 +76,10 @@ test("Verify Implicit grant with response type ID and Access Token authorizes th
|
||||
const tokens = await httpRequestFlow.fetchOAuth2Tokens(request);
|
||||
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
const body = responseView.body as { authorization?: string };
|
||||
const body = responseView.preview as { authorization?: string };
|
||||
|
||||
expect(tokens.identityToken).not.toBe("");
|
||||
expect(tokens.accessToken).not.toBe("");
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(body.authorization).toBe(`Bearer ${tokens.accessToken}`);
|
||||
});
|
||||
@@ -49,12 +49,12 @@ test("Verify Resource Owner Password Credentials grant fetches tokens with no po
|
||||
).json();
|
||||
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
const body = responseView.body as { authorization?: string };
|
||||
const body = responseView.preview as { authorization?: string };
|
||||
|
||||
expect(tokens.accessToken).not.toBe("");
|
||||
expect(tokens.refreshToken).not.toBe("");
|
||||
expect(windowsAfterFetch).toBe(windowsBeforeFetch);
|
||||
expect(lastTokenRequest.grantType).toBe("password");
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(body.authorization).toBe(`Bearer ${tokens.accessToken}`);
|
||||
});
|
||||
+2
-2
@@ -77,8 +77,8 @@ test("Verify pending async work in a pre-request script (Promise, setTimeout, se
|
||||
});
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.body).toMatchObject({
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(responseView.preview).toMatchObject({
|
||||
json: {
|
||||
asyncDoneViaPromise: true,
|
||||
asyncDoneViaTimeout: true,
|
||||
|
||||
+4
-4
@@ -54,14 +54,14 @@ test("Verify pre-request script reads and replaces the client certificate via in
|
||||
});
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
await expect
|
||||
.poll(() => responseView.console?.(), { timeout: DEFAULT_TIMEOUT })
|
||||
.poll(() => responseView.console(), { timeout: DEFAULT_TIMEOUT })
|
||||
.toContain("Adding SSL PEM certificate");
|
||||
await expect
|
||||
.poll(() => responseView.console?.(), { timeout: DEFAULT_TIMEOUT })
|
||||
.poll(() => responseView.console(), { timeout: DEFAULT_TIMEOUT })
|
||||
.toContain("Adding SSL KEY certificate");
|
||||
await expect
|
||||
.poll(() => responseView.console?.(), { timeout: DEFAULT_TIMEOUT })
|
||||
.poll(() => responseView.console(), { timeout: DEFAULT_TIMEOUT })
|
||||
.toContain("original cert:");
|
||||
});
|
||||
@@ -35,8 +35,8 @@ test('Verify pre-request script manages cookies via insomnia.cookies.jar() and t
|
||||
});
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.body).toEqual({
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(responseView.preview).toEqual({
|
||||
cookies: { [keptName]: keptValue, [objectName]: objectValue },
|
||||
});
|
||||
});
|
||||
@@ -32,7 +32,7 @@ test("Verify a thrown error in pre-request script surfaces in the response conso
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
|
||||
await expect
|
||||
.poll(() => responseView.console?.(), { timeout: DEFAULT_TIMEOUT })
|
||||
.poll(() => responseView.console(), { timeout: DEFAULT_TIMEOUT })
|
||||
.toContain(errorMessage);
|
||||
});
|
||||
|
||||
@@ -58,6 +58,6 @@ test("Verify accessing an invalid field in pre-request script surfaces in the re
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
|
||||
await expect
|
||||
.poll(() => responseView.console?.(), { timeout: DEFAULT_TIMEOUT })
|
||||
.poll(() => responseView.console(), { timeout: DEFAULT_TIMEOUT })
|
||||
.toContain("Cannot read properties of undefined (reading 'set')");
|
||||
});
|
||||
+2
-2
@@ -61,8 +61,8 @@ test("Verify pre-request script overrides base environment values through the en
|
||||
});
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.body).toMatchObject({
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(responseView.preview).toMatchObject({
|
||||
json: {
|
||||
fallbackToBase: fallbackValue,
|
||||
scriptValue: envScriptValue,
|
||||
|
||||
+2
-2
@@ -100,8 +100,8 @@ test("Verify pre-request script can eval() and require Node built-in modules, ex
|
||||
});
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.body).toMatchObject({
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(responseView.preview).toMatchObject({
|
||||
json: {
|
||||
evalResult: 16,
|
||||
hash: parsedUrl.hash,
|
||||
|
||||
@@ -49,11 +49,11 @@ test("Verify pre-request script reads the configured proxy and overrides it via
|
||||
});
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
|
||||
expect(responseView.statusCode).toBeUndefined();
|
||||
expect(responseView.statusBar.code).toBeUndefined();
|
||||
await expect
|
||||
.poll(() => responseView.console?.(), { timeout: DEFAULT_TIMEOUT })
|
||||
.poll(() => responseView.console(), { timeout: DEFAULT_TIMEOUT })
|
||||
.toContain("localhost:1111");
|
||||
await expect
|
||||
.poll(() => responseView.console?.(), { timeout: DEFAULT_TIMEOUT })
|
||||
.poll(() => responseView.console(), { timeout: DEFAULT_TIMEOUT })
|
||||
.toContain("Trying 127.0.0.1:8888");
|
||||
});
|
||||
+10
-10
@@ -41,8 +41,8 @@ test('Verify pre-request script manipulates request headers, query params and bo
|
||||
});
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.body).toMatchObject({
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(responseView.preview).toMatchObject({
|
||||
data: rawContent,
|
||||
args: { added: addedParam, keepMe: updatedParam },
|
||||
headers: expect.objectContaining({
|
||||
@@ -50,8 +50,8 @@ test('Verify pre-request script manipulates request headers, query params and bo
|
||||
'x-upsert': upsertedValue,
|
||||
}),
|
||||
});
|
||||
expect((responseView.body as { args: Record<string, string>; headers: object }).args).not.toHaveProperty('removeMe');
|
||||
expect((responseView.body as { args: Record<string, string>; headers: object }).headers).not.toHaveProperty('x-remove');
|
||||
expect((responseView.preview as { args: Record<string, string>; headers: object }).args).not.toHaveProperty('removeMe');
|
||||
expect((responseView.preview as { args: Record<string, string>; headers: object }).headers).not.toHaveProperty('x-remove');
|
||||
});
|
||||
|
||||
test('Verify pre-request script sets bearer auth via insomnia.request.auth', async ({ user }) => {
|
||||
@@ -78,8 +78,8 @@ test('Verify pre-request script sets bearer auth via insomnia.request.auth', asy
|
||||
});
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.body).toMatchObject({
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(responseView.preview).toMatchObject({
|
||||
headers: expect.objectContaining({
|
||||
authorization: `${prefix} ${token}`,
|
||||
}),
|
||||
@@ -111,8 +111,8 @@ test('Verify pre-request script sets basic auth via insomnia.request.auth', asyn
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
|
||||
const expectedEncodedCredentials = Buffer.from(`${username}:${password}`, 'utf8').toString('base64');
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.body).toMatchObject({
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(responseView.preview).toMatchObject({
|
||||
headers: expect.objectContaining({
|
||||
authorization: `Basic ${expectedEncodedCredentials}`,
|
||||
}),
|
||||
@@ -156,11 +156,11 @@ test('Verify pre-request script applies apikey, AWS v4, Hawk and OAuth 1.0 auth
|
||||
responses[authName] = await httpRequestFlow.send(request);
|
||||
}
|
||||
|
||||
const headersOf = (name: string) => (responses[name].body as { headers: Record<string, string> }).headers;
|
||||
const headersOf = (name: string) => (responses[name].preview as { headers: Record<string, string> }).headers;
|
||||
expect(headersOf('apiKeyHeader')).toMatchObject({
|
||||
[apiKeyName.toLowerCase()]: apiKeyValue,
|
||||
});
|
||||
expect(responses.apiKeyQuery.body).toMatchObject({
|
||||
expect(responses.apiKeyQuery.preview).toMatchObject({
|
||||
args: { [apiKeyName]: apiKeyValue },
|
||||
});
|
||||
expect(headersOf('awsV4').authorization).toContain(`AWS4-HMAC-SHA256 Credential=${accessKey}/`);
|
||||
|
||||
+2
-2
@@ -50,14 +50,14 @@ test("Verify pre-request script's sendRequest serializes raw, urlencoded, graphq
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
|
||||
const results = (
|
||||
responseView.body as { json: { results: Record<string, string> } }
|
||||
responseView.preview as { json: { results: Record<string, string> } }
|
||||
).json.results;
|
||||
const raw = JSON.parse(results.raw);
|
||||
const urlencoded = JSON.parse(results.urlencoded);
|
||||
const graphql = JSON.parse(results.graphql);
|
||||
const formdata = JSON.parse(results.formdata);
|
||||
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(raw.data).toBe(rawValue);
|
||||
expect(urlencoded.data).toBe("a=1&b=2");
|
||||
expect(graphql.json).toMatchObject({
|
||||
|
||||
@@ -37,6 +37,6 @@ test("Verify sending a QUERY request with a body", async ({ user }) => {
|
||||
method: HttpMethod.Query,
|
||||
body: { mimeType: ContentType.JSON, text: body },
|
||||
} satisfies HttpRequest);
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.body).toMatchObject({ data: body });
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(responseView.preview).toMatchObject({ data: body });
|
||||
});
|
||||
+2
-2
@@ -66,8 +66,8 @@ test("Verify query params from the URL, template tags, and the Parameters tab ar
|
||||
]);
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.body).toMatchObject({
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(responseView.preview).toMatchObject({
|
||||
args: {
|
||||
key: ["fromUrl", fromUrlValue, fromEditorValue, "/"],
|
||||
space: spaceValue,
|
||||
|
||||
@@ -37,9 +37,9 @@ test("Verify insomnia.environment.replaceIn resolves and returns a string synchr
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
|
||||
await expect
|
||||
.poll(() => responseView.console?.(), { timeout: DEFAULT_TIMEOUT })
|
||||
.poll(() => responseView.console(), { timeout: DEFAULT_TIMEOUT })
|
||||
.toContain(`log: string ${variableValue}`);
|
||||
const consoleText = await responseView.console?.();
|
||||
const consoleText = await responseView.console();
|
||||
expect(consoleText).not.toContain("Promise");
|
||||
});
|
||||
|
||||
@@ -71,6 +71,6 @@ test("Verify a script that awaits insomnia.environment.replaceIn as a workaround
|
||||
const responseView = await httpRequestFlow.send(request);
|
||||
|
||||
await expect
|
||||
.poll(() => responseView.console?.(), { timeout: DEFAULT_TIMEOUT })
|
||||
.poll(() => responseView.console(), { timeout: DEFAULT_TIMEOUT })
|
||||
.toContain(`log: string ${variableValue}`);
|
||||
});
|
||||
@@ -95,12 +95,12 @@ test("Verify AWS/GCP/HashiCorp Cloud Credentials Resolve via the Vault Template
|
||||
expect(awsResult.preview).toBe("aws-secret-value");
|
||||
expect(gcpResult.preview).toBe("gcp-secret-value");
|
||||
expect(hashicorpResult.preview).toBe("hashicorp-secret-value");
|
||||
expect((responseView.body as { data: string }).data).toContain("aws-secret-value");
|
||||
expect((responseView.body as { data: string }).data).toContain("gcp-secret-value");
|
||||
expect((responseView.body as { data: string }).data).toContain(
|
||||
expect((responseView.preview as { data: string }).data).toContain("aws-secret-value");
|
||||
expect((responseView.preview as { data: string }).data).toContain("gcp-secret-value");
|
||||
expect((responseView.preview as { data: string }).data).toContain(
|
||||
"hashicorp-secret-value",
|
||||
);
|
||||
expect((secondResponse.body as { data: string }).data).toContain(
|
||||
expect((secondResponse.preview as { data: string }).data).toContain(
|
||||
"aws-secret-value",
|
||||
);
|
||||
});
|
||||
@@ -33,8 +33,8 @@ test("Verify a Header With a Templated Name Resolves and Sends Correctly", async
|
||||
});
|
||||
const responseView = await httpRequestFlow.send(request!);
|
||||
|
||||
expect(responseView.statusCode).toBe(200);
|
||||
expect(responseView.body).toMatchObject({
|
||||
expect(responseView.statusBar.code).toBe(200);
|
||||
expect(responseView.preview).toMatchObject({
|
||||
headers: expect.objectContaining({
|
||||
"x-7cd8e9f98e9104085ea06e39b87faf36": "plain-value",
|
||||
}),
|
||||
|
||||
@@ -33,7 +33,7 @@ test("Verify a Header With a Template Tag in Its Value", async ({ user }) => {
|
||||
});
|
||||
const responseView = await httpRequestFlow.send(request!);
|
||||
|
||||
expect(responseView.body).toMatchObject({
|
||||
expect(responseView.preview).toMatchObject({
|
||||
headers: expect.objectContaining({
|
||||
"x-header-name": "aGVhZGVyLXZhbHVl",
|
||||
}),
|
||||
|
||||
+6
-6
@@ -49,10 +49,10 @@ test("Verify a prompt Tag Caches its Value Under the Storage Key Until it is Cle
|
||||
|
||||
expect(previewBeforeSend.functionName).toBe("prompt");
|
||||
expect(first.promptInputType).toBe("password");
|
||||
expect(first.response.statusCode).toBe(200);
|
||||
expect(first.response.body).toMatchObject({ data: firstValue });
|
||||
expect(cached.statusCode).toBe(200);
|
||||
expect(cached.body).toMatchObject({ data: firstValue });
|
||||
expect(second.response.statusCode).toBe(200);
|
||||
expect(second.response.body).toMatchObject({ data: secondValue });
|
||||
expect(first.response.statusBar.code).toBe(200);
|
||||
expect(first.response.preview).toMatchObject({ data: firstValue });
|
||||
expect(cached.statusBar.code).toBe(200);
|
||||
expect(cached.preview).toMatchObject({ data: firstValue });
|
||||
expect(second.response.statusBar.code).toBe(200);
|
||||
expect(second.response.preview).toMatchObject({ data: secondValue });
|
||||
});
|
||||
@@ -54,10 +54,10 @@ test("Verify the response Tag's Trigger Behavior Controls When its Dependency Re
|
||||
const always = await httpRequestFlow.send(alwaysRequest);
|
||||
|
||||
await expect(neverFailure).rejects.toThrow(/No responses for request/);
|
||||
expect(noHistory.statusCode).toBe(200);
|
||||
expect(noHistory.body).toMatchObject({ data: marker });
|
||||
expect(whenExpired.statusCode).toBe(200);
|
||||
expect(whenExpired.body).toMatchObject({ data: marker });
|
||||
expect(always.statusCode).toBe(200);
|
||||
expect(always.body).toMatchObject({ data: marker });
|
||||
expect(noHistory.statusBar.code).toBe(200);
|
||||
expect(noHistory.preview).toMatchObject({ data: marker });
|
||||
expect(whenExpired.statusBar.code).toBe(200);
|
||||
expect(whenExpired.preview).toMatchObject({ data: marker });
|
||||
expect(always.statusBar.code).toBe(200);
|
||||
expect(always.preview).toMatchObject({ data: marker });
|
||||
});
|
||||
Reference in new issue
Block a user