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 | App A calls getAgent and waits for the promise to resolve to a DesktopAgent instance. |
A | getInfo | App 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 | App 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
: A context listener can be created for a specific context type by callingfdc3.addContextListener("fdc3.contact",<handler>)
. AListener
object is returned and can be used to remove the listener again by calling itsunsubscribe
function.BasicCL2
: An unfiltered context listener can be created by callingfdc3.addContextListener(null,<handler>)
. AListener
object is returned and can be used to remove the listener again by calling itsunsubscribe
function.BasicIL1
: An intent listener can be created for a specific intent by callingfdc3.addIntentListener(<intentName>,<handler>)
. AListener
object is returned and can be used to remove the listener again by calling itsunsubscribe
function.BasicGI1
: AnImplementationMetadata
object can be retrieved, to find out the version of FDC3 that is in use along with details of the provider, by calling:await fdc3.getInfo()
.w The FDC3 version should match the API version being tested for conformance.
BasicAC1
: A named 'App' channel can be retrieved by callingfdc3.getOrCreateChannel(<name>)
. TheChannel
object returned conforms to the defined interface.BasicUC1
: The list available user/system channels can be retrieved, as an array ofChannel
Objects conforming to the defined interface, by callingawait fdc3.getUserChannels()
.BasicJC1
: A user/system channel can be joined with the with the channel's id by callingfdc3.joinUserChannel(<channelId>)
. Having done so, the current channel, retrieved by callingfdc3.getCurrentChannel()
should NOT be null and should match the channel id given. After leaving the current channel by callingfdc3.leaveCurrentChannel()
, it should go back to beingnull
.BasicRI1
: A specified intent can be raised by invokingfdc3.raiseIntent(<intent name>, <context>)
. A promise should be returned.BasicRI2
: An intent can be raised for some item of context by invoking:fdc3.raiseIntentForContext(<context>)
. A promise should be returned.