Skip to main content
Version: Next

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

2.2+ 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.

AppStepDescription
AgetInfoApp A calls getInfo() on the connected DesktopAgent and checks that fdc3Version is at least the FDC3 version used by the conformance framework.
AgetUserChannelsApp A calls getUserChannels() and checks that at least one User channel is returned.
  • GetInfoFDC3Version: 2.2+ Perform the above steps as a single test.

Basic API Usage

  • BasicCL1 2.0+: A context listener can be created for a specific context type by calling fdc3.addContextListener("fdc3.contact",<handler>). A Listener object is returned and can be used to remove the listener again by calling its unsubscribe function.
  • BasicCL2 2.0+: An unfiltered context listener can be created by calling fdc3.addContextListener(null,<handler>). A Listener object is returned and can be used to remove the listener again by calling its unsubscribe function.
  • BasicIL1 2.0+: An intent listener can be created for a specific intent by calling fdc3.addIntentListener(<intentName>,<handler>). A Listener object is returned and can be used to remove the listener again by calling its unsubscribe function.
  • BasicGI1 2.0+: An ImplementationMetadata 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(). The FDC3 version should match the API version being tested for conformance.
  • BasicAC1 2.0+: A named 'App' channel can be retrieved by calling fdc3.getOrCreateChannel(<name>). The Channel object returned conforms to the defined interface.
  • BasicUC1 2.0+: The list available user/system channels can be retrieved, as an array of Channel Objects conforming to the defined interface, by calling await fdc3.getUserChannels().
  • BasicJC1 2.0+: If getInfo().optionalFeatures.UserChannelMembershipAPIs is true, joinUserChannel, getCurrentChannel, and leaveCurrentChannel are callable. The test retrieves a non-empty array of User channels, joins the first channel, verifies that getCurrentChannel() returns it, then leaves and verifies that getCurrentChannel() returns null. The test is skipped when the optional feature is not advertised.
  • BasicRI1 2.0+: A specified intent can be raised by invoking fdc3.raiseIntent(<intent name>, <context>). A promise should be returned.
  • BasicRI2 2.0+: An intent can be raised for some item of context by invoking: fdc3.raiseIntentForContext(<context>). A promise should be returned.
  • BasicClose1 3.0: 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 the CloseError enumeration.