-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[breaking] some magic variables e.g. __loop and __arg
will not be visible to calling features, which IMO is good, less variable clutter decision is to keep __arg __loop __row and __num as [hidden] variables they will continue to be [visible] to called features but thats about it and of course be available to use in any js expression / assertion this shold hoefully solve all problems discussed in #1436 callonce also looks good, we have one existing test [callonce-bg.feature]
- Loading branch information
Showing
9 changed files
with
40 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
karate-core/src/test/java/com/intuit/karate/core/call-arg-called.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Feature: | ||
|
||
Background: | ||
* match __arg == { foo: 'bar' } | ||
* call read('call-arg-common.feature') | ||
|
||
Scenario: | ||
* print 'in scenario' | ||
* match __arg == { foo: 'bar' } |
4 changes: 4 additions & 0 deletions
4
karate-core/src/test/java/com/intuit/karate/core/call-arg-common.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Feature: | ||
|
||
Scenario: | ||
* def hello = function(){ return 'hello' } |
8 changes: 8 additions & 0 deletions
8
karate-core/src/test/java/com/intuit/karate/core/call-arg.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Feature: | ||
|
||
Background: | ||
* print 'in background' | ||
|
||
Scenario: | ||
* def params = { 'foo': 'bar' } | ||
* call read('call-arg-called.feature') params |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters