Basic Tests
These are some basic sanity tests implemented in the FDC3 Conformance Framework. It is expected that Desktop Agent testers will run these first before commencing the much more thorough tests in section 2 onwards.
Connection
In FDC3 2.2, a new interface was introduced to support Browser-based FDC3 Desktop Agents, known as a 'Desktop Agent Proxy', and a new getAgent
API call was introduced to all apps to retrieve the Desktop Agent API via that interface or the existing 'Desktop Agent Preload' interface. This test pack checks that the a connection is made correctly via getAgent
.
App | Step | Description |
---|---|---|
A | getAgent | A calls getAgent and waits for the promise to resolve to a DesktopAgent instance. |
A | getInfo | A can call the getInfo() method on the DesktopAgent instance to get the ImplementationMetadata object. Check that fdc3Version is set to 2.2. Check that provider and providerVersion are populated. |
A | getUserChannels | A can call the getUserChannels() method on the DesktopAgent instance to get the Channel objects representing the system channels.Check user channels are returned. |
GetAgentAPI
: Perform the above test.
Basic API Usage
BasicCL1
: You can create a context listener by callingfdc3.addContextListener('fdc3.contact',<handler>)
. AListener
object is returned and can be used to remove the listener again by calling itsunsubscribe
function.BasicCL2
: You can create an unfiltered context listener by callingfdc3.addContextListener(null,<handler>)
. AListener
object is returned and can be used to remove the listener again by calling itsunsubscribe
function.BasicIL1
: You can create an intent listener by callingfdc3.addIntentListener(<intent name>,<handler>)
. AListener
object is returned and can be used to remove the listener again by calling itsunsubscribe
function.BasicGI1
: An application can retrieve anImplementationMetadata
object to find out the version of FDC3 it is using and the provider details by calling:await fdc3.getInfo()
BasicAC1
: An application can retrieve a named 'App' channel via thefdc3.getOrCreateChannel(<name>)
function. TheChannel
object returned conforms to the defined interface.BasicUC1
: An application can query the available user/system channels, which are returned as an array ofChannel
Objects conforming to the defined interface. The API call is:await fdc3.getUserChannels()
BasicJC1
: The application should be able to join one of the user/system channels with the channel's id. Having done so, the current channel should NOT be null, and be set for the application to the channel for the id given. After you leave the current channel, it should go back to beingnull
.- The channel is joined with:
fdc3.joinUserChannel(<channelId>)
- A
Channel
object representing the current channel is retrieved with:fdc3.getCurrentChannel()
to get the current channel.
- The channel is left with:
fdc3.leaveCurrentChannel()
- The channel is joined with:
BasicRI1
: The application should be able to raise an intent by invoking:fdc3.raiseIntent(<intent name>)
- A promise should be returned.
BasicRI2
: The application should be able to raise an intent for some item of context by invoking:fdc3.raiseIntentForContext(<context>)
- A promise should be returned.