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 checks that the connected Desktop Agent reports a compatible FDC3 version and provides User channels.
| App | Step | Description |
|---|---|---|
| A | getInfo | App A calls getInfo() on the connected DesktopAgent and checks that fdc3Version is at least the FDC3 version used by the conformance framework. |
| A | getUserChannels | App A calls getUserChannels() and checks that at least one User channel is returned. |
GetInfoFDC3Version:Perform the above steps as a single test.
Basic API Usage
BasicCL1: A context listener can be created for a specific context type by calling
fdc3.addContextListener("fdc3.contact",<handler>). AListenerobject is returned and can be used to remove the listener again by calling itsunsubscribefunction.BasicCL2: An unfiltered context listener can be created by calling
fdc3.addContextListener(null,<handler>). AListenerobject is returned and can be used to remove the listener again by calling itsunsubscribefunction.BasicIL1: An intent listener can be created for a specific intent by calling
fdc3.addIntentListener(<intentName>,<handler>). AListenerobject is returned and can be used to remove the listener again by calling itsunsubscribefunction.BasicGI1: An
ImplementationMetadataobject 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(). The FDC3 version should match the API version being tested for conformance.
BasicAC1: A named 'App' channel can be retrieved by calling
fdc3.getOrCreateChannel(<name>). TheChannelobject returned conforms to the defined interface.BasicUC1: The list available user/system channels can be retrieved, as an array of
ChannelObjects conforming to the defined interface, by callingawait fdc3.getUserChannels().BasicJC1: If
getInfo().optionalFeatures.UserChannelMembershipAPIsistrue,joinUserChannel,getCurrentChannel, andleaveCurrentChannelare callable. The test retrieves a non-empty array of User channels, joins the first channel, verifies thatgetCurrentChannel()returns it, then leaves and verifies thatgetCurrentChannel()returnsnull. The test is skipped when the optional feature is not advertised.BasicRI1: A specified intent can be raised by invoking
fdc3.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.BasicClose1: An app can request that its own window or frame be closed by calling
fdc3.close(). On success the app is closed (the promise does not resolve). On failure the promise rejects with an error from theCloseErrorenumeration.