|
@@ -178,6 +178,7 @@ export const TRANSFORMED_DEEPLY_NESTED_COLLECTIONS_WITH_AUTH_HEADERS_MOCK: HoppC
|
|
|
key: "X-Test-Header",
|
|
|
value: "Overriden at FolderB",
|
|
|
active: true,
|
|
|
+ description: "",
|
|
|
},
|
|
|
],
|
|
|
},
|
|
@@ -475,8 +476,707 @@ export const WORKSPACE_MULTIPLE_CHILD_COLLECTIONS_WITH_AUTH_HEADERS_MOCK: Worksp
|
|
|
collectionID: "clx1f86hv000010f8szcfya0t",
|
|
|
teamID: "clws3hg58000011o8h07glsb1",
|
|
|
title: "root-collection-request",
|
|
|
- request:
|
|
|
- '{"v":"4","auth":{"authType":"inherit","authActive":true},"body":{"body":null,"contentType":null},"name":"root-collection-request","method":"GET","params":[],"headers":[],"endpoint":"https://httpbin.org/get","testScript":"// Check status code is 200\\npw.test(\\"Status code is 200\\", ()=> {\\n pw.expect(pw.response.status).toBe(200);\\n});\\n\\npw.test(\\"Successfully inherits authorization/header set at the parent collection level\\", () => {\\n pw.expect(pw.response.body.headers[\\"Authorization\\"]).toBe(\\"Basic dGVzdHVzZXI6dGVzdHBhc3M=\\")\\n \\n pw.expect(pw.response.body.headers[\\"Custom-Header\\"]).toBe(\\"Custom header value set at the root collection\\")\\n pw.expect(pw.response.body.headers[\\"Inherited-Header\\"]).toBe(\\"Inherited header at all levels\\")\\n})","preRequestScript":"","requestVariables":[]}',
|
|
|
+ request: `{"v":"${RESTReqSchemaVersion}","auth":{"authType":"inherit","authActive":true},"body":{"body":null,"contentType":null},"name":"root-collection-request","method":"GET","params":[],"headers":[],"endpoint":"https://httpbin.org/get","testScript":"// Check status code is 200\\npw.test(\\"Status code is 200\\", ()=> {\\n pw.expect(pw.response.status).toBe(200);\\n});\\n\\npw.test(\\"Successfully inherits authorization/header set at the parent collection level\\", () => {\\n pw.expect(pw.response.body.headers[\\"Authorization\\"]).toBe(\\"Basic dGVzdHVzZXI6dGVzdHBhc3M=\\")\\n \\n pw.expect(pw.response.body.headers[\\"Custom-Header\\"]).toBe(\\"Custom header value set at the root collection\\")\\n pw.expect(pw.response.body.headers[\\"Inherited-Header\\"]).toBe(\\"Inherited header at all levels\\")\\n})","preRequestScript":"","requestVariables":[],"responses":{}}`,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ];
|
|
|
+
|
|
|
+export const TRANSFORMED_MULTIPLE_CHILD_COLLECTIONS_WITH_AUTH_HEADERS_MOCK: HoppCollection[] =
|
|
|
+ [
|
|
|
+ {
|
|
|
+ v: 5,
|
|
|
+ id: "clx1f86hv000010f8szcfya0t",
|
|
|
+ name: "Multiple child collections with authorization & headers set at each level",
|
|
|
+ folders: [
|
|
|
+ {
|
|
|
+ v: 5,
|
|
|
+ id: "clx1fjgah000110f8a5bs68gd",
|
|
|
+ name: "folder-1",
|
|
|
+ folders: [
|
|
|
+ {
|
|
|
+ v: 5,
|
|
|
+ id: "clx1fjwmm000410f8l1gkkr1a",
|
|
|
+ name: "folder-11",
|
|
|
+ folders: [],
|
|
|
+ requests: [
|
|
|
+ {
|
|
|
+ v: "4",
|
|
|
+ auth: {
|
|
|
+ authType: "inherit",
|
|
|
+ password: "testpass",
|
|
|
+ username: "testuser",
|
|
|
+ authActive: true,
|
|
|
+ },
|
|
|
+ body: {
|
|
|
+ body: null,
|
|
|
+ contentType: null,
|
|
|
+ },
|
|
|
+ name: "folder-11-request",
|
|
|
+ method: "GET",
|
|
|
+ params: [],
|
|
|
+ headers: [],
|
|
|
+ endpoint: "https://httpbin.org/get",
|
|
|
+ testScript:
|
|
|
+ '// Check status code is 200\npw.test("Status code is 200", ()=> {\n pw.expect(pw.response.status).toBe(200);\n});\n\npw.test("Successfully inherits authorization/header set at the parent collection level", () => {\n pw.expect(pw.response.body.headers["Authorization"]).toBe("Basic dGVzdHVzZXI6dGVzdHBhc3M=")\n \n pw.expect(pw.response.body.headers["Custom-Header"]).toBe("Custom header value overriden at folder-1")\n pw.expect(pw.response.body.headers["Inherited-Header"]).toBe("Inherited header at all levels")\n})',
|
|
|
+ preRequestScript: "",
|
|
|
+ requestVariables: [],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ auth: {
|
|
|
+ authType: "inherit",
|
|
|
+ authActive: true,
|
|
|
+ },
|
|
|
+ headers: [
|
|
|
+ {
|
|
|
+ key: "key",
|
|
|
+ value: "Set at folder-11",
|
|
|
+ active: true,
|
|
|
+ description: "",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ v: 5,
|
|
|
+ id: "clx1fjyxm000510f8pv90dt43",
|
|
|
+ name: "folder-12",
|
|
|
+ folders: [],
|
|
|
+ requests: [
|
|
|
+ {
|
|
|
+ v: "4",
|
|
|
+ auth: {
|
|
|
+ authType: "none",
|
|
|
+ authActive: true,
|
|
|
+ },
|
|
|
+ body: {
|
|
|
+ body: null,
|
|
|
+ contentType: null,
|
|
|
+ },
|
|
|
+ name: "folder-12-request",
|
|
|
+ method: "GET",
|
|
|
+ params: [],
|
|
|
+ headers: [
|
|
|
+ {
|
|
|
+ key: "Custom-Header",
|
|
|
+ value:
|
|
|
+ "Custom header value overriden at folder-12-request",
|
|
|
+ active: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: "key",
|
|
|
+ value: "Overriden at folder-12-request",
|
|
|
+ active: true,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ endpoint: "https://httpbin.org/get",
|
|
|
+ testScript:
|
|
|
+ '// Check status code is 200\npw.test("Status code is 200", ()=> {\n pw.expect(pw.response.status).toBe(200);\n});\n\npw.test("Successfully inherits/overrides authorization/header set at the parent collection level", () => {\n pw.expect(pw.response.body.headers["Authorization"]).toBe(undefined)\n \n pw.expect(pw.response.body.headers["Custom-Header"]).toBe("Custom header value overriden at folder-12-request")\n pw.expect(pw.response.body.headers["Inherited-Header"]).toBe("Inherited header at all levels")\n pw.expect(pw.response.body.headers["Key"]).toBe("Overriden at folder-12-request")\n})',
|
|
|
+ preRequestScript: "",
|
|
|
+ requestVariables: [],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ auth: {
|
|
|
+ authType: "none",
|
|
|
+ authActive: true,
|
|
|
+ },
|
|
|
+ headers: [
|
|
|
+ {
|
|
|
+ key: "Custom-Header",
|
|
|
+ value: "Custom header value overriden at folder-12",
|
|
|
+ active: true,
|
|
|
+ description: "",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: "key",
|
|
|
+ value: "Set at folder-12",
|
|
|
+ active: true,
|
|
|
+ description: "",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ v: 5,
|
|
|
+ id: "clx1fk1cv000610f88kc3aupy",
|
|
|
+ name: "folder-13",
|
|
|
+ folders: [],
|
|
|
+ requests: [
|
|
|
+ {
|
|
|
+ v: "4",
|
|
|
+ auth: {
|
|
|
+ key: "api-key",
|
|
|
+ addTo: "HEADERS",
|
|
|
+ value: "api-key-value",
|
|
|
+ authType: "basic",
|
|
|
+ password: "testpass",
|
|
|
+ username: "testuser",
|
|
|
+ authActive: true,
|
|
|
+ grantTypeInfo: {
|
|
|
+ token: "",
|
|
|
+ isPKCE: true,
|
|
|
+ clientID: "sfasfa",
|
|
|
+ password: "",
|
|
|
+ username: "",
|
|
|
+ grantType: "AUTHORIZATION_CODE",
|
|
|
+ authEndpoint: "asfafs",
|
|
|
+ clientSecret: "sfasfasf",
|
|
|
+ tokenEndpoint: "asfa",
|
|
|
+ codeVerifierMethod: "S256",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ body: {
|
|
|
+ body: null,
|
|
|
+ contentType: null,
|
|
|
+ },
|
|
|
+ name: "folder-13-request",
|
|
|
+ method: "GET",
|
|
|
+ params: [],
|
|
|
+ headers: [
|
|
|
+ {
|
|
|
+ key: "Custom-Header-Request-Level",
|
|
|
+ value:
|
|
|
+ "New custom header added at the folder-13-request level",
|
|
|
+ active: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: "key",
|
|
|
+ value: "Overriden at folder-13-request",
|
|
|
+ active: true,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ endpoint: "https://httpbin.org/get",
|
|
|
+ testScript:
|
|
|
+ '// Check status code is 200\npw.test("Status code is 200", ()=> {\n pw.expect(pw.response.status).toBe(200);\n});\n\npw.test("Successfully inherits/overrides authorization/header set at the parent collection level with new header addition", () => {\n pw.expect(pw.response.body.headers["Authorization"]).toBe("Basic dGVzdHVzZXI6dGVzdHBhc3M=")\n \n pw.expect(pw.response.body.headers["Custom-Header"]).toBe("Custom header value overriden at folder-13")\n pw.expect(pw.response.body.headers["Inherited-Header"]).toBe("Inherited header at all levels")\n pw.expect(pw.response.body.headers["Key"]).toBe("Overriden at folder-13-request")\n pw.expect(pw.response.body.headers["Custom-Header-Request-Level"]).toBe("New custom header added at the folder-13-request level")\n})',
|
|
|
+ preRequestScript: "",
|
|
|
+ requestVariables: [],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ auth: {
|
|
|
+ token: "test-token",
|
|
|
+ authType: "bearer",
|
|
|
+ authActive: true,
|
|
|
+ },
|
|
|
+ headers: [
|
|
|
+ {
|
|
|
+ key: "Custom-Header",
|
|
|
+ value: "Custom header value overriden at folder-13",
|
|
|
+ active: true,
|
|
|
+ description: "",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: "key",
|
|
|
+ value: "Set at folder-13",
|
|
|
+ active: true,
|
|
|
+ description: "",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ requests: [
|
|
|
+ {
|
|
|
+ v: "4",
|
|
|
+ auth: {
|
|
|
+ authType: "inherit",
|
|
|
+ authActive: true,
|
|
|
+ },
|
|
|
+ body: {
|
|
|
+ body: null,
|
|
|
+ contentType: null,
|
|
|
+ },
|
|
|
+ name: "folder-1-request",
|
|
|
+ method: "GET",
|
|
|
+ params: [],
|
|
|
+ headers: [],
|
|
|
+ endpoint: "https://httpbin.org/get",
|
|
|
+ testScript:
|
|
|
+ '// Check status code is 200\npw.test("Status code is 200", ()=> {\n pw.expect(pw.response.status).toBe(200);\n});\n\npw.test("Successfully inherits authorization/header set at the parent collection level", () => {\n pw.expect(pw.response.body.headers["Authorization"]).toBe("Basic dGVzdHVzZXI6dGVzdHBhc3M=")\n \n pw.expect(pw.response.body.headers["Custom-Header"]).toBe("Custom header value overriden at folder-1")\n pw.expect(pw.response.body.headers["Inherited-Header"]).toBe("Inherited header at all levels")\n})',
|
|
|
+ preRequestScript: "",
|
|
|
+ requestVariables: [],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ auth: {
|
|
|
+ authType: "inherit",
|
|
|
+ authActive: true,
|
|
|
+ },
|
|
|
+ headers: [
|
|
|
+ {
|
|
|
+ key: "Custom-Header",
|
|
|
+ value: "Custom header value overriden at folder-1",
|
|
|
+ active: true,
|
|
|
+ description: "",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ v: 5,
|
|
|
+ id: "clx1fjk9o000210f8j0573pls",
|
|
|
+ name: "folder-2",
|
|
|
+ folders: [
|
|
|
+ {
|
|
|
+ v: 5,
|
|
|
+ id: "clx1fk516000710f87sfpw6bo",
|
|
|
+ name: "folder-21",
|
|
|
+ folders: [],
|
|
|
+ requests: [
|
|
|
+ {
|
|
|
+ v: "4",
|
|
|
+ auth: {
|
|
|
+ authType: "inherit",
|
|
|
+ authActive: true,
|
|
|
+ },
|
|
|
+ body: {
|
|
|
+ body: null,
|
|
|
+ contentType: null,
|
|
|
+ },
|
|
|
+ name: "folder-21-request",
|
|
|
+ method: "GET",
|
|
|
+ params: [],
|
|
|
+ headers: [],
|
|
|
+ endpoint: "https://httpbin.org/get",
|
|
|
+ testScript:
|
|
|
+ '// Check status code is 200\npw.test("Status code is 200", ()=> {\n pw.expect(pw.response.status).toBe(200);\n});\n\npw.test("Successfully inherits authorization/header set at the parent collection level", () => {\n pw.expect(pw.response.body.headers["Authorization"]).toBe(undefined)\n \n pw.expect(pw.response.body.headers["Custom-Header"]).toBe("Custom header value overriden at folder-2")\n pw.expect(pw.response.body.headers["Inherited-Header"]).toBe("Inherited header at all levels")\n})',
|
|
|
+ preRequestScript: "",
|
|
|
+ requestVariables: [],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ auth: {
|
|
|
+ authType: "inherit",
|
|
|
+ authActive: true,
|
|
|
+ },
|
|
|
+ headers: [
|
|
|
+ {
|
|
|
+ key: "key",
|
|
|
+ value: "Set at folder-21",
|
|
|
+ active: true,
|
|
|
+ description: "",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ v: 5,
|
|
|
+ id: "clx1fk72t000810f8gfwkpi5y",
|
|
|
+ name: "folder-22",
|
|
|
+ folders: [],
|
|
|
+ requests: [
|
|
|
+ {
|
|
|
+ v: "4",
|
|
|
+ auth: {
|
|
|
+ authType: "none",
|
|
|
+ authActive: true,
|
|
|
+ },
|
|
|
+ body: {
|
|
|
+ body: null,
|
|
|
+ contentType: null,
|
|
|
+ },
|
|
|
+ name: "folder-22-request",
|
|
|
+ method: "GET",
|
|
|
+ params: [],
|
|
|
+ headers: [
|
|
|
+ {
|
|
|
+ key: "Custom-Header",
|
|
|
+ value:
|
|
|
+ "Custom header value overriden at folder-22-request",
|
|
|
+ active: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: "key",
|
|
|
+ value: "Overriden at folder-22-request",
|
|
|
+ active: true,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ endpoint: "https://httpbin.org/get",
|
|
|
+ testScript:
|
|
|
+ '// Check status code is 200\npw.test("Status code is 200", ()=> {\n pw.expect(pw.response.status).toBe(200);\n});\n\npw.test("Successfully inherits/overrides authorization/header set at the parent collection level", () => {\n pw.expect(pw.response.body.headers["Authorization"]).toBe(undefined)\n \n pw.expect(pw.response.body.headers["Custom-Header"]).toBe("Custom header value overriden at folder-22-request")\n pw.expect(pw.response.body.headers["Inherited-Header"]).toBe("Inherited header at all levels")\n pw.expect(pw.response.body.headers["Key"]).toBe("Overriden at folder-22-request")\n})',
|
|
|
+ preRequestScript: "",
|
|
|
+ requestVariables: [],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ auth: {
|
|
|
+ authType: "none",
|
|
|
+ authActive: true,
|
|
|
+ },
|
|
|
+ headers: [
|
|
|
+ {
|
|
|
+ key: "Custom-Header",
|
|
|
+ value: "Custom header value overriden at folder-22",
|
|
|
+ active: true,
|
|
|
+ description: "",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: "key",
|
|
|
+ value: "Set at folder-22",
|
|
|
+ active: true,
|
|
|
+ description: "",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ v: 5,
|
|
|
+ id: "clx1fk95g000910f8bunhaoo8",
|
|
|
+ name: "folder-23",
|
|
|
+ folders: [],
|
|
|
+ requests: [
|
|
|
+ {
|
|
|
+ v: "4",
|
|
|
+ auth: {
|
|
|
+ authType: "basic",
|
|
|
+ password: "testpass",
|
|
|
+ username: "testuser",
|
|
|
+ authActive: true,
|
|
|
+ },
|
|
|
+ body: {
|
|
|
+ body: null,
|
|
|
+ contentType: null,
|
|
|
+ },
|
|
|
+ name: "folder-23-request",
|
|
|
+ method: "GET",
|
|
|
+ params: [],
|
|
|
+ headers: [
|
|
|
+ {
|
|
|
+ key: "Custom-Header-Request-Level",
|
|
|
+ value:
|
|
|
+ "New custom header added at the folder-23-request level",
|
|
|
+ active: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: "key",
|
|
|
+ value: "Overriden at folder-23-request",
|
|
|
+ active: true,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ endpoint: "https://httpbin.org/get",
|
|
|
+ testScript:
|
|
|
+ '// Check status code is 200\npw.test("Status code is 200", ()=> {\n pw.expect(pw.response.status).toBe(200);\n});\n\npw.test("Successfully inherits/overrides authorization/header set at the parent collection level with new header addition", () => {\n pw.expect(pw.response.body.headers["Authorization"]).toBe("Basic dGVzdHVzZXI6dGVzdHBhc3M=")\n \n pw.expect(pw.response.body.headers["Custom-Header"]).toBe("Custom header value overriden at folder-23")\n pw.expect(pw.response.body.headers["Inherited-Header"]).toBe("Inherited header at all levels")\n pw.expect(pw.response.body.headers["Key"]).toBe("Overriden at folder-23-request")\n pw.expect(pw.response.body.headers["Custom-Header-Request-Level"]).toBe("New custom header added at the folder-23-request level")\n})',
|
|
|
+ preRequestScript: "",
|
|
|
+ requestVariables: [],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ auth: {
|
|
|
+ token: "test-token",
|
|
|
+ authType: "bearer",
|
|
|
+ password: "testpass",
|
|
|
+ username: "testuser",
|
|
|
+ authActive: true,
|
|
|
+ },
|
|
|
+ headers: [
|
|
|
+ {
|
|
|
+ key: "Custom-Header",
|
|
|
+ value: "Custom header value overriden at folder-23",
|
|
|
+ active: true,
|
|
|
+ description: "",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: "key",
|
|
|
+ value: "Set at folder-23",
|
|
|
+ active: true,
|
|
|
+ description: "",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ requests: [
|
|
|
+ {
|
|
|
+ v: "4",
|
|
|
+ auth: {
|
|
|
+ authType: "none",
|
|
|
+ authActive: true,
|
|
|
+ },
|
|
|
+ body: {
|
|
|
+ body: null,
|
|
|
+ contentType: null,
|
|
|
+ },
|
|
|
+ name: "folder-2-request",
|
|
|
+ method: "GET",
|
|
|
+ params: [],
|
|
|
+ headers: [
|
|
|
+ {
|
|
|
+ key: "Custom-Header",
|
|
|
+ value: "Custom header value overriden at folder-2-request",
|
|
|
+ active: true,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ endpoint: "https://httpbin.org/get",
|
|
|
+ testScript:
|
|
|
+ '// Check status code is 200\npw.test("Status code is 200", ()=> {\n pw.expect(pw.response.status).toBe(200);\n});\n\npw.test("Successfully inherits/overrides authorization/header set at the parent collection level", () => {\n pw.expect(pw.response.body.headers["Authorization"]).toBe(undefined)\n \n pw.expect(pw.response.body.headers["Custom-Header"]).toBe("Custom header value overriden at folder-2-request")\n pw.expect(pw.response.body.headers["Inherited-Header"]).toBe("Inherited header at all levels")\n})',
|
|
|
+ preRequestScript: "",
|
|
|
+ requestVariables: [],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ auth: {
|
|
|
+ authType: "none",
|
|
|
+ authActive: true,
|
|
|
+ },
|
|
|
+ headers: [
|
|
|
+ {
|
|
|
+ key: "Custom-Header",
|
|
|
+ value: "Custom header value overriden at folder-2",
|
|
|
+ active: true,
|
|
|
+ description: "",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ v: 5,
|
|
|
+ id: "clx1fjmlq000310f86o4d3w2o",
|
|
|
+ name: "folder-3",
|
|
|
+ folders: [
|
|
|
+ {
|
|
|
+ v: 5,
|
|
|
+ id: "clx1iwq0p003e10f8u8zg0p85",
|
|
|
+ name: "folder-31",
|
|
|
+ folders: [],
|
|
|
+ requests: [
|
|
|
+ {
|
|
|
+ v: "4",
|
|
|
+ auth: {
|
|
|
+ authType: "inherit",
|
|
|
+ authActive: true,
|
|
|
+ },
|
|
|
+ body: {
|
|
|
+ body: null,
|
|
|
+ contentType: null,
|
|
|
+ },
|
|
|
+ name: "folder-31-request",
|
|
|
+ method: "GET",
|
|
|
+ params: [],
|
|
|
+ headers: [],
|
|
|
+ endpoint: "https://httpbin.org/get",
|
|
|
+ testScript:
|
|
|
+ '// Check status code is 200\npw.test("Status code is 200", ()=> {\n pw.expect(pw.response.status).toBe(200);\n});\n\npw.test("Successfully inherits authorization/header set at the parent collection level", () => {\n pw.expect(pw.response.body.headers["Authorization"]).toBe("Basic dGVzdHVzZXI6dGVzdHBhc3M=")\n \n pw.expect(pw.response.body.headers["Custom-Header"]).toBe("Custom header value overriden at folder-3")\n pw.expect(pw.response.body.headers["Inherited-Header"]).toBe("Inherited header at all levels")\n})',
|
|
|
+ preRequestScript: "",
|
|
|
+ requestVariables: [],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ auth: {
|
|
|
+ authType: "inherit",
|
|
|
+ authActive: true,
|
|
|
+ },
|
|
|
+ headers: [
|
|
|
+ {
|
|
|
+ key: "key",
|
|
|
+ value: "Set at folder-31",
|
|
|
+ active: true,
|
|
|
+ description: "",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ v: 5,
|
|
|
+ id: "clx1izut7003m10f894ip59zg",
|
|
|
+ name: "folder-32",
|
|
|
+ folders: [],
|
|
|
+ requests: [
|
|
|
+ {
|
|
|
+ v: "4",
|
|
|
+ auth: {
|
|
|
+ authType: "none",
|
|
|
+ authActive: true,
|
|
|
+ },
|
|
|
+ body: {
|
|
|
+ body: null,
|
|
|
+ contentType: null,
|
|
|
+ },
|
|
|
+ name: "folder-32-request",
|
|
|
+ method: "GET",
|
|
|
+ params: [],
|
|
|
+ headers: [
|
|
|
+ {
|
|
|
+ key: "Custom-Header",
|
|
|
+ value:
|
|
|
+ "Custom header value overriden at folder-32-request",
|
|
|
+ active: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: "key",
|
|
|
+ value: "Overriden at folder-32-request",
|
|
|
+ active: true,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ endpoint: "https://httpbin.org/get",
|
|
|
+ testScript:
|
|
|
+ '// Check status code is 200\npw.test("Status code is 200", ()=> {\n pw.expect(pw.response.status).toBe(200);\n});\n\npw.test("Successfully inherits/overrides authorization/header set at the parent collection level", () => {\n pw.expect(pw.response.body.headers["Authorization"]).toBe(undefined)\n \n pw.expect(pw.response.body.headers["Custom-Header"]).toBe("Custom header value overriden at folder-32-request")\n pw.expect(pw.response.body.headers["Inherited-Header"]).toBe("Inherited header at all levels")\n pw.expect(pw.response.body.headers["Key"]).toBe("Overriden at folder-32-request")\n})',
|
|
|
+ preRequestScript: "",
|
|
|
+ requestVariables: [],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ auth: {
|
|
|
+ authType: "none",
|
|
|
+ authActive: true,
|
|
|
+ },
|
|
|
+ headers: [
|
|
|
+ {
|
|
|
+ key: "Custom-Header",
|
|
|
+ value: "Custom header value overriden at folder-32",
|
|
|
+ active: true,
|
|
|
+ description: "",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: "key",
|
|
|
+ value: "Set at folder-32",
|
|
|
+ active: true,
|
|
|
+ description: "",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ v: 5,
|
|
|
+ id: "clx1j2ka9003q10f8cdbzpgpg",
|
|
|
+ name: "folder-33",
|
|
|
+ folders: [],
|
|
|
+ requests: [
|
|
|
+ {
|
|
|
+ v: "4",
|
|
|
+ auth: {
|
|
|
+ authType: "basic",
|
|
|
+ password: "testpass",
|
|
|
+ username: "testuser",
|
|
|
+ authActive: true,
|
|
|
+ },
|
|
|
+ body: {
|
|
|
+ body: null,
|
|
|
+ contentType: null,
|
|
|
+ },
|
|
|
+ name: "folder-33-request",
|
|
|
+ method: "GET",
|
|
|
+ params: [],
|
|
|
+ headers: [
|
|
|
+ {
|
|
|
+ key: "Custom-Header-Request-Level",
|
|
|
+ value:
|
|
|
+ "New custom header added at the folder-33-request level",
|
|
|
+ active: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: "key",
|
|
|
+ value: "Overriden at folder-33-request",
|
|
|
+ active: true,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ endpoint: "https://httpbin.org/get",
|
|
|
+ testScript:
|
|
|
+ '// Check status code is 200\npw.test("Status code is 200", ()=> {\n pw.expect(pw.response.status).toBe(200);\n});\n\npw.test("Successfully inherits/overrides authorization/header set at the parent collection level with new header addition", () => {\n pw.expect(pw.response.body.headers["Authorization"]).toBe("Basic dGVzdHVzZXI6dGVzdHBhc3M=")\n \n pw.expect(pw.response.body.headers["Custom-Header"]).toBe("Custom header value overriden at folder-33")\n pw.expect(pw.response.body.headers["Inherited-Header"]).toBe("Inherited header at all levels")\n pw.expect(pw.response.body.headers["Key"]).toBe("Overriden at folder-33-request")\n pw.expect(pw.response.body.headers["Custom-Header-Request-Level"]).toBe("New custom header added at the folder-33-request level")\n})',
|
|
|
+ preRequestScript: "",
|
|
|
+ requestVariables: [],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ auth: {
|
|
|
+ token: "test-token",
|
|
|
+ authType: "bearer",
|
|
|
+ password: "testpass",
|
|
|
+ username: "testuser",
|
|
|
+ authActive: true,
|
|
|
+ },
|
|
|
+ headers: [
|
|
|
+ {
|
|
|
+ key: "Custom-Header",
|
|
|
+ value: "Custom header value overriden at folder-33",
|
|
|
+ active: true,
|
|
|
+ description: "",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: "key",
|
|
|
+ value: "Set at folder-33",
|
|
|
+ active: true,
|
|
|
+ description: "",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ requests: [
|
|
|
+ {
|
|
|
+ v: "4",
|
|
|
+ auth: {
|
|
|
+ authType: "basic",
|
|
|
+ password: "testpass",
|
|
|
+ username: "testuser",
|
|
|
+ authActive: true,
|
|
|
+ },
|
|
|
+ body: {
|
|
|
+ body: null,
|
|
|
+ contentType: null,
|
|
|
+ },
|
|
|
+ name: "folder-3-request",
|
|
|
+ method: "GET",
|
|
|
+ params: [],
|
|
|
+ headers: [
|
|
|
+ {
|
|
|
+ key: "Custom-Header-Request-Level",
|
|
|
+ value:
|
|
|
+ "New custom header added at the folder-3-request level",
|
|
|
+ active: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: "key",
|
|
|
+ value: "Set at folder-3-request",
|
|
|
+ active: true,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ endpoint: "https://httpbin.org/get",
|
|
|
+ testScript:
|
|
|
+ '// Check status code is 200\npw.test("Status code is 200", ()=> {\n pw.expect(pw.response.status).toBe(200);\n});\n\npw.test("Successfully inherits/overrides authorization/header set at the parent collection level with new header addition", () => {\n pw.expect(pw.response.body.headers["Authorization"]).toBe("Basic dGVzdHVzZXI6dGVzdHBhc3M=")\n \n pw.expect(pw.response.body.headers["Custom-Header"]).toBe("Custom header value overriden at folder-3")\n pw.expect(pw.response.body.headers["Inherited-Header"]).toBe("Inherited header at all levels")\n pw.expect(pw.response.body.headers["Key"]).toBe("Set at folder-3-request")\n pw.expect(pw.response.body.headers["Custom-Header-Request-Level"]).toBe("New custom header added at the folder-3-request level")\n})',
|
|
|
+ preRequestScript: "",
|
|
|
+ requestVariables: [],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ auth: {
|
|
|
+ key: "testuser",
|
|
|
+ addTo: "HEADERS",
|
|
|
+ value: "testpass",
|
|
|
+ authType: "basic",
|
|
|
+ password: "testpass",
|
|
|
+ username: "testuser",
|
|
|
+ authActive: true,
|
|
|
+ },
|
|
|
+ headers: [
|
|
|
+ {
|
|
|
+ key: "Custom-Header",
|
|
|
+ value: "Custom header value overriden at folder-3",
|
|
|
+ active: true,
|
|
|
+ description: "",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ requests: [
|
|
|
+ {
|
|
|
+ v: RESTReqSchemaVersion,
|
|
|
+ auth: {
|
|
|
+ authType: "inherit",
|
|
|
+ authActive: true,
|
|
|
+ },
|
|
|
+ body: {
|
|
|
+ body: null,
|
|
|
+ contentType: null,
|
|
|
+ },
|
|
|
+ name: "root-collection-request",
|
|
|
+ method: "GET",
|
|
|
+ params: [],
|
|
|
+ headers: [],
|
|
|
+ endpoint: "https://httpbin.org/get",
|
|
|
+ testScript:
|
|
|
+ '// Check status code is 200\npw.test("Status code is 200", ()=> {\n pw.expect(pw.response.status).toBe(200);\n});\n\npw.test("Successfully inherits authorization/header set at the parent collection level", () => {\n pw.expect(pw.response.body.headers["Authorization"]).toBe("Basic dGVzdHVzZXI6dGVzdHBhc3M=")\n \n pw.expect(pw.response.body.headers["Custom-Header"]).toBe("Custom header value set at the root collection")\n pw.expect(pw.response.body.headers["Inherited-Header"]).toBe("Inherited header at all levels")\n})',
|
|
|
+ preRequestScript: "",
|
|
|
+ requestVariables: [],
|
|
|
+ responses: {},
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ auth: {
|
|
|
+ authType: "basic",
|
|
|
+ password: "testpass",
|
|
|
+ username: "testuser",
|
|
|
+ authActive: true,
|
|
|
+ },
|
|
|
+ headers: [
|
|
|
+ {
|
|
|
+ key: "Custom-Header",
|
|
|
+ value: "Custom header value set at the root collection",
|
|
|
+ active: true,
|
|
|
+ description: "",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: "Inherited-Header",
|
|
|
+ value: "Inherited header at all levels",
|
|
|
+ active: true,
|
|
|
+ description: "",
|
|
|
},
|
|
|
],
|
|
|
},
|
|
@@ -620,6 +1320,7 @@ export const TRANSFORMED_COLLECTIONS_WITHOUT_AUTH_HEADERS_AT_CERTAIN_LEVELS_MOCK
|
|
|
key: "Custom-Header",
|
|
|
value: "Set at folder-2",
|
|
|
active: true,
|
|
|
+ description: "",
|
|
|
},
|
|
|
],
|
|
|
},
|
|
@@ -650,6 +1351,7 @@ export const TRANSFORMED_COLLECTIONS_WITHOUT_AUTH_HEADERS_AT_CERTAIN_LEVELS_MOCK
|
|
|
key: "Custom-Header",
|
|
|
value: "Set at folder-4",
|
|
|
active: true,
|
|
|
+ description: "",
|
|
|
},
|
|
|
],
|
|
|
},
|