-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed error messages from raise intent
- Loading branch information
Showing
11 changed files
with
102 additions
and
84 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@kite9/da-proxy", | ||
"version": "0.0.17", | ||
"version": "0.0.19", | ||
"files": [ | ||
"dist" | ||
], | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,53 @@ | ||
Feature: Basic Intents Support | ||
|
||
Background: Desktop Agent API | ||
|
||
Given A Desktop Agent in "api" | ||
|
||
And app "chipShop/c1" resolves intent "OrderFood" with result type "void" | ||
And app "chipShop/c2" resolves intent "OrderFood" with result type "channel<fdc3.chips>" | ||
And app "bank/b1" resolves intent "Buy" with context "fdc3.instrument" and result type "fdc3.order" | ||
And app "bank/b1" resolves intent "Sell" with context "fdc3.instrument" and result type "fdc3.order" | ||
And app "travelAgent/t1" resolves intent "BookFlight" with context "fdc3.country" and result type "fdc3.order" | ||
|
||
And "instrumentContext" is a "fdc3.instrument" context | ||
And "countryContext" is a "fdc3.country" context | ||
|
||
Scenario: Raising An Invalid Intent to the server | ||
|
||
When I call "api" with "raiseIntent" with parameters "Buy" and "{instrumentContext}" and "{c1}" | ||
Then "{result}" is an error with message "NoAppsFound" | ||
|
||
Scenario: Raising An Invalid Intent to the server | ||
|
||
When I call "api" with "raiseIntentForContext" with parameters "{intrumentContext}" and "{t1}" | ||
Then "{result}" is an error with message "NoAppsFound" | ||
|
||
Scenario: Raising an intent and invoking the intent resolver when it's not clear which intent is required | ||
|
||
Background: Desktop Agent API | ||
Given A Desktop Agent in "api" | ||
And app "chipShop/c1" resolves intent "OrderFood" with result type "void" | ||
And app "chipShop/c2" resolves intent "OrderFood" with result type "channel<fdc3.chips>" | ||
And app "bank/b1" resolves intent "Buy" with context "fdc3.instrument" and result type "fdc3.order" | ||
And app "bank/b1" resolves intent "Sell" with context "fdc3.instrument" and result type "fdc3.order" | ||
And app "travelAgent/t1" resolves intent "BookFlight" with context "fdc3.country" and result type "fdc3.order" | ||
And "instrumentContext" is a "fdc3.instrument" context | ||
And "countryContext" is a "fdc3.country" context | ||
|
||
Scenario: Raising An Invalid Intent to the server (no instance) | ||
When I call "api" with "raiseIntent" with parameters "Buy" and "{instrumentContext}" and "{c1}" | ||
Then "{result}" is an error with message "TargetInstanceUnavailable" | ||
|
||
Scenario: Raising An Invalid Intent to the server (no app) | ||
When I call "api" with "raiseIntent" with parameters "Buy" and "{instrumentContext}" and "{chipShop}" | ||
Then "{result}" is an error with message "TargetAppUnavailable" | ||
|
||
Scenario: Raising An Invalid Intent to the server | ||
When I call "api" with "raiseIntentForContext" with parameters "{intrumentContext}" and "{t1}" | ||
Then "{result}" is an error with message "NoAppsFound" | ||
|
||
Scenario: Raising an intent and invoking the intent resolver when it's not clear which intent is required | ||
The intent resolver built in to the tests will just take the first matching application | ||
that would resolve the intent. | ||
|
||
When I call "api" with "raiseIntent" with parameters "OrderFood" and "{instrumentContext}" | ||
Then "{result}" is an object with the following contents | ||
| source.appId | source.instanceId | | ||
| chipShop | c1 | | ||
When I call "api" with "raiseIntent" with parameters "OrderFood" and "{instrumentContext}" | ||
Then "{result}" is an object with the following contents | ||
| source.appId | source.instanceId | | ||
| chipShop | c1 | | ||
|
||
Scenario: Raising Intent By Context and invoking the intent resolver when it's not clear which intent is required | ||
|
||
Scenario: Raising Intent By Context and invoking the intent resolver when it's not clear which intent is required | ||
The intent resolver built in to the tests will just take the first matching application | ||
that would resolve an intent. | ||
|
||
When I call "api" with "raiseIntentForContext" with parameter "{instrumentContext}" | ||
Then "{result}" is an object with the following contents | ||
| source.appId | source.instanceId | | ||
| bank | b1 | | ||
|
||
Scenario: Raising Intent exactly right, so the resolver isn't required | ||
|
||
When I call "api" with "raiseIntent" with parameters "Buy" and "{instrumentContext}" | ||
Then "{result}" is an object with the following contents | ||
| source.appId | source.instanceId | | ||
| bank | b1 | | ||
|
||
Scenario: Raising Intent By Context exactly right, so the resolver isn't required | ||
|
||
When I call "api" with "raiseIntentForContext" with parameters "{countryContext}" and "{t1}" | ||
Then "{result}" is an object with the following contents | ||
| source.appId | source.instanceId | | ||
| travelAgent | t1 | | ||
When I call "api" with "raiseIntentForContext" with parameter "{instrumentContext}" | ||
Then "{result}" is an object with the following contents | ||
| source.appId | source.instanceId | | ||
| bank | b1 | | ||
|
||
Scenario: Raising Intent exactly right, so the resolver isn't required | ||
When I call "api" with "raiseIntent" with parameters "Buy" and "{instrumentContext}" | ||
Then "{result}" is an object with the following contents | ||
| source.appId | source.instanceId | | ||
| bank | b1 | | ||
|
||
Scenario: Raising Intent By Context exactly right, so the resolver isn't required | ||
When I call "api" with "raiseIntentForContext" with parameters "{countryContext}" and "{t1}" | ||
Then "{result}" is an object with the following contents | ||
| source.appId | source.instanceId | | ||
| travelAgent | t1 | |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@kite9/da-server", | ||
"version": "0.0.17", | ||
"version": "0.0.19", | ||
"files": [ | ||
"dist" | ||
], | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@kite9/fdc3-common", | ||
"version": "0.0.17", | ||
"version": "0.0.19", | ||
"files": [ | ||
"dist" | ||
], | ||
|
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