Skip to content

Commit 8b6c7ad

Browse files
committed
Clean-up conformance test IDs and ensure labelling with version of FDC3 where introduced
1 parent 5673560 commit 8b6c7ad

8 files changed

Lines changed: 115 additions & 115 deletions

File tree

toolbox/fdc3-conformance/src/test/advanced/fdc3.context-metadata.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default async () => {
3636
// --- User Channel Tests ---
3737

3838
const ucMetadataBroadcast =
39-
'(3.0-UCContextMetadataOnBroadcast) Should receive ContextMetadata with source and timestamp when context is broadcast on a user channel';
39+
'(UCContextMetadataOnBroadcast) Should receive ContextMetadata with source and timestamp when context is broadcast on a user channel';
4040
it(ucMetadataBroadcast, async () => {
4141
const errorMessage = `\r\nSteps:\r\n- App A adds fdc3.instrument context listener\r\n- App A joins channel\r\n- App B joins channel and broadcasts fdc3.instrument${documentation}`;
4242

@@ -74,7 +74,7 @@ export default async () => {
7474
});
7575

7676
const ucMetadataTraceId =
77-
'(3.0-UCContextMetadataTraceId) Should receive app-provided traceId in ContextMetadata on user channel broadcast';
77+
'(UCContextMetadataTraceId) Should receive app-provided traceId in ContextMetadata on user channel broadcast';
7878
it(ucMetadataTraceId, async () => {
7979
const errorMessage = `\r\nSteps:\r\n- App A adds listener\r\n- App B broadcasts with traceId metadata${documentation}`;
8080

@@ -113,7 +113,7 @@ export default async () => {
113113
});
114114

115115
const ucMetadataSignatureCustom =
116-
'(3.0-UCContextMetadataSignatureCustom) Should receive app-provided signature and custom fields in ContextMetadata on user channel broadcast';
116+
'(UCContextMetadataSignatureCustom) Should receive app-provided signature and custom fields in ContextMetadata on user channel broadcast';
117117
it(ucMetadataSignatureCustom, async () => {
118118
const errorMessage = `\r\nSteps:\r\n- App A adds listener\r\n- App B broadcasts with signature and custom metadata${documentation}`;
119119

@@ -155,7 +155,7 @@ export default async () => {
155155
// --- App Channel Tests ---
156156

157157
const acMetadataBroadcast =
158-
'(3.0-ACContextMetadataOnBroadcast) Should receive ContextMetadata with source and timestamp when context is broadcast on an app channel';
158+
'(ACContextMetadataOnBroadcast) Should receive ContextMetadata with source and timestamp when context is broadcast on an app channel';
159159
it(acMetadataBroadcast, async () => {
160160
const errorMessage = `\r\nSteps:\r\n- App A gets app channel and adds listener\r\n- App B gets same channel and broadcasts${documentation}`;
161161

@@ -192,7 +192,7 @@ export default async () => {
192192
// --- getCurrentContextWithMetadata Tests ---
193193

194194
const acGetCurrentContextWithMetadata =
195-
'(3.0-ACGetCurrentContextWithMetadata) getCurrentContextWithMetadata should return context and metadata from an app channel';
195+
'(ACGetCurrentContextWithMetadata) getCurrentContextWithMetadata should return context and metadata from an app channel';
196196
it(acGetCurrentContextWithMetadata, async () => {
197197
const errorMessage = `\r\nSteps:\r\n- App B broadcasts to app channel\r\n- App A calls getCurrentContextWithMetadata${documentation}`;
198198

@@ -215,7 +215,7 @@ export default async () => {
215215
});
216216

217217
const acGetCurrentContextWithMetadataNull =
218-
'(3.0-ACGetCurrentContextWithMetadataNull) getCurrentContextWithMetadata should return null on an empty channel';
218+
'(ACGetCurrentContextWithMetadataNull) getCurrentContextWithMetadata should return null on an empty channel';
219219
it(acGetCurrentContextWithMetadataNull, async () => {
220220
const testChannel = await fdc3.getOrCreateChannel('test-channel-empty-' + cc.getRandomId());
221221
const result: ContextWithMetadata | null = await testChannel.getCurrentContextWithMetadata('fdc3.instrument');

toolbox/fdc3-conformance/src/test/advanced/fdc3.intent-context-metadata.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default async () => {
1616
});
1717

1818
const intentMetadata =
19-
'(3.0-IntentContextMetadata) Should receive ContextMetadata with source and timestamp when an intent is raised';
19+
'(IntentContextMetadata) Should receive ContextMetadata with source and timestamp when an intent is raised';
2020
it(intentMetadata, async function () {
2121
this.timeout(constants.TestTimeout);
2222

@@ -46,7 +46,7 @@ export default async () => {
4646
});
4747

4848
const intentMetadataWithAppMeta =
49-
'(3.0-IntentContextMetadataWithAppMetadata) Should forward app-provided traceId, signature and custom in ContextMetadata on raised intent';
49+
'(IntentContextMetadataWithAppMetadata) Should forward app-provided traceId, signature and custom in ContextMetadata on raised intent';
5050
it(intentMetadataWithAppMeta, async function () {
5151
this.timeout(constants.TestTimeout);
5252

website/docs/api/conformance/App-Channel-Tests.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ hide_title: true
1818
| B | 4. Broadcast | Broadcast an `fdc3.instrument` Context to the channel with: <br />`testChannel.broadcast(<fdc3.instrument>)`|
1919
| A | 5. Receive Context | The handler added in step 2 will receive the instrument context. Ensure that the instrument received by A is identical to that sent by B. |
2020

21-
- `ACBasicUsage1` Perform above test.
21+
- `ACBasicUsage1` ![2.0+](https://img.shields.io/badge/FDC3-2.0+-blue) Perform above test.
2222

2323
## Current Context
2424

@@ -29,7 +29,7 @@ hide_title: true
2929
| A | 3. Retrieve `Channel` |Retrieve a `Channel` object representing the same 'App' channel B did (`test-channel`)|
3030
| A | 4. Retrieve Current Context | A gets the _current context_ of the user channel. via: `await testChannel.getCurrentContext()` <br />Ensure that the instrument received by A is identical to that sent by B |
3131

32-
- `ACBasicUsage2` Perform above test
32+
- `ACBasicUsage2` ![2.0+](https://img.shields.io/badge/FDC3-2.0+-blue) Perform above test
3333

3434
## Filtered Context
3535

@@ -41,11 +41,11 @@ hide_title: true
4141
| B | 4. Broadcast | B broadcasts both an `fdc3.instrument` context and an `fdc3.contact` context, using: <br /> `testChannel.broadcast(<fdc3.instrument>)` <br /> `testChannel.broadcast(<fdc3.contact>)`|
4242
| A | 5. Receive Context | An fdc3.instrument context is received by the handler added in step 2.<br />Ensure that the fdc3.instrument received by A is identical to that sent by B<br />Ensure that the fdc3.contact context is NOT received. |
4343

44-
- `ACFilteredContext1`: Perform above test.
45-
- `ACFilteredContext2`: Perform above test, but add listeners for both `fdc3.instrument` and `fdc3.contact` in step2. Ensure that both context objects are received.
46-
- `ACFilteredContext3`: Perform above test, except creating a _different_ channel in app B. Check that you _don't_ receive anything (as the channels don't match).
47-
- `ACFilteredContext4`: Perform above test, except that after creating the channel **A** creates another channel with a further _different_ channel id and adds a further context listener to it. Ensure that **A** is still able to receive context on the first channel (i.e. it is unaffected by the additional channel) and does NOT receive anything on the second channel.
48-
- `ACUnsubscribe`: Perform above test, except that after creating the channel **A** then `unsubscribe()`s the listener it added to the channel. Check that **A** does NOT receive anything.
44+
- `ACFilteredContext1` ![2.0+](https://img.shields.io/badge/FDC3-2.0+-blue): Perform above test.
45+
- `ACFilteredContext2` ![2.0+](https://img.shields.io/badge/FDC3-2.0+-blue): Perform above test, but add listeners for both `fdc3.instrument` and `fdc3.contact` in step2. Ensure that both context objects are received.
46+
- `ACFilteredContext3` ![2.0+](https://img.shields.io/badge/FDC3-2.0+-blue): Perform above test, except creating a _different_ channel in app B. Check that you _don't_ receive anything (as the channels don't match).
47+
- `ACFilteredContext4` ![2.0+](https://img.shields.io/badge/FDC3-2.0+-blue): Perform above test, except that after creating the channel **A** creates another channel with a further _different_ channel id and adds a further context listener to it. Ensure that **A** is still able to receive context on the first channel (i.e. it is unaffected by the additional channel) and does NOT receive anything on the second channel.
48+
- `ACUnsubscribe` ![2.0+](https://img.shields.io/badge/FDC3-2.0+-blue): Perform above test, except that after creating the channel **A** then `unsubscribe()`s the listener it added to the channel. Check that **A** does NOT receive anything.
4949

5050
### App Channel History
5151

@@ -57,9 +57,9 @@ hide_title: true
5757
| A | 4. Add Context Listener | A adds a context listener to the channel _after_ B has completed all its broadcasts, via: <br />`await testChannel.addContextListener("fdc3.instrument", handler)` <br /> Ensure that A does NOT receive any context via these listeners (past context is only retrieved via a `getCurrentContext()` call on App channels). |
5858
| A | 5. Retrieve Current Context | A is able to retrieve the most recent context of each context type from the `Channel` via: <br />`const instrument = await testChannel.getCurrentContext("fdc3.instrument")`<br />`const contact = await testChannel.getCurrentContext("fdc3.contact")`<br />Ensure that both contexts retrieved by A are identical to those sent by B|
5959

60-
- `ACContextHistoryTyped`: Perform above test.
61-
- `ACContextHistoryMultiple`: **B** Broadcasts multiple history items of both types. Ensure that only the last version of each type is received by **A**.
62-
- `ACContextHistoryLast`: In step 5. **A** retrieves the _untyped_ current context of the channel via `const currentContext = await testChannel.getCurrentContext()`. Ensure that A receives only the very last broadcast context item _of any type_.
60+
- `ACContextHistoryTyped` ![2.0+](https://img.shields.io/badge/FDC3-2.0+-blue): Perform above test.
61+
- `ACContextHistoryMultiple` ![2.0+](https://img.shields.io/badge/FDC3-2.0+-blue): **B** Broadcasts multiple history items of both types. Ensure that only the last version of each type is received by **A**.
62+
- `ACContextHistoryLast` ![2.0+](https://img.shields.io/badge/FDC3-2.0+-blue): In step 5. **A** retrieves the _untyped_ current context of the channel via `const currentContext = await testChannel.getCurrentContext()`. Ensure that A receives only the very last broadcast context item _of any type_.
6363

6464
## Basic Broadcast - Destructured
6565

@@ -72,7 +72,7 @@ hide_title: true
7272
| B | 5. Destructure & Broadcast | Destructure broadcast method and broadcast context: <br />`const { broadcast } = testChannel`<br />`broadcast(<fdc3.instrument>)`|
7373
| A | 6. Receive Context | The handler added in step 3 will receive the instrument context. Ensure that the instrument received by A is identical to that sent by B. |
7474

75-
- `ACBasicUsage1-Destructured` Perform above test to verify destructured methods work correctly.
75+
- `ACBasicUsage1-Destructured` ![2.0+](https://img.shields.io/badge/FDC3-2.0+-blue) Perform above test to verify destructured methods work correctly.
7676

7777
## Current Context - Destructured
7878

@@ -83,7 +83,7 @@ hide_title: true
8383
| A | 3. Retrieve `Channel` |Retrieve a `Channel` object representing the same 'App' channel B did (`test-channel`)|
8484
| A | 4. Destructured & Get Context | Destructure getCurrentContext and retrieve context: <br />`const { getCurrentContext } = testChannel`<br />`await getCurrentContext()` <br />Ensure that the instrument received by A is identical to that sent by B |
8585

86-
- `ACBasicUsage2-Destructured` Perform above test to verify destructured getCurrentContext works correctly.
86+
- `ACBasicUsage2-Destructured` ![2.0+](https://img.shields.io/badge/FDC3-2.0+-blue) Perform above test to verify destructured getCurrentContext works correctly.
8787

8888
## Clearing Context
8989

@@ -98,8 +98,8 @@ hide_title: true
9898
| B | 7. Clear Context | B clears context using `testChannel.clearContext()`|
9999
| A | 8. Received Event | A receives event added in step 6 |
100100

101-
- `ACClearContext1`: Perform above test.
102-
- `ACClearContext2`: Perform above test, but add specific type of the context type to the `testChannel.clearContext()`.
101+
- `ACClearContext1` ![3.0+](https://img.shields.io/badge/FDC3-3.0+-purple): Perform above test.
102+
- `ACClearContext2` ![3.0+](https://img.shields.io/badge/FDC3-3.0+-purple): Perform above test, but add specific type of the context type to the `testChannel.clearContext()`.
103103

104104

105105
## Multiple listeners On The Same Or Overlapping Context types

website/docs/api/conformance/Basic-Tests.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ _These are some basic sanity tests implemented in the FDC3 Conformance Framework
2424

2525
## Basic API Usage
2626

27-
- `BasicCL1`: 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.
28-
- `BasicCL2`: 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.
29-
- `BasicIL1`: 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.
30-
- `BasicGI1`: 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:
27+
- `BasicCL1` ![2.0+](https://img.shields.io/badge/FDC3-2.0+-blue): 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.
28+
- `BasicCL2` ![2.0+](https://img.shields.io/badge/FDC3-2.0+-blue): 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.
29+
- `BasicIL1` ![2.0+](https://img.shields.io/badge/FDC3-2.0+-blue): 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.
30+
- `BasicGI1` ![2.0+](https://img.shields.io/badge/FDC3-2.0+-blue): 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:
3131
- `await fdc3.getInfo()`. The FDC3 version should match the API version being tested for conformance.
32-
- `BasicAC1`: A named 'App' channel can be retrieved by calling `fdc3.getOrCreateChannel(<name>)`. The `Channel` object returned conforms to the defined interface.
33-
- `BasicUC1`: 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()`.
34-
- `BasicJC1`: A user/system channel can be joined with the with the channel's id by calling `fdc3.joinUserChannel(<channelId>)`. Having done so, the current channel, retrieved by calling `fdc3.getCurrentChannel()` should NOT be null and should match _the channel id given_. After leaving the current channel by calling `fdc3.leaveCurrentChannel()`, it should go back to being `null`.
35-
- `BasicRI1`: A specified intent can be raised by invoking `fdc3.raiseIntent(<intent name>, <context>)`. A promise should be returned.
36-
- `BasicRI2`: An intent can be raised for some item of context by invoking: `fdc3.raiseIntentForContext(<context>)`. A promise should be returned.
32+
- `BasicAC1` ![2.0+](https://img.shields.io/badge/FDC3-2.0+-blue): A named 'App' channel can be retrieved by calling `fdc3.getOrCreateChannel(<name>)`. The `Channel` object returned conforms to the defined interface.
33+
- `BasicUC1` ![2.0+](https://img.shields.io/badge/FDC3-2.0+-blue): 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()`.
34+
- `BasicJC1` ![2.0+](https://img.shields.io/badge/FDC3-2.0+-blue): A user/system channel can be joined with the with the channel's id by calling `fdc3.joinUserChannel(<channelId>)`. Having done so, the current channel, retrieved by calling `fdc3.getCurrentChannel()` should NOT be null and should match _the channel id given_. After leaving the current channel by calling `fdc3.leaveCurrentChannel()`, it should go back to being `null`.
35+
- `BasicRI1` ![2.0+](https://img.shields.io/badge/FDC3-2.0+-blue): A specified intent can be raised by invoking `fdc3.raiseIntent(<intent name>, <context>)`. A promise should be returned.
36+
- `BasicRI2` ![2.0+](https://img.shields.io/badge/FDC3-2.0+-blue): An intent can be raised for some item of context by invoking: `fdc3.raiseIntentForContext(<context>)`. A promise should be returned.

0 commit comments

Comments
 (0)