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 skipping request execution through script #1354

Merged
merged 3 commits into from
Nov 2, 2023

Conversation

vedkribhu
Copy link
Contributor

@vedkribhu vedkribhu commented Oct 30, 2023

Added support for pm.execution.skipRequest()

@vedkribhu vedkribhu force-pushed the feat/skip-request-remove-listener branch from d49315f to a9bb7c1 Compare October 31, 2023 05:40
@codecov-commenter
Copy link

codecov-commenter commented Oct 31, 2023

Codecov Report

Merging #1354 (3a79a07) into develop (b98d1e3) will increase coverage by 0.14%.
The diff coverage is 100.00%.

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

@@             Coverage Diff             @@
##           develop    #1354      +/-   ##
===========================================
+ Coverage    78.59%   78.73%   +0.14%     
===========================================
  Files           45       45              
  Lines         3298     3316      +18     
  Branches       943      947       +4     
===========================================
+ Hits          2592     2611      +19     
+ Misses         706      705       -1     
Flag Coverage Δ
integration 69.96% <100.00%> (+0.19%) ⬆️
legacy 46.07% <80.95%> (+0.17%) ⬆️
unit 42.34% <14.28%> (-0.15%) ⬇️

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

Files Coverage Δ
lib/runner/extensions/event.command.js 91.28% <100.00%> (+1.13%) ⬆️
lib/runner/extensions/item.command.js 93.02% <100.00%> (+0.25%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@vedkribhu
Copy link
Contributor Author

Test failures are expected until sandbox version bump.

CHANGELOG.yaml Outdated Show resolved Hide resolved
lib/runner/extensions/event.command.js Outdated Show resolved Hide resolved
lib/runner/extensions/item.command.js Outdated Show resolved Hide resolved
originalContextOnHandler.call(context, eventName, function () {
const cursor = arguments && arguments[0];

if (cursor && cursor.execution && isExecutionSkipped(cursor.execution)) { return; }
Copy link
Member

Choose a reason for hiding this comment

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

@codenirvana FYI This approach introduces a risk for any new event introduced in sandbox, that does not emit cursor as its first argument.

@codenirvana codenirvana changed the title feat: add support to skip request execution from script. Added support for skipping request execution through script Nov 2, 2023
@codenirvana codenirvana merged commit ff7500c into develop Nov 2, 2023
9 checks passed
@codenirvana codenirvana deleted the feat/skip-request-remove-listener branch November 2, 2023 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants