You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: toolbox/fdc3-conformance/src/test/advanced/fdc3.context-metadata.ts
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ export default async () => {
36
36
// --- User Channel Tests ---
37
37
38
38
constucMetadataBroadcast=
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';
40
40
it(ucMetadataBroadcast,async()=>{
41
41
consterrorMessage=`\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}`;
42
42
@@ -74,7 +74,7 @@ export default async () => {
74
74
});
75
75
76
76
constucMetadataTraceId=
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';
78
78
it(ucMetadataTraceId,async()=>{
79
79
consterrorMessage=`\r\nSteps:\r\n- App A adds listener\r\n- App B broadcasts with traceId metadata${documentation}`;
80
80
@@ -113,7 +113,7 @@ export default async () => {
113
113
});
114
114
115
115
constucMetadataSignatureCustom=
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';
117
117
it(ucMetadataSignatureCustom,async()=>{
118
118
consterrorMessage=`\r\nSteps:\r\n- App A adds listener\r\n- App B broadcasts with signature and custom metadata${documentation}`;
119
119
@@ -155,7 +155,7 @@ export default async () => {
155
155
// --- App Channel Tests ---
156
156
157
157
constacMetadataBroadcast=
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';
159
159
it(acMetadataBroadcast,async()=>{
160
160
consterrorMessage=`\r\nSteps:\r\n- App A gets app channel and adds listener\r\n- App B gets same channel and broadcasts${documentation}`;
161
161
@@ -192,7 +192,7 @@ export default async () => {
192
192
// --- getCurrentContextWithMetadata Tests ---
193
193
194
194
constacGetCurrentContextWithMetadata=
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';
196
196
it(acGetCurrentContextWithMetadata,async()=>{
197
197
consterrorMessage=`\r\nSteps:\r\n- App B broadcasts to app channel\r\n- App A calls getCurrentContextWithMetadata${documentation}`;
198
198
@@ -215,7 +215,7 @@ export default async () => {
215
215
});
216
216
217
217
constacGetCurrentContextWithMetadataNull=
218
-
'(3.0-ACGetCurrentContextWithMetadataNull) getCurrentContextWithMetadata should return null on an empty channel';
218
+
'(ACGetCurrentContextWithMetadataNull) getCurrentContextWithMetadata should return null on an empty channel';
Copy file name to clipboardExpand all lines: website/docs/api/conformance/App-Channel-Tests.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ hide_title: true
18
18
| B | 4. Broadcast | Broadcast an `fdc3.instrument` Context to the channel with: <br />`testChannel.broadcast(<fdc3.instrument>)`|
19
19
| 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. |
| A | 3. Retrieve `Channel`|Retrieve a `Channel` object representing the same 'App' channel B did (`test-channel`)|
30
30
| 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 |
31
31
32
-
-`ACBasicUsage2` Perform above test
32
+
-`ACBasicUsage2`Perform above test
33
33
34
34
## Filtered Context
35
35
@@ -41,11 +41,11 @@ hide_title: true
41
41
| 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>)`|
42
42
| 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. |
43
43
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.
-`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.
49
49
50
50
### App Channel History
51
51
@@ -57,9 +57,9 @@ hide_title: true
57
57
| 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). |
58
58
| 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|
59
59
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_.
-`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_.
| 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. |
74
74
75
-
-`ACBasicUsage1-Destructured` Perform above test to verify destructured methods work correctly.
75
+
-`ACBasicUsage1-Destructured`Perform above test to verify destructured methods work correctly.
76
76
77
77
## Current Context - Destructured
78
78
@@ -83,7 +83,7 @@ hide_title: true
83
83
| A | 3. Retrieve `Channel`|Retrieve a `Channel` object representing the same 'App' channel B did (`test-channel`)|
84
84
| 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 |
85
85
86
-
-`ACBasicUsage2-Destructured` Perform above test to verify destructured getCurrentContext works correctly.
86
+
-`ACBasicUsage2-Destructured`Perform above test to verify destructured getCurrentContext works correctly.
87
87
88
88
## Clearing Context
89
89
@@ -98,8 +98,8 @@ hide_title: true
98
98
| B | 7. Clear Context | B clears context using `testChannel.clearContext()`|
99
99
| A | 8. Received Event | A receives event added in step 6 |
100
100
101
-
-`ACClearContext1`: Perform above test.
102
-
-`ACClearContext2`: Perform above test, but add specific type of the context type to the `testChannel.clearContext()`.
-`ACClearContext2`: Perform above test, but add specific type of the context type to the `testChannel.clearContext()`.
103
103
104
104
105
105
## Multiple listeners On The Same Or Overlapping Context types
Copy file name to clipboardExpand all lines: website/docs/api/conformance/Basic-Tests.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,13 +24,13 @@ _These are some basic sanity tests implemented in the FDC3 Conformance Framework
24
24
25
25
## Basic API Usage
26
26
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`: 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:
31
31
-`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`: 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.
0 commit comments