FDC3 icon indicating copy to clipboard operation
FDC3 copied to clipboard

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

Open robmoffat opened this issue 7 months ago • 16 comments

Added two new conformance tests and got FDC3 Demo to pass the new manual test. Raised #1585

robmoffat avatar Apr 25 '25 16:04 robmoffat

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.

Roaders avatar Apr 28 '25 10:04 Roaders

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

kriswest avatar Apr 28 '25 10:04 kriswest

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?

robmoffat avatar May 01 '25 11:05 robmoffat

506 passed

github-actions[bot] avatar May 07 '25 13:05 github-actions[bot]

Coverage Report

Commit: ff93907 Base: main@1300f2b

Type Base This PR
Total Statements Coverage  97.16%  96.57% (-0.59%)
Total Branches Coverage  86%  85.71% (-0.29%)
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.9% 83.33% 100% 90.9%
packages/fdc3-standard/src/api/Channel.ts 100% 100% 100% 100%
packages/fdc3-standard/src/api/Errors.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.9% 83.33% 100% 90.9%
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%

github-actions[bot] avatar May 07 '25 13:05 github-actions[bot]

@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 avatar May 07 '25 13:05 robmoffat

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

robmoffat avatar May 07 '25 13:05 robmoffat

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

julianna-ciq avatar May 07 '25 16:05 julianna-ciq

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.

Roaders avatar May 26 '25 08:05 Roaders

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

On Mon, May 26, 2025 at 9:21 AM Roaders @.***> wrote:

Roaders left a comment (finos/FDC3#1586) https://github.com/finos/FDC3/pull/1586#issuecomment-2908935055

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.png (view on web) https://github.com/user-attachments/assets/58e6b5ab-5f40-4114-a8d1-ea67f979e444

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.

— Reply to this email directly, view it on GitHub https://github.com/finos/FDC3/pull/1586#issuecomment-2908935055, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEK2YKPK47IFF2KBLBMBED3ALFKNAVCNFSM6AAAAAB34AX34GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSMBYHEZTKMBVGU . You are receiving this because you were mentioned.Message ID: @.***>

robmoffat avatar May 27 '25 15:05 robmoffat

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!!! 🙂

Roaders avatar Jun 04 '25 07:06 Roaders

wow a clean sweep, well done!

And yes, I've spent quite a while scratching my head over the percentage. I have no idea why this is happening!

Are we publishing this result / badging at OSFF???

robmoffat avatar Jun 04 '25 09:06 robmoffat

Screenshot 2025-06-04 at 12 47 12

Sail is now passing

robmoffat avatar Jun 04 '25 11:06 robmoffat

And yes, I've spent quite a while scratching my head over the percentage. I have no idea why this is happening!

Have you ended up with multiple tests with the same id/name?

kriswest avatar Jun 04 '25 12:06 kriswest

506 passed

github-actions[bot] avatar Jun 04 '25 13:06 github-actions[bot]

506 passed

github-actions[bot] avatar Jun 11 '25 14:06 github-actions[bot]

506 passed

github-actions[bot] avatar Jul 24 '25 14:07 github-actions[bot]

506 passed

github-actions[bot] avatar Aug 13 '25 13:08 github-actions[bot]

514 passed

github-actions[bot] avatar Aug 13 '25 13:08 github-actions[bot]

516 passed

github-actions[bot] avatar Aug 13 '25 13:08 github-actions[bot]

516 passed

github-actions[bot] avatar Sep 01 '25 12:09 github-actions[bot]

Deploy Preview for fdc3 ready!

Name Link
Latest commit ff93907807d2e2e77104f014cf68e92e248bf5e0
Latest deploy log https://app.netlify.com/projects/fdc3/deploys/6904ea53a1238600080e4173
Deploy Preview https://deploy-preview-1586.preview-fdc3.finos.org
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar Sep 10 '25 13:09 netlify[bot]

516 passed

github-actions[bot] avatar Sep 10 '25 13:09 github-actions[bot]

merged latest changes from main

robmoffat avatar Oct 31 '25 16:10 robmoffat

554 passed

github-actions[bot] avatar Oct 31 '25 17:10 github-actions[bot]

Running this on our app now it gets stuck at 91% (I have checked for popup blocking prompts). I have a lot of failures but that could well be the current state of our agent or the tests... I am also getting far fewer tests:

image

Roaders avatar Nov 20 '25 16:11 Roaders

@Roaders the tests execute serially so its worth identifying which test it gets stuck in. I don't know why you'd be getting less tests total. @robmoffat what do you get in teh reference implementation or Sail on this branch?

kriswest avatar Nov 20 '25 17:11 kriswest

The reference implemetation:

image

I guess I was thinking that only 51 tests wasn't very many but I forgot that it goes to over 100%!

Roaders avatar Nov 21 '25 08:11 Roaders

Hi I ran this not long ago and it worked for me, although there are known race conditions that cause it to fail sometimes. @Roaders are you running this on a PC? I've observed the race conclude differently there than on the Mac.

In my other PR, you can see I've been messing about with the timings for this very reason:

https://github.com/finos/FDC3/pull/1696/files#diff-c22f660199ac437ce4a57e10356b4739c5ae21c9abd6536f44e854f85b46b378

This is the server-context-refactor PR. Obviously, a key test for me there is that conformance still passes after the refactor!

robmoffat avatar Nov 21 '25 09:11 robmoffat

yes, this on PC

Roaders avatar Nov 21 '25 12:11 Roaders