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

Intents Test Cases #19

Closed
14 tasks
robmoffat opened this issue Jun 9, 2022 · 2 comments
Closed
14 tasks

Intents Test Cases #19

robmoffat opened this issue Jun 9, 2022 · 2 comments
Assignees

Comments

@robmoffat
Copy link
Member

robmoffat commented Jun 9, 2022

Setup

You will need to pre-populate the AppDirectory with the following items:

App Required Metadata
A A’s AppD Record contains: aTestingIntent (with context type testContextX, testContextZ) and sharedTestingIntent1 (with context type testContextX)
B B’s AppD Record contains bTestingIntent (with context type testContextY) and sharedTestingIntent1 (with context types testContextX and testContextY)
C C’s AppD Record contains cTestingIntent (with context type testContextX)

Also we assume a fourth app D that is going to discover the intents in the other 3.

Find Intent From AppD

  • IntentAppD: Calls fdc3.findIntent(‘aTestingIntent’). Receives promise containing an appIntent with metadata containing aTestingIntent and only A app metadata.
  • WrongIntentAppD: Calls fdc3.findIntent(‘nonExistentIntent’). Rejects with no apps found error https://fdc3.finos.org/docs/api/ref/Errors#resolveerror
  • IntentAppDRightContext: Calls fdc3.findIntent(‘aTestingIntent’, ‘fdc3.testContextX’). Receives promise containing an appIntent with metadata containing aTestingIntent and only A app metadata.
  • IntentAppDWrongContext: Calls fdc3.findIntent(‘aTestingIntent’, ‘fdc3.testContextY’). Rejects with no apps found error https://fdc3.finos.org/docs/api/ref/Errors#resolveerror
  • IntentAppDMultiple1: Calls fdc3.findIntent(‘sharedTestingIntent1’). Receives promise containing an appIntent with metadata containing sharedTestingIntent and only A and B app metadata.
  • IntentAppDMultiple2: Calls fdc3.findIntent(‘sharedTestingIntent1’, 'testContextX). Receives promise containing an appIntent with metadata containing sharedTestingIntent` and only A and B app metadata.
  • IntentAppDMultiple2: Calls fdc3.findIntent(‘sharedTestingIntent1’, 'testContextY). Receives promise containing an appIntent with metadata containing sharedTestingIntent` and only B app metadata.

Find Intents By Context

  • SingleContext: Call fdc3.findIntentsByContext(‘fdc3.testContextX’). Should return aTestingIntent (app A), sharedTestingIntent (A, B) and cTestingIntent (C) AND nothing else.
  • NoContext: Call fdc3.findIntentsByContext(). Throws error of some kind?

Raise Intent

App Step Details
D Raise fdc3.raiseIntent(‘sharedTestingIntent1’, {testContextY})
starts app B.
B Gather Context fdc.addIntentListener(‘sharedTestingIntent1’)
Receives testContextY, matching that sent by D
  • SingleResolve1: Perform above test
  • TargetedResolve1: Use fdc3.raiseIntent(‘aTestingIntent’, {testContextX}, <A’s App Name>) to 
start app A, otherwise, as above
  • TargetedResolve2,3,4 Use the other ways of addressing apps (via ID, metadata) as described at the start of Open API Test Cases #18
  • FailedResolve1-4 As above, but use fdc3.raiseIntent(‘aTestingIntent’, {testContextY}, <A’s App Name>) and variations. You will receive No Apps Available Resolve Error
  • FailedResolve5-8 As above, but use fdc3.raiseIntent(‘aTestingIntent’, {testContextX}, <C’s App Name>) and variations. You will receive No Apps Available Resolve Error
@amehta-scottlogic
Copy link
Contributor

Hi, could I please take a look at this issue?

@ColinEberhardt
Copy link
Contributor

closed via #52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants