Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: set up sandbox for script execution [INS-3378] #6991

Closed
wants to merge 35 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c4db28a
feat: enable islated utility process [INS-3378]
ihexxa Dec 2, 2023
2c57eda
fix: disable flaky test and extend timeout
ihexxa Dec 11, 2023
6e010d0
test: add some logs
ihexxa Dec 11, 2023
f9badb3
chore: add some logs
ihexxa Dec 11, 2023
8261c04
feat: add cookie related objects
ihexxa Dec 12, 2023
08dadd7
fix: add script path env for utility process
ihexxa Dec 13, 2023
47a3fbe
fix: lint issue
ihexxa Dec 13, 2023
1538d04
fix: lint error
ihexxa Dec 13, 2023
5ee7ffc
fix: make vite supporting multiple entries
ihexxa Dec 13, 2023
dea3165
fix: remove utility process building task and use vite instead
ihexxa Dec 13, 2023
438ecaa
fix: always outputs utility process bundle to src folder instead of b…
ihexxa Dec 13, 2023
5438d38
chore: some small fixes
ihexxa Dec 14, 2023
475ab01
fix: make utility process can be triggerred
ihexxa Dec 14, 2023
b8fb33b
fix: add missing file
ihexxa Dec 14, 2023
9ed1595
fix: enable smoke tests
ihexxa Dec 15, 2023
04178a7
fix: revert commented tests
ihexxa Dec 15, 2023
bb2b293
fix: utility process is a improper name for the browser window
ihexxa Dec 20, 2023
daad944
feat: support global object aliases and timeout
ihexxa Dec 20, 2023
42f46ed
chore: keep develop version for other tests
ihexxa Dec 21, 2023
e907790
fix: improve tests a bit and hide the browser window
ihexxa Dec 22, 2023
7a5076b
test: add tests for unhappy paths
ihexxa Dec 22, 2023
dbe2697
fix: get the main renderer instead of the first one in testing as the…
ihexxa Jan 2, 2024
485fe7c
chore: try keep test timeout untouched
ihexxa Jan 2, 2024
11b53f1
fix: pick improvements from the downstream PR
ihexxa Jan 3, 2024
6016412
fix: start hidden window on-demand instead of by default
ihexxa Jan 4, 2024
92a808c
test: create a helper function for waiting for a specific window
ihexxa Jan 4, 2024
f97320d
chore: add logs for hidden browser window initing
ihexxa Jan 4, 2024
99276aa
chore: add log prefix for logs
ihexxa Jan 8, 2024
7bf4191
chore: clean up and minimize changes
ihexxa Jan 17, 2024
0939f9b
chore: minimize changes
ihexxa Jan 17, 2024
5298c9e
fix: make test just run one line code and return
ihexxa Jan 17, 2024
de56d3e
fix: use builtin function for waiting
ihexxa Jan 17, 2024
c18fbbe
chore: turn class into functions
ihexxa Jan 17, 2024
7297ce8
chore: clean up
ihexxa Jan 17, 2024
2ad8d17
chore: refactor table driven tests into the normal approach
ihexxa Jan 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: make test just run one line code and return
  • Loading branch information
ihexxa authored and jackkav committed Feb 5, 2024
commit 5298c9e05706846d1cb1eb00e0df413bb23e6abe
Original file line number Diff line number Diff line change
Expand Up @@ -91,52 +91,12 @@ test.describe('pre-request script cases', async () => {
{
id: 'run js code and return empty object',
code: `
const bool2 = pm.environment.has('bool1');
console.log('hello world');
`,
context: {
insomnia: {
environment: {
bool1: true,
num1: 1,
str1: 'str',
},
},
insomnia: {},
},
expectedResult: {
collectionVariables: {},
iterationData: {},
globals: {},
variables: {
bool1: false,
num1: 11,
str1: 'strr',
bool2: true,
num2: 1,
str2: 'str',
'newObject.bool': true,
'newObject.num': 1,
'newObject.str': 'str',
'rendered': 'false-11-strr',
},
environment: {
bool1: false,
num1: 11,
str1: 'strr',
bool2: true,
num2: 1,
str2: 'str',
'newObject.bool': true,
'newObject.num': 1,
'newObject.str': 'str',
'rendered': 'false-11-strr',
},
info: {
'eventName': 'prerequest',
'iteration': 1,
'iterationCount': 1,
'requestId': '',
'requestName': '',
},
},
},
];
Expand Down