mirror of
https://github.com/Kong/insomnia.git
synced 2026-04-21 22:57:59 -04:00
chore: fix and re-org pre-request scripts
This commit is contained in:
@@ -42,7 +42,7 @@ resources:
|
||||
parentId: wrk_6b9b8455fd784462ae19cd51d7156f86
|
||||
modified: 1707809218855
|
||||
created: 1707808697304
|
||||
url: ""
|
||||
url: http://127.0.0.1:4010/echo
|
||||
name: Long running task
|
||||
description: ""
|
||||
method: GET
|
||||
@@ -78,7 +78,7 @@ resources:
|
||||
parentId: wrk_6b9b8455fd784462ae19cd51d7156f86
|
||||
modified: 1707809035895
|
||||
created: 1707809028449
|
||||
url: ""
|
||||
url: http://127.0.0.1:4010/echo
|
||||
name: Range error
|
||||
description: ""
|
||||
method: GET
|
||||
@@ -103,7 +103,7 @@ resources:
|
||||
parentId: wrk_6b9b8455fd784462ae19cd51d7156f86
|
||||
modified: 1707808953866
|
||||
created: 1707808727077
|
||||
url: ""
|
||||
url: http://127.0.0.1:4010/echo
|
||||
name: Syntax error
|
||||
description: ""
|
||||
method: GET
|
||||
@@ -128,7 +128,7 @@ resources:
|
||||
parentId: wrk_6b9b8455fd784462ae19cd51d7156f86
|
||||
modified: 1707808979424
|
||||
created: 1707808961112
|
||||
url: ""
|
||||
url: http://127.0.0.1:4010/echo
|
||||
name: Type error
|
||||
description: ""
|
||||
method: GET
|
||||
@@ -155,7 +155,7 @@ resources:
|
||||
parentId: wrk_6b9b8455fd784462ae19cd51d7156f86
|
||||
modified: 1707809017110
|
||||
created: 1707809000715
|
||||
url: ""
|
||||
url: http://127.0.0.1:4010/echo
|
||||
name: Reference error
|
||||
description: ""
|
||||
method: GET
|
||||
@@ -194,3 +194,35 @@ resources:
|
||||
name: Default Jar
|
||||
cookies: []
|
||||
_type: cookie_jar
|
||||
- _id: fld_01de564274824ecaad272330339ea6b2
|
||||
parentId: wrk_6b9b8455fd784462ae19cd51d7156f86
|
||||
modified: 1668533312225
|
||||
created: 1668533312225
|
||||
name: FolderWithEnv
|
||||
description: ""
|
||||
environment:
|
||||
customValue: "fromFolder"
|
||||
environmentPropertyOrder: null
|
||||
metaSortKey: -1668533312225
|
||||
_type: request_group
|
||||
- _id: req_89dade2ee9ee42fbb22d588783a9df3c
|
||||
parentId: fld_01de564274824ecaad272330339ea6b2
|
||||
modified: 1636707449231
|
||||
created: 1636141014552
|
||||
url: http://127.0.0.1:4010/echo
|
||||
name: echo pre-request script result
|
||||
description: ""
|
||||
method: POST
|
||||
body: {}
|
||||
parameters: []
|
||||
headers: []
|
||||
authentication: {}
|
||||
metaSortKey: -1636141014553
|
||||
isPrivate: false
|
||||
settingStoreCookies: true
|
||||
settingSendCookies: true
|
||||
settingDisableRenderRequestBody: false
|
||||
settingEncodeUrl: true
|
||||
settingRebuildPath: true
|
||||
settingFollowRedirects: global
|
||||
_type: request
|
||||
|
||||
@@ -176,27 +176,6 @@ resources:
|
||||
settingRebuildPath: true
|
||||
settingFollowRedirects: global
|
||||
_type: request
|
||||
- _id: req_89dade2ee9ee42fbb22d588783a9df3c
|
||||
parentId: fld_01de564274824ecaad272330339ea6b2
|
||||
modified: 1636707449231
|
||||
created: 1636141014552
|
||||
url: http://127.0.0.1:4010/echo
|
||||
name: echo pre-request script result
|
||||
description: ""
|
||||
method: POST
|
||||
body: {}
|
||||
parameters: []
|
||||
headers: []
|
||||
authentication: {}
|
||||
metaSortKey: -1636141014553
|
||||
isPrivate: false
|
||||
settingStoreCookies: true
|
||||
settingSendCookies: true
|
||||
settingDisableRenderRequestBody: false
|
||||
settingEncodeUrl: true
|
||||
settingRebuildPath: true
|
||||
settingFollowRedirects: global
|
||||
_type: request
|
||||
- _id: env_afc214be117853a024cce22f194c500e68dac13f
|
||||
parentId: wrk_5b5ab67830944ffcbec47528366ef403
|
||||
modified: 1636140994432
|
||||
@@ -265,37 +244,3 @@ resources:
|
||||
settingRebuildPath: true
|
||||
settingFollowRedirects: global
|
||||
_type: request
|
||||
- _id: fld_01de564274824ecaad272330339ea6b2
|
||||
parentId: wrk_5b5ab67830944ffcbec47528366ef403
|
||||
modified: 1668533312225
|
||||
created: 1668533312225
|
||||
name: FolderWithEnv
|
||||
description: ""
|
||||
environment:
|
||||
customValue: "fromFolder"
|
||||
environmentPropertyOrder: null
|
||||
metaSortKey: -1668533312225
|
||||
_type: request_group
|
||||
- _id: req_0769dca686df49358082b2183dfa073d
|
||||
parentId: fld_01de564274824ecaad272330339ea6b2
|
||||
modified: 1643892278711
|
||||
created: 1643892270079
|
||||
url: http://127.0.0.1:4010/echo
|
||||
name: sends request with pre-request script
|
||||
description: ""
|
||||
method: GET
|
||||
body: {}
|
||||
parameters: []
|
||||
headers: []
|
||||
authentication: {}
|
||||
preRequestScript: "insomnia.environment.set('my-pre-request-header', 'some-value');"
|
||||
metaSortKey: -1643892270079
|
||||
isPrivate: false
|
||||
settingStoreCookies: true
|
||||
settingSendCookies: true
|
||||
settingDisableRenderRequestBody: false
|
||||
settingEncodeUrl: true
|
||||
settingRebuildPath: true
|
||||
settingFollowRedirects: global
|
||||
_type: request
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@ import { expect } from '@playwright/test';
|
||||
import { loadFixture } from '../../playwright/paths';
|
||||
import { test } from '../../playwright/test';;
|
||||
|
||||
test.describe('pre-request UI tests', async () => {
|
||||
test.describe('pre-request features tests', async () => {
|
||||
test.slow(process.platform === 'darwin' || process.platform === 'win32', 'Slow app start on these platforms');
|
||||
|
||||
test.beforeEach(async ({ app, page }) => {
|
||||
const text = await loadFixture('smoke-test-collection.yaml');
|
||||
const text = await loadFixture('pre-request-collection.yaml');
|
||||
await app.evaluate(async ({ clipboard }, text) => clipboard.writeText(text), text);
|
||||
|
||||
await page.getByRole('button', { name: 'Create in project' }).click();
|
||||
@@ -16,7 +16,7 @@ test.describe('pre-request UI tests', async () => {
|
||||
await page.getByRole('button', { name: 'Scan' }).click();
|
||||
await page.getByRole('dialog').getByRole('button', { name: 'Import' }).click();
|
||||
|
||||
await page.getByLabel('Smoke tests').click();
|
||||
await page.getByLabel('Pre-request Scripts').click();
|
||||
});
|
||||
|
||||
const testCases = [
|
||||
Reference in New Issue
Block a user