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

Added support for accessing execution location through script #1336

Merged
merged 3 commits into from
Nov 18, 2023

Conversation

vedkribhu
Copy link
Contributor

@vedkribhu vedkribhu commented Sep 18, 2023

No description provided.

@vedkribhu vedkribhu force-pushed the feat/add-path branch 3 times, most recently from 8173e3a to 0266d96 Compare September 25, 2023 05:58
@codecov-commenter
Copy link

codecov-commenter commented Sep 25, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (3ed56c6) 78.73% compared to head (10141d4) 42.30%.
Report is 2 commits behind head on develop.

Files Patch % Lines
lib/runner/extensions/event.command.js 0.00% 3 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #1336       +/-   ##
============================================
- Coverage    78.73%   42.30%   -36.44%     
============================================
  Files           45       45               
  Lines         3316     3319        +3     
  Branches       947      950        +3     
============================================
- Hits          2611     1404     -1207     
- Misses         705     1915     +1210     
Flag Coverage Δ
integration ?
legacy ?
unit 42.30% <0.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vedkribhu vedkribhu changed the title feat(sandbox-pmapi): add support to get path of current request in sandbox scripts feat(event): add support to get path of current request in sandbox scripts Oct 11, 2023
test/integration/sandbox-libraries/pm.test.js Outdated Show resolved Hide resolved
test/integration/sandbox-libraries/pm.test.js Show resolved Hide resolved
test/integration/sandbox-libraries/pm.test.js Outdated Show resolved Hide resolved
Comment on lines 801 to 861
it(`should have path as correct path for a request nested inside folder when printed from
pre-request script of collection`, function () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the convention in this repo? Should test names contain a newline?

Suggested change
it(`should have path as correct path for a request nested inside folder when printed from
pre-request script of collection`, function () {
it(
'should have path as correct path for a request nested inside folder when printed from pre-request script of collection',
function () {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codenirvana can guide here, not able to find more such instances.

test/integration/sandbox-libraries/pm.test.js Outdated Show resolved Hide resolved
@vedkribhu vedkribhu force-pushed the feat/add-path branch 2 times, most recently from 1035516 to 4acc8d0 Compare October 11, 2023 11:42
@coditva
Copy link
Member

coditva commented Oct 12, 2023

Need to update the CHANGELOG.yaml.

@vedkribhu vedkribhu force-pushed the feat/add-path branch 2 times, most recently from 87f6dc5 to b9bae6b Compare October 16, 2023 10:56
@vedkribhu vedkribhu force-pushed the feat/add-path branch 4 times, most recently from 352f923 to 7b9b062 Compare November 15, 2023 04:45
lib/runner/extensions/event.command.js Outdated Show resolved Hide resolved
test/integration/sandbox-libraries/pm.test.js Outdated Show resolved Hide resolved
Copy link
Member

@coditva coditva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Can merge once postman-sandbox is bumped.

@@ -457,6 +457,8 @@ module.exports = {
shouldSkipExecution = true;
});

const currentEventItem = event.parent && event.parent();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add comment about why the current item is .parent?

@appurva21 appurva21 changed the title feat(event): add support to get path of current request in sandbox scripts Added support for accessing execution location through script Nov 18, 2023
appurva21
appurva21 previously approved these changes Nov 18, 2023
@codenirvana codenirvana merged commit 285b940 into develop Nov 18, 2023
8 of 9 checks passed
@codenirvana codenirvana deleted the feat/add-path branch November 18, 2023 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants