Skip to content

Conformance 2.2: Added New Tests Specified by Test-Pack.#1586

Merged
kriswest merged 79 commits intomainfrom
fdc3-new-conformance-2.2
Feb 4, 2026
Merged

Conformance 2.2: Added New Tests Specified by Test-Pack.#1586
kriswest merged 79 commits intomainfrom
fdc3-new-conformance-2.2

Conversation

@robmoffat
Copy link
Copy Markdown
Member

@robmoffat robmoffat commented Apr 25, 2025

Describe your change

Adds two new FDC3 2.2 conformance tests per test-pack specification and makes conformance framework deployment-aware for netlify previews, localhost, and production.

Changes

Conformance Tests

  • Manual ChannelChangedEvent test verifying event listener behavior
  • Additional test coverage from test-pack specification
  • Updated FDC3 Demo implementation to pass new manual tests

Deployment Infrastructure

  • AppD URLs now relative to hosting environment (preview/localhost/production)
  • Added replaceConformanceUrls.js script for dynamic URL injection
  • Created preview-conformance.v2.json and website-conformance.v2.json app directories

Fixes

  • Fixed broadcast handler duplicate context handling for instanceIds
  • Corrected WCP1Hello schema property name in HelloHandler
  • Updated test timing constants for reliability across platforms

Dependencies

  • Updated package-lock.json for consistency
  • Fixed js-yaml and other dependency vulnerabilities

Related Issue

Resolves #1455, #1611
Raises #1585

Contributor License Agreement

  • I acknowledge that a contributor license agreement is required and that I have one in place or will seek to put one in place ASAP.

@robmoffat robmoffat requested a review from a team as a code owner April 25, 2025 16:23
Roaders
Roaders previously approved these changes Apr 28, 2025
Comment thread .husky/pre-commit Outdated
Copy link
Copy Markdown
Contributor

@kriswest kriswest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't disable the application of prettier to the codebase as this will cause very large diffs whenever the code generation is run, unless prettier is manually run afterwards. Please provide more detail on what issues it has caused for you and lets work out a solution.

Comment thread .husky/pre-commit Outdated
@Roaders
Copy link
Copy Markdown
Contributor

Roaders commented Apr 28, 2025

Is there a github actions to ensure that prettier has been run? WE should run lint (without fixes) to ensure that no code gets into the repo that does not pass linting.

As I said you can't rely on husky at all. It does not run from visual studio code when you do a commit (at least it didn't, I am not aware of any fixes for this).

I assume that most people contributing would use VS code?

We should probably add a recommended extension setting so that people install the vscode prettier plugin so that changes are made whenever you save a file.

@kriswest
Copy link
Copy Markdown
Contributor

If the huskey precommit hook isn't working using that shell script, then we can instead configure it in the package.json file by adding:

"husky": {
  "hooks": {
    "pre-commit": "npx lint-staged"
  }
}

That might provide better cross-platform support. Original set-up instructions I used to (restore prettier use in the repo after refactor) came from prettier: https://prettier.io/docs/install#git-hooks

@robmoffat robmoffat requested a review from kriswest May 1, 2025 11:10
@robmoffat
Copy link
Copy Markdown
Member Author

robmoffat commented May 1, 2025

This is passing for me now. I suggest we get @julianna-ciq to engage with the interop.io guys on testing against this. Giles, I presume you're able to run against your stuff too, right? WDYT?

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2025

506 passed

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2025

Coverage Report

Commit: e62cd13
Base: main@1de1238

Type Base This PR
Total Statements Coverage  97.16%  96.57% (-0.59%)
Total Branches Coverage  86%  85.75% (-0.25%)
Total Functions Coverage  96.13%  95.31% (-0.82%)
Total Lines Coverage  97.32%  96.65% (-0.67%)
Details (changed files)
FileStatementsBranchesFunctionsLines
packages/fdc3-agent-proxy/src/DesktopAgentProxy.ts 100% 100% 100% 100%
packages/fdc3-agent-proxy/src/channels/DefaultChannelSupport.ts 98.94% 93.1% 100% 98.9%
packages/fdc3-agent-proxy/src/listeners/DefaultContextListener.ts 100% 100% 100% 100%
packages/fdc3-agent-proxy/src/listeners/DesktopAgentEventListener.ts 90.47% 85.71% 100% 90.47%
packages/fdc3-standard/src/api/Channel.ts 100% 100% 100% 100%
packages/fdc3-standard/src/api/Errors.ts 100% 100% 100% 100%
packages/fdc3-standard/src/api/Events.ts 100% 100% 100% 100%
toolbox/fdc3-for-web/fdc3-web-impl/src/handlers/BroadcastHandler.ts 96.19% 86.17% 98.21% 95.95%
toolbox/fdc3-for-web/fdc3-web-impl/src/handlers/IntentHandler.ts 97.36% 90.47% 100% 96.98%
toolbox/fdc3-for-web/fdc3-web-impl/src/handlers/support.ts 100% 100% 100% 100%
Details (all files)
FileStatementsBranchesFunctionsLines
packages/fdc3-agent-proxy/src/DesktopAgentProxy.ts 100% 100% 100% 100%
packages/fdc3-agent-proxy/src/index.ts 100% 100% 62.5% 100%
packages/fdc3-agent-proxy/src/apps/DefaultAppSupport.ts 88% 50% 100% 88%
packages/fdc3-agent-proxy/src/channels/DefaultChannel.ts 78.94% 77.77% 71.42% 78.94%
packages/fdc3-agent-proxy/src/channels/DefaultChannelSupport.ts 98.94% 93.1% 100% 98.9%
packages/fdc3-agent-proxy/src/channels/DefaultPrivateChannel.ts 97.5% 66.66% 100% 97.5%
packages/fdc3-agent-proxy/src/heartbeat/DefaultHeartbeatSupport.ts 100% 100% 100% 100%
packages/fdc3-agent-proxy/src/intents/DefaultIntentResolution.ts 100% 100% 100% 100%
packages/fdc3-agent-proxy/src/intents/DefaultIntentSupport.ts 100% 100% 100% 100%
packages/fdc3-agent-proxy/src/listeners/AbstractListener.ts 100% 60% 100% 100%
packages/fdc3-agent-proxy/src/listeners/DefaultContextListener.ts 100% 100% 100% 100%
packages/fdc3-agent-proxy/src/listeners/DefaultIntentListener.ts 100% 77.77% 100% 100%
packages/fdc3-agent-proxy/src/listeners/DesktopAgentEventListener.ts 90.47% 85.71% 100% 90.47%
packages/fdc3-agent-proxy/src/listeners/EventListener.ts 10% 0% 0% 10%
packages/fdc3-agent-proxy/src/listeners/HeartbeatListener.ts 100% 100% 100% 100%
packages/fdc3-agent-proxy/src/listeners/PrivateChannelEventListener.ts 93.33% 72.72% 100% 93.33%
packages/fdc3-agent-proxy/src/messaging/AbstractMessaging.ts 94.59% 100% 80% 94.59%
packages/fdc3-agent-proxy/src/util/AbstractFDC3Logger.ts 100% 94.11% 100% 100%
packages/fdc3-agent-proxy/src/util/Logger.ts 100% 100% 100% 100%
packages/fdc3-agent-proxy/src/util/throwIfUndefined.ts 100% 100% 100% 100%
packages/fdc3-get-agent/src/index.ts 100% 100% 28.57% 100%
packages/fdc3-get-agent/src/messaging/MessagePortMessaging.ts 100% 100% 100% 100%
packages/fdc3-get-agent/src/messaging/message-port.ts 97.43% 86.66% 100% 97.43%
packages/fdc3-get-agent/src/sessionStorage/DesktopAgentDetails.ts 97.36% 89.47% 100% 97.36%
packages/fdc3-get-agent/src/strategies/DesktopAgentPreloadLoader.ts 100% 77.77% 100% 100%
packages/fdc3-get-agent/src/strategies/FailoverHandler.ts 100% 76.47% 100% 100%
packages/fdc3-get-agent/src/strategies/HelloHandler.ts 94% 81.25% 100% 94%
packages/fdc3-get-agent/src/strategies/IdentityValidationHandler.ts 95.65% 73.33% 100% 95.65%
packages/fdc3-get-agent/src/strategies/PostMessageLoader.ts 98.48% 86.95% 100% 98.46%
packages/fdc3-get-agent/src/strategies/Timeouts.ts 100% 100% 100% 100%
packages/fdc3-get-agent/src/strategies/getAgent.ts 100% 100% 100% 100%
packages/fdc3-get-agent/src/ui/AbstractUIComponent.ts 97.14% 71.42% 100% 97.01%
packages/fdc3-get-agent/src/ui/DefaultDesktopAgentChannelSelector.ts 100% 75% 100% 100%
packages/fdc3-get-agent/src/ui/DefaultDesktopAgentIntentResolver.ts 100% 90% 100% 100%
packages/fdc3-get-agent/src/ui/NullChannelSelector.ts 100% 100% 100% 100%
packages/fdc3-get-agent/src/ui/NullIntentResolver.ts 100% 100% 66.66% 100%
packages/fdc3-get-agent/src/util/Logger.ts 100% 100% 100% 100%
packages/fdc3-get-agent/src/util/Uuid.ts 100% 100% 100% 100%
packages/fdc3-standard/src/index.ts 91.3% 70.83% 60% 95%
packages/fdc3-standard/src/api/AppIdentifier.ts 100% 100% 100% 100%
packages/fdc3-standard/src/api/AppIntent.ts 100% 100% 100% 100%
packages/fdc3-standard/src/api/AppMetadata.ts 100% 100% 100% 100%
packages/fdc3-standard/src/api/Channel.ts 100% 100% 100% 100%
packages/fdc3-standard/src/api/ContextMetadata.ts 100% 100% 100% 100%
packages/fdc3-standard/src/api/DesktopAgent.ts 100% 100% 100% 100%
packages/fdc3-standard/src/api/DisplayMetadata.ts 100% 100% 100% 100%
packages/fdc3-standard/src/api/Errors.ts 100% 100% 100% 100%
packages/fdc3-standard/src/api/Events.ts 100% 100% 100% 100%
packages/fdc3-standard/src/api/GetAgent.ts 100% 100% 100% 100%
packages/fdc3-standard/src/api/Icon.ts 100% 100% 100% 100%
packages/fdc3-standard/src/api/Image.ts 100% 100% 100% 100%
packages/fdc3-standard/src/api/ImplementationMetadata.ts 100% 100% 100% 100%
packages/fdc3-standard/src/api/IntentMetadata.ts 100% 100% 100% 100%
packages/fdc3-standard/src/api/IntentResolution.ts 100% 100% 100% 100%
packages/fdc3-standard/src/api/Listener.ts 100% 100% 100% 100%
packages/fdc3-standard/src/api/Methods.ts 94.18% 84.28% 96.29% 95.23%
packages/fdc3-standard/src/api/PrivateChannel.ts 100% 100% 100% 100%
packages/fdc3-standard/src/api/RecommendedChannels.ts 100% 100% 100% 100%
packages/fdc3-standard/src/api/Types.ts 100% 100% 100% 100%
packages/fdc3-standard/src/context/ContextType.ts 100% 100% 100% 100%
packages/fdc3-standard/src/intents/Intents.ts 100% 100% 100% 100%
packages/fdc3-standard/src/internal/contextConfiguration.ts 100% 100% 100% 100%
packages/fdc3-standard/src/internal/intentConfiguration.ts 100% 100% 100% 100%
packages/fdc3-standard/src/internal/typeHelpers.ts 100% 100% 100% 100%
packages/fdc3-standard/src/ui/ChannelSelector.ts 100% 100% 100% 100%
packages/fdc3-standard/src/ui/Connectable.ts 100% 100% 100% 100%
packages/fdc3-standard/src/ui/IntentResolver.ts 100% 100% 100% 100%
toolbox/fdc3-for-web/fdc3-web-impl/src/BasicFDC3Server.ts 100% 100% 100% 100%
toolbox/fdc3-for-web/fdc3-web-impl/src/ServerContext.ts 100% 100% 100% 100%
toolbox/fdc3-for-web/fdc3-web-impl/src/directory/BasicDirectory.ts 96.87% 84.21% 100% 96.55%
toolbox/fdc3-for-web/fdc3-web-impl/src/handlers/BroadcastHandler.ts 96.19% 86.17% 98.21% 95.95%
toolbox/fdc3-for-web/fdc3-web-impl/src/handlers/HeartbeatHandler.ts 88.23% 71.87% 86.66% 90%
toolbox/fdc3-for-web/fdc3-web-impl/src/handlers/IntentHandler.ts 97.36% 90.47% 100% 96.98%
toolbox/fdc3-for-web/fdc3-web-impl/src/handlers/OpenHandler.ts 97.14% 86.84% 100% 97.14%
toolbox/fdc3-for-web/fdc3-web-impl/src/handlers/support.ts 100% 100% 100% 100%

@robmoffat
Copy link
Copy Markdown
Member Author

@kriswest and @Roaders I've just fixed the build here - lots of linting issues. Conformance tests are all passing for the demo DA. I'm away for the next couple of weeks - it would be good if you could pick this up now and try to get it merged with the other maintainers if possible.

thanks!

@robmoffat
Copy link
Copy Markdown
Member Author

I'll leave you to figure out what to do about husky / pre-commit checks.

@julianna-ciq
Copy link
Copy Markdown
Contributor

I have forwarded this PR to our engineers. I'll follow up with you when I have new information, @robmoffat .

@Roaders
Copy link
Copy Markdown
Contributor

Roaders commented May 26, 2025

I had a go at running this against our implementation and it did seem to correctly run the tests up to a point. As last time we tried running we got to a certain point and then the tests stopped running. For this test run it got to 93% and got no further. The last test to run was:

"after each" hook: afterEach for "(2.0-ACBasicUsage1) Should receive context when app a adds a listener and app B broadcasts to the same app channel"

However I also tried to run against the reference implementation and I got lots of failures and an imncomplete test there as well:

image

I got quite a few:

Error: App didn't return close context within .5 secs

but also other timeouts of 5000ms, 20000ms and various assertion errors and AppTimeout. I don't think that there is a report that I can copy and paste to show all the results.

@robmoffat
Copy link
Copy Markdown
Member Author

robmoffat commented May 27, 2025 via email

@robmoffat robmoffat mentioned this pull request Jun 2, 2025
@robmoffat robmoffat mentioned this pull request Jun 2, 2025
@Roaders
Copy link
Copy Markdown
Contributor

Roaders commented Jun 4, 2025

this is a long shot, but is popup blocking turned off?

Well this is embarrasing.... Yes that was the problem. I'd been checking the conformance test window for the popup blocked but of course that appears in the DA window. When I fixed that all the tests ran and passed.

image

I did get to 143% though!!! 🙂

@github-actions
Copy link
Copy Markdown

554 passed

2 similar comments
@github-actions
Copy link
Copy Markdown

554 passed

@github-actions
Copy link
Copy Markdown

554 passed

@robmoffat
Copy link
Copy Markdown
Member Author

Ok, a couple of things for you to look at @kriswest .

Also we need to merge in #1726 before we merge this one.

@kriswest
Copy link
Copy Markdown
Contributor

Also we need to merge in #1726 before we merge this one.

@robmoffat how do you feel about merging this before #1726? I've got a further set of changes to apply to #1726 where I've removed every 2.0 etc. (not just from the names, but filenames, test names etc.) to align fully with the 'just maintain the conformance tests against the current version and use tags for older versions' plan. It touches a lot of files and it might be easiest to make sure this tests up, then get the renaming PR in next?

* channel.
*/
newChannelId: null | string;
currentChannelId?: null | string;
Copy link
Copy Markdown
Contributor

@kriswest kriswest Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@robmoffat this is probably the thing that broke the typescript build - quicktype is making the two possible fields both optional because it can't express in TypeScript that one or other must be set (as JSONSchema can). Will need handling in the code

Comment thread packages/fdc3-standard/src/api/Events.ts
Comment thread CHANGELOG.md Outdated
Comment thread CHANGELOG.md Outdated
Copy link
Copy Markdown
Contributor

@kriswest kriswest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super close to done. I'm still nit-picking the changelogs and the FDC3Event type needs its type field back (it being string was likely my mistake/brainfart, sorry).

I'll spend a few mins trying to run this against the reference implementation now.

@kriswest
Copy link
Copy Markdown
Contributor

The reference implementation (demo) is passing the automated tests:

image

Would love to know why its so bad at that % complete calculation

@kriswest
Copy link
Copy Markdown
Contributor

Also passed all the manual tests - however, the channel changed one is not ideal:
image

As the comment about what to do only displays after the test is complete! However, its easy enough to live with for now as you fail it, get the instruction and do it again.

@kriswest
Copy link
Copy Markdown
Contributor

Its the Channels tests that are throwing the progress % off - if you run them separately progress isn't counted. There are 25 channel tests (of 84 total) and 25 / (84-25) = 43% (which is why it counts to 143%). Now to figure how to fix it...

…test suites are assembled

The channel tests were being assembled asynchronously, but not being awaited properly leading to their assembly happening after the runner had started, causing it to miscalculate the progress %
@kriswest
Copy link
Copy Markdown
Contributor

@robmoffat got the fix for the progress reporting on #1748 which you can merge into this. Fix the changelog and the FDC3Event type and I think this is ready to merge (and we can do the rename PR afterwards)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 3, 2026

554 passed

1 similar comment
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 3, 2026

554 passed

@robmoffat
Copy link
Copy Markdown
Member Author

Still looking good after your PR @kriswest

Screenshot 2026-02-03 at 13 31 42

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 3, 2026

554 passed

@robmoffat
Copy link
Copy Markdown
Member Author

over to you @kriswest

Copy link
Copy Markdown
Contributor

@kriswest kriswest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to restore the section heading in the changelog, otherwise I'm ready to approve and merge @robmoffat. I'll raise an issue for checking the returned FDC3 version number.

const getAgent2_2 = (fdc3: DesktopAgent, documentation: string) => {
it('(GetAgentAPI) Method is callable', async () => {
const info = await fdc3.getInfo();
assert.isTrue(info.fdc3Version.startsWith('2.'), documentation);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still think we should check specific version (you need to report the matching version number of the test set and to use the test set for the right version...). We can pick up the version number from the fdc3-standard - but we can pick that up in a subsequent PR.

Comment thread CHANGELOG.md
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 4, 2026

554 passed

Copy link
Copy Markdown
Contributor

@kriswest kriswest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kriswest kriswest merged commit f8c4493 into main Feb 4, 2026
8 checks passed
@kriswest kriswest deleted the fdc3-new-conformance-2.2 branch February 4, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conformance Conformance testing framework FDC3 for Web Browsers needs backport PRs with this label need to be back ported into a past release, in addition to merging to main

Projects

None yet

8 participants