fix pm import order (#7332)

* fix postman import order

* update snapshots

* remove all the console errors from the tests

* stub
This commit is contained in:
Jack Kavanagh 2024-04-29 11:21:17 +02:00 committed by GitHub
parent 27922a8518
commit c62decc0b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 96 additions and 60 deletions

View File

@ -3835,6 +3835,7 @@ exports[`Fixtures Import postman api-key-default-v2_1-input.json 1`] = `
"_type": "request_group",
"description": "",
"environment": {},
"metaSortKey": -1622117984000,
"name": "New Collection",
"parentId": "__WORKSPACE_ID__",
},
@ -3851,7 +3852,7 @@ exports[`Fixtures Import postman api-key-default-v2_1-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 2,
"metaSortKey": -1622117983999,
"method": "GET",
"name": "New Request",
"parameters": [],
@ -3875,6 +3876,7 @@ exports[`Fixtures Import postman api-key-header-v2_1-input.json 1`] = `
"_type": "request_group",
"description": "",
"environment": {},
"metaSortKey": -1622117984000,
"name": "New Collection",
"parentId": "__WORKSPACE_ID__",
},
@ -3891,7 +3893,7 @@ exports[`Fixtures Import postman api-key-header-v2_1-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 2,
"metaSortKey": -1622117983999,
"method": "GET",
"name": "New Request",
"parameters": [],
@ -3915,6 +3917,7 @@ exports[`Fixtures Import postman api-key-queryParams-v2_1-input.json 1`] = `
"_type": "request_group",
"description": "",
"environment": {},
"metaSortKey": -1622117984000,
"name": "New Collection",
"parentId": "__WORKSPACE_ID__",
},
@ -3931,7 +3934,7 @@ exports[`Fixtures Import postman api-key-queryParams-v2_1-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 2,
"metaSortKey": -1622117983999,
"method": "GET",
"name": "New Request",
"parameters": [],
@ -3955,6 +3958,7 @@ exports[`Fixtures Import postman aws-signature-auth-v2_0-input.json 1`] = `
"_type": "request_group",
"description": "A collection for testing",
"environment": {},
"metaSortKey": -1622117984000,
"name": "AWS Signature Test",
"parentId": "__WORKSPACE_ID__",
},
@ -3973,7 +3977,7 @@ exports[`Fixtures Import postman aws-signature-auth-v2_0-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 2,
"metaSortKey": -1622117983999,
"method": "GET",
"name": "AWS Signature",
"parameters": [],
@ -3997,6 +4001,7 @@ exports[`Fixtures Import postman aws-signature-auth-v2_1-input.json 1`] = `
"_type": "request_group",
"description": "A collection for testing",
"environment": {},
"metaSortKey": -1622117984000,
"name": "AWS Signature Test",
"parentId": "__WORKSPACE_ID__",
},
@ -4015,7 +4020,7 @@ exports[`Fixtures Import postman aws-signature-auth-v2_1-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 2,
"metaSortKey": -1622117983999,
"method": "GET",
"name": "AWS Signature",
"parameters": [],
@ -4039,6 +4044,7 @@ exports[`Fixtures Import postman basic-auth-v2_0-input.json 1`] = `
"_type": "request_group",
"description": "A collection for testing",
"environment": {},
"metaSortKey": -1622117984000,
"name": "Basic Auth Test",
"parentId": "__WORKSPACE_ID__",
},
@ -4054,7 +4060,7 @@ exports[`Fixtures Import postman basic-auth-v2_0-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 2,
"metaSortKey": -1622117983999,
"method": "GET",
"name": "Basic Auth",
"parameters": [],
@ -4078,6 +4084,7 @@ exports[`Fixtures Import postman basic-auth-v2_1-input.json 1`] = `
"_type": "request_group",
"description": "A collection for testing",
"environment": {},
"metaSortKey": -1622117984000,
"name": "Basic Auth Test",
"parentId": "__WORKSPACE_ID__",
},
@ -4093,7 +4100,7 @@ exports[`Fixtures Import postman basic-auth-v2_1-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 2,
"metaSortKey": -1622117983999,
"method": "GET",
"name": "Basic Auth",
"parameters": [],
@ -4117,6 +4124,7 @@ exports[`Fixtures Import postman bearer-token-v2_0-input.json 1`] = `
"_type": "request_group",
"description": "A collection for testing",
"environment": {},
"metaSortKey": -1622117984000,
"name": "Bearer Token Test",
"parentId": "__WORKSPACE_ID__",
},
@ -4132,7 +4140,7 @@ exports[`Fixtures Import postman bearer-token-v2_0-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 2,
"metaSortKey": -1622117983999,
"method": "GET",
"name": "Bearer Token",
"parameters": [],
@ -4156,6 +4164,7 @@ exports[`Fixtures Import postman bearer-token-v2_1-input.json 1`] = `
"_type": "request_group",
"description": "A collection for testing",
"environment": {},
"metaSortKey": -1622117984000,
"name": "Bearer Token Test",
"parentId": "__WORKSPACE_ID__",
},
@ -4171,7 +4180,7 @@ exports[`Fixtures Import postman bearer-token-v2_1-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 2,
"metaSortKey": -1622117983999,
"method": "GET",
"name": "Bearer Token",
"parameters": [],
@ -4195,6 +4204,7 @@ exports[`Fixtures Import postman complex-url-v2_0-input.json 1`] = `
"_type": "request_group",
"description": "A collection for testing",
"environment": {},
"metaSortKey": -1622117984000,
"name": "Complex URL Test Collection",
"parentId": "__WORKSPACE_ID__",
},
@ -4205,7 +4215,7 @@ exports[`Fixtures Import postman complex-url-v2_0-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 2,
"metaSortKey": -1622117983999,
"method": "GET",
"name": "Test Request",
"parameters": [
@ -4235,6 +4245,7 @@ exports[`Fixtures Import postman complex-url-v2_1-input.json 1`] = `
"_type": "request_group",
"description": "A collection for testing",
"environment": {},
"metaSortKey": -1622117984000,
"name": "Complex URL Test Collection",
"parentId": "__WORKSPACE_ID__",
},
@ -4245,7 +4256,7 @@ exports[`Fixtures Import postman complex-url-v2_1-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 2,
"metaSortKey": -1622117983999,
"method": "GET",
"name": "Test Request",
"parameters": [
@ -4275,6 +4286,7 @@ exports[`Fixtures Import postman complex-v2_0_fromHeaders-input.json 1`] = `
"_type": "request_group",
"description": "",
"environment": {},
"metaSortKey": -1622117984000,
"name": "Timing API",
"parentId": "__WORKSPACE_ID__",
},
@ -4283,6 +4295,7 @@ exports[`Fixtures Import postman complex-v2_0_fromHeaders-input.json 1`] = `
"_type": "request_group",
"description": "",
"environment": {},
"metaSortKey": -1622117983999,
"name": "Projects",
"parentId": "__GRP_1__",
},
@ -4310,7 +4323,7 @@ exports[`Fixtures Import postman complex-v2_0_fromHeaders-input.json 1`] = `
"value": "application/json",
},
],
"metaSortKey": 2,
"metaSortKey": -1622117983998,
"method": "GET",
"name": "Return the complete project hierarchy.",
"parameters": [
@ -4350,7 +4363,7 @@ exports[`Fixtures Import postman complex-v2_0_fromHeaders-input.json 1`] = `
"value": "application/json",
},
],
"metaSortKey": 3,
"metaSortKey": -1622117983997,
"method": "GET",
"name": "Return a list containing all projects.",
"parameters": [
@ -4404,7 +4417,7 @@ exports[`Fixtures Import postman complex-v2_0_fromHeaders-input.json 1`] = `
"value": "application/json",
},
],
"metaSortKey": 4,
"metaSortKey": -1622117983996,
"method": "POST",
"name": "Create a new project.",
"parameters": [],
@ -4449,7 +4462,7 @@ Child projects are provided as references; i.e. they only contain the <code>self
"value": "application/json",
},
],
"metaSortKey": 5,
"metaSortKey": -1622117983995,
"method": "GET",
"name": "Display the specified project.",
"parameters": [],
@ -4504,7 +4517,7 @@ Changing a project's parent or children is currently not possible.
"value": "application/json",
},
],
"metaSortKey": 6,
"metaSortKey": -1622117983994,
"method": "PUT",
"name": "Update the specified project.",
"parameters": [],
@ -4528,6 +4541,7 @@ exports[`Fixtures Import postman complex-v2_0-input.json 1`] = `
"_type": "request_group",
"description": "A collection for testing",
"environment": {},
"metaSortKey": -1622117984000,
"name": "Complex Test Collection",
"parentId": "__WORKSPACE_ID__",
},
@ -4536,6 +4550,7 @@ exports[`Fixtures Import postman complex-v2_0-input.json 1`] = `
"_type": "request_group",
"description": "The first folder",
"environment": {},
"metaSortKey": -1622117983999,
"name": "First Folder",
"parentId": "__GRP_1__",
},
@ -4567,7 +4582,7 @@ exports[`Fixtures Import postman complex-v2_0-input.json 1`] = `
},
"description": "First Request",
"headers": [],
"metaSortKey": 2,
"metaSortKey": -1622117983998,
"method": "POST",
"name": "{{base_url}}/api/users",
"parameters": [],
@ -4596,7 +4611,7 @@ exports[`Fixtures Import postman complex-v2_0-input.json 1`] = `
},
"description": "First Request",
"headers": [],
"metaSortKey": 3,
"metaSortKey": -1622117983997,
"method": "POST",
"name": "Urlencoded Form Test",
"parameters": [],
@ -4614,7 +4629,7 @@ exports[`Fixtures Import postman complex-v2_0-input.json 1`] = `
},
"description": "Request with raw body",
"headers": [],
"metaSortKey": 4,
"metaSortKey": -1622117983996,
"method": "POST",
"name": "Test Request Raw Body",
"parameters": [],
@ -4629,7 +4644,7 @@ exports[`Fixtures Import postman complex-v2_0-input.json 1`] = `
"body": {},
"description": "Request with empty raw body",
"headers": [],
"metaSortKey": 5,
"metaSortKey": -1622117983995,
"method": "POST",
"name": "Test Request Empty Raw Body",
"parameters": [],
@ -4644,7 +4659,7 @@ exports[`Fixtures Import postman complex-v2_0-input.json 1`] = `
"body": {},
"description": "Request with unknown body",
"headers": [],
"metaSortKey": 6,
"metaSortKey": -1622117983994,
"method": "POST",
"name": "Test Request Unknown Body",
"parameters": [],
@ -4662,7 +4677,7 @@ exports[`Fixtures Import postman complex-v2_0-input.json 1`] = `
},
"description": "Request with graphql body",
"headers": [],
"metaSortKey": 7,
"metaSortKey": -1622117983993,
"method": "POST",
"name": "Test Request GraphQL Body",
"parameters": [],
@ -4686,6 +4701,7 @@ exports[`Fixtures Import postman complex-v2_1-input.json 1`] = `
"_type": "request_group",
"description": "A collection for testing",
"environment": {},
"metaSortKey": -1622117984000,
"name": "Complex Test Collection",
"parentId": "__WORKSPACE_ID__",
},
@ -4694,6 +4710,7 @@ exports[`Fixtures Import postman complex-v2_1-input.json 1`] = `
"_type": "request_group",
"description": "The first folder",
"environment": {},
"metaSortKey": -1622117983999,
"name": "First Folder",
"parentId": "__GRP_1__",
},
@ -4731,7 +4748,7 @@ exports[`Fixtures Import postman complex-v2_1-input.json 1`] = `
},
"description": "First Request",
"headers": [],
"metaSortKey": 2,
"metaSortKey": -1622117983998,
"method": "POST",
"name": "{{base_url}}/api/users",
"parameters": [],
@ -4760,7 +4777,7 @@ exports[`Fixtures Import postman complex-v2_1-input.json 1`] = `
},
"description": "First Request",
"headers": [],
"metaSortKey": 3,
"metaSortKey": -1622117983997,
"method": "POST",
"name": "Urlencoded Form Test",
"parameters": [],
@ -4778,7 +4795,7 @@ exports[`Fixtures Import postman complex-v2_1-input.json 1`] = `
},
"description": "Request with raw body",
"headers": [],
"metaSortKey": 4,
"metaSortKey": -1622117983996,
"method": "POST",
"name": "Test Request",
"parameters": [],
@ -4793,7 +4810,7 @@ exports[`Fixtures Import postman complex-v2_1-input.json 1`] = `
"body": {},
"description": "Request with unknown body",
"headers": [],
"metaSortKey": 5,
"metaSortKey": -1622117983995,
"method": "POST",
"name": "Test Request Unknown Body",
"parameters": [],
@ -4808,7 +4825,7 @@ exports[`Fixtures Import postman complex-v2_1-input.json 1`] = `
"body": {},
"description": "Request with empty raw body",
"headers": [],
"metaSortKey": 6,
"metaSortKey": -1622117983994,
"method": "POST",
"name": "Test Request Empty Body",
"parameters": [],
@ -4826,7 +4843,7 @@ exports[`Fixtures Import postman complex-v2_1-input.json 1`] = `
},
"description": "Request with graphql body",
"headers": [],
"metaSortKey": 7,
"metaSortKey": -1622117983993,
"method": "POST",
"name": "Test Request GraphQL Body",
"parameters": [],
@ -4850,6 +4867,7 @@ exports[`Fixtures Import postman digest-auth-v2_0-input.json 1`] = `
"_type": "request_group",
"description": "A collection for testing",
"environment": {},
"metaSortKey": -1622117984000,
"name": "Digest Authentication Test",
"parentId": "__WORKSPACE_ID__",
},
@ -4865,7 +4883,7 @@ exports[`Fixtures Import postman digest-auth-v2_0-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 2,
"metaSortKey": -1622117983999,
"method": "GET",
"name": "Digest Auth",
"parameters": [],
@ -4889,6 +4907,7 @@ exports[`Fixtures Import postman digest-auth-v2_1-input.json 1`] = `
"_type": "request_group",
"description": "A collection for testing",
"environment": {},
"metaSortKey": -1622117984000,
"name": "Digest Authentication Test",
"parentId": "__WORKSPACE_ID__",
},
@ -4904,7 +4923,7 @@ exports[`Fixtures Import postman digest-auth-v2_1-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 2,
"metaSortKey": -1622117983999,
"method": "GET",
"name": "Digest Auth",
"parameters": [],
@ -4928,6 +4947,7 @@ exports[`Fixtures Import postman minimal-v2_0-input.json 1`] = `
"_type": "request_group",
"description": "A collection for testing",
"environment": {},
"metaSortKey": -1622117984000,
"name": "Minimal Test Collection",
"parentId": "__WORKSPACE_ID__",
},
@ -4938,7 +4958,7 @@ exports[`Fixtures Import postman minimal-v2_0-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 2,
"metaSortKey": -1622117983999,
"method": "GET",
"name": "",
"parameters": [],
@ -4962,6 +4982,7 @@ exports[`Fixtures Import postman minimal-v2_1-input.json 1`] = `
"_type": "request_group",
"description": "A collection for testing",
"environment": {},
"metaSortKey": -1622117984000,
"name": "Minimal Test Collection",
"parentId": "__WORKSPACE_ID__",
},
@ -4972,7 +4993,7 @@ exports[`Fixtures Import postman minimal-v2_1-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 2,
"metaSortKey": -1622117983999,
"method": "GET",
"name": "",
"parameters": [],
@ -4996,6 +5017,7 @@ exports[`Fixtures Import postman oauth1_0-auth-v2_0-input.json 1`] = `
"_type": "request_group",
"description": "A collection for testing",
"environment": {},
"metaSortKey": -1622117984000,
"name": "Oauth 1.0 Test",
"parentId": "__WORKSPACE_ID__",
},
@ -5021,7 +5043,7 @@ exports[`Fixtures Import postman oauth1_0-auth-v2_0-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 2,
"metaSortKey": -1622117983999,
"method": "GET",
"name": "Added to Request Body/URL",
"parameters": [],
@ -5051,7 +5073,7 @@ exports[`Fixtures Import postman oauth1_0-auth-v2_0-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 3,
"metaSortKey": -1622117983998,
"method": "GET",
"name": "Added to Request Headers",
"parameters": [],
@ -5081,7 +5103,7 @@ exports[`Fixtures Import postman oauth1_0-auth-v2_0-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 4,
"metaSortKey": -1622117983997,
"method": "GET",
"name": "Signature Method PLAINTEXT",
"parameters": [],
@ -5111,7 +5133,7 @@ exports[`Fixtures Import postman oauth1_0-auth-v2_0-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 5,
"metaSortKey": -1622117983996,
"method": "GET",
"name": "Signature Method HMAC-SHA256",
"parameters": [],
@ -5141,7 +5163,7 @@ exports[`Fixtures Import postman oauth1_0-auth-v2_0-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 6,
"metaSortKey": -1622117983995,
"method": "GET",
"name": "Signature Method HMAC-SHA1",
"parameters": [],
@ -5165,6 +5187,7 @@ exports[`Fixtures Import postman oauth1_0-auth-v2_1-input.json 1`] = `
"_type": "request_group",
"description": "A collection for testing",
"environment": {},
"metaSortKey": -1622117984000,
"name": "Oauth 1.0 Test",
"parentId": "__WORKSPACE_ID__",
},
@ -5190,7 +5213,7 @@ exports[`Fixtures Import postman oauth1_0-auth-v2_1-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 2,
"metaSortKey": -1622117983999,
"method": "GET",
"name": "Added to Request Body/URL",
"parameters": [],
@ -5220,7 +5243,7 @@ exports[`Fixtures Import postman oauth1_0-auth-v2_1-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 3,
"metaSortKey": -1622117983998,
"method": "GET",
"name": "Added to Request Headers",
"parameters": [],
@ -5250,7 +5273,7 @@ exports[`Fixtures Import postman oauth1_0-auth-v2_1-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 4,
"metaSortKey": -1622117983997,
"method": "GET",
"name": "Signature Method PLAINTEXT",
"parameters": [],
@ -5280,7 +5303,7 @@ exports[`Fixtures Import postman oauth1_0-auth-v2_1-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 5,
"metaSortKey": -1622117983996,
"method": "GET",
"name": "Signature Method HMAC-SHA256",
"parameters": [],
@ -5310,7 +5333,7 @@ exports[`Fixtures Import postman oauth1_0-auth-v2_1-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 6,
"metaSortKey": -1622117983995,
"method": "GET",
"name": "Signature Method HMAC-SHA1",
"parameters": [],
@ -5334,6 +5357,7 @@ exports[`Fixtures Import postman oauth2_0-auth-v2_0-input.json 1`] = `
"_type": "request_group",
"description": "A collection for testing",
"environment": {},
"metaSortKey": -1622117984000,
"name": "Oauth 2.0 Test",
"parentId": "__WORKSPACE_ID__",
},
@ -5352,7 +5376,7 @@ exports[`Fixtures Import postman oauth2_0-auth-v2_0-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 2,
"metaSortKey": -1622117983999,
"method": "GET",
"name": "Added to Request URL",
"parameters": [],
@ -5375,7 +5399,7 @@ exports[`Fixtures Import postman oauth2_0-auth-v2_0-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 3,
"metaSortKey": -1622117983998,
"method": "GET",
"name": "Added to Request Headers",
"parameters": [],
@ -5399,6 +5423,7 @@ exports[`Fixtures Import postman oauth2_0-auth-v2_1-input.json 1`] = `
"_type": "request_group",
"description": "",
"environment": {},
"metaSortKey": -1622117984000,
"name": "oauth2",
"parentId": "__WORKSPACE_ID__",
},
@ -5426,7 +5451,7 @@ exports[`Fixtures Import postman oauth2_0-auth-v2_1-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 2,
"metaSortKey": -1622117983999,
"method": "GET",
"name": "auth code",
"parameters": [],
@ -5458,7 +5483,7 @@ exports[`Fixtures Import postman oauth2_0-auth-v2_1-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 3,
"metaSortKey": -1622117983998,
"method": "GET",
"name": "pkce",
"parameters": [],
@ -5490,7 +5515,7 @@ exports[`Fixtures Import postman oauth2_0-auth-v2_1-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 4,
"metaSortKey": -1622117983997,
"method": "GET",
"name": "implicit",
"parameters": [],
@ -5522,7 +5547,7 @@ exports[`Fixtures Import postman oauth2_0-auth-v2_1-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 5,
"metaSortKey": -1622117983996,
"method": "GET",
"name": "password",
"parameters": [],
@ -5554,7 +5579,7 @@ exports[`Fixtures Import postman oauth2_0-auth-v2_1-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 6,
"metaSortKey": -1622117983995,
"method": "GET",
"name": "client",
"parameters": [],
@ -5578,6 +5603,7 @@ exports[`Fixtures Import postman postman-export-oauth2-v2_1-input.json 1`] = `
"_type": "request_group",
"description": "",
"environment": {},
"metaSortKey": -1622117984000,
"name": "Example collection",
"parentId": "__WORKSPACE_ID__",
},
@ -5605,7 +5631,7 @@ exports[`Fixtures Import postman postman-export-oauth2-v2_1-input.json 1`] = `
"body": {},
"description": "",
"headers": [],
"metaSortKey": 2,
"metaSortKey": -1622117983999,
"method": "GET",
"name": "Example request with OAuth2",
"parameters": [],
@ -7967,6 +7993,7 @@ exports[`Fixtures Import wsdl addition-input.wsdl 1`] = `
"_type": "request_group",
"description": "",
"environment": {},
"metaSortKey": -1622117984000,
"name": "Calculator",
"parentId": "__WORKSPACE_ID__",
},
@ -7975,6 +8002,7 @@ exports[`Fixtures Import wsdl addition-input.wsdl 1`] = `
"_type": "request_group",
"description": "",
"environment": {},
"metaSortKey": -1622117983999,
"name": "Calculator",
"parentId": "__GRP_1__",
},
@ -8024,7 +8052,7 @@ exports[`Fixtures Import wsdl addition-input.wsdl 1`] = `
"value": "application/xml",
},
],
"metaSortKey": 2,
"metaSortKey": -1622117983998,
"method": "POST",
"name": "Add",
"parameters": [],
@ -8048,6 +8076,7 @@ exports[`Fixtures Import wsdl calculator-input.wsdl 1`] = `
"_type": "request_group",
"description": "",
"environment": {},
"metaSortKey": -1622117984000,
"name": "Calculator",
"parentId": "__WORKSPACE_ID__",
},
@ -8056,6 +8085,7 @@ exports[`Fixtures Import wsdl calculator-input.wsdl 1`] = `
"_type": "request_group",
"description": "",
"environment": {},
"metaSortKey": -1622117983999,
"name": "Calculator",
"parentId": "__GRP_1__",
},
@ -8105,7 +8135,7 @@ exports[`Fixtures Import wsdl calculator-input.wsdl 1`] = `
"value": "application/xml",
},
],
"metaSortKey": 2,
"metaSortKey": -1622117983998,
"method": "POST",
"name": "Add",
"parameters": [],
@ -8159,7 +8189,7 @@ exports[`Fixtures Import wsdl calculator-input.wsdl 1`] = `
"value": "application/xml",
},
],
"metaSortKey": 3,
"metaSortKey": -1622117983997,
"method": "POST",
"name": "Subtract",
"parameters": [],
@ -8213,7 +8243,7 @@ exports[`Fixtures Import wsdl calculator-input.wsdl 1`] = `
"value": "application/xml",
},
],
"metaSortKey": 4,
"metaSortKey": -1622117983996,
"method": "POST",
"name": "Multiply",
"parameters": [],
@ -8267,7 +8297,7 @@ exports[`Fixtures Import wsdl calculator-input.wsdl 1`] = `
"value": "application/xml",
},
],
"metaSortKey": 5,
"metaSortKey": -1622117983995,
"method": "POST",
"name": "Divide",
"parameters": [],

View File

@ -1,7 +1,7 @@
/*
* @jest-environment node
*/
import { describe, expect, it } from '@jest/globals';
import { describe, expect, it, jest } from '@jest/globals';
import fs from 'fs';
import path from 'path';
@ -9,8 +9,10 @@ import { convert } from '../convert';
const fixturesPath = path.join(__dirname, './fixtures');
const fixtures = fs.readdirSync(fixturesPath);
describe('Fixtures', () => {
afterEach(() => {
jest.restoreAllMocks(); // Resets all mocks
});
describe.each(fixtures)('Import %s', name => {
const dir = path.join(fixturesPath, `./${name}`);
const inputs = fs
@ -25,6 +27,8 @@ describe('Fixtures', () => {
}
it(input, async () => {
jest.spyOn(Date, 'now').mockImplementation(() => 1622117984000);
expect.assertions(3);
expect(typeof input).toBe('string');

View File

@ -188,7 +188,6 @@ export class ImportPostman {
body: this.importBody(request.body, headers.find(({ key }) => key === 'Content-Type')?.value),
authentication,
preRequestScript,
metaSortKey: requestCount,
};
};
@ -820,11 +819,14 @@ export const convert: Converter = rawData => {
collection.info.schema === POSTMAN_SCHEMA_V2_0 ||
collection.info.schema === POSTMAN_SCHEMA_V2_1
) {
return new ImportPostman(collection).importCollection();
const list = new ImportPostman(collection).importCollection();
// make import order play nice with existing pattern of descending negavitve numbers (technically ascending) eg. -3, -2, -1
const now = Date.now();
const ordered = list.map((item, index) => ({ ...item, metaSortKey: -1 * (now - index) }));
return ordered;
}
} catch (error) {
// Nothing
console.log('Error importing Postman collection', error);
}
return null;