Skip to content

Commit

Permalink
Fixed display names
Browse files Browse the repository at this point in the history
  • Loading branch information
robmoffat committed May 16, 2024
1 parent 98cbe21 commit c63155a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
10 changes: 5 additions & 5 deletions src/test/v2.0/advanced/fdc3.findIntent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ export default () =>

it("(2.0-FindIntentAppDMultiple1) Should find intent 'sharedTestingIntent2' belonging to multiple apps (intent-a & intent-b)", async () => {
const appIntent = await fdc3.findIntent(Intent.sharedTestingIntent2);
validateAppIntent(appIntent, 6, { name: Intent.sharedTestingIntent2, displayName: "Shared Testing Intent" }, IntentApp.IntentAppD);
validateAppIntent(appIntent, 6, { name: Intent.sharedTestingIntent2, displayName: "Shared Testing Intent 2" }, IntentApp.IntentAppD);
});

it("(IntentAppDMultiple2) Should find intent 'sharedTestingIntent2' belonging to multiple apps (intent-a & intent-b) filtered by specific context 'testContextY'", async () => {
const appIntent = await fdc3.findIntent(Intent.sharedTestingIntent2, { type: ContextType.testContextY });
validateAppIntent(appIntent, 5, { name: Intent.sharedTestingIntent2, displayName: "Shared Testing Intent" }, IntentApp.IntentAppE);
validateAppIntent(appIntent, 5, { name: Intent.sharedTestingIntent2, displayName: "Shared Testing Intent 2" }, IntentApp.IntentAppE);
});

it("(2.0-FindIntentAppDByResultSingle) Should find intent 'cTestingIntent' belonging only to app intent-c with context 'testContextX' and result type 'testContextZ'", async () => {
Expand All @@ -61,17 +61,17 @@ export default () =>

it("(2.0-FindIntentAppDByResultMultiple) Should find intent 'sharedTestingIntent1' belonging only to app intent-b with context 'testContextX' and result type 'testContextY'", async () => {
const appIntent = await fdc3.findIntent(Intent.sharedTestingIntent1, { type: ContextType.testContextX }, ContextType.testContextY);
validateAppIntent(appIntent, 1, { name: Intent.sharedTestingIntent1, displayName: "Shared Testing Intent" }, IntentApp.IntentAppB);
validateAppIntent(appIntent, 1, { name: Intent.sharedTestingIntent1, displayName: "Shared Testing Intent 1" }, IntentApp.IntentAppB);
});

it("(2.0-FindIntentAppDByResultChannel1) Should find intent 'sharedTestingIntent2' belonging only to apps intent-e and itent-f with context 'testContextY' and result type 'channel", async () => {
const appIntent = await fdc3.findIntent(Intent.sharedTestingIntent2, { type: ContextType.testContextY }, "channel");
validateAppIntent(appIntent, 2, { name: Intent.sharedTestingIntent2, displayName: "Shared Testing Intent" }, IntentApp.IntentAppE);
validateAppIntent(appIntent, 2, { name: Intent.sharedTestingIntent2, displayName: "Shared Testing Intent 2" }, IntentApp.IntentAppE);
});

it("(2.0-FindIntentAppDByResultChannel2) Should find intent 'sharedTestingIntent2' belonging only to app intent-c with context 'testContextY' and result type 'channel<testContextZ>'", async () => {
const appIntent = await fdc3.findIntent(Intent.sharedTestingIntent2, { type: ContextType.testContextY }, "channel<testContextZ>");
validateAppIntent(appIntent, 1, { name: Intent.sharedTestingIntent2, displayName: "Shared Testing Intent" }, IntentApp.IntentAppF);
validateAppIntent(appIntent, 1, { name: Intent.sharedTestingIntent2, displayName: "Shared Testing Intent 2" }, IntentApp.IntentAppF);
});
});

Expand Down
17 changes: 8 additions & 9 deletions src/test/v2.0/advanced/fdc3.raiseIntent-Result.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Listener } from "fdc3_2_0";
import { closeMockAppWindow } from "../fdc3-2_0-utils";
import { RaiseIntentControl2_0, IntentResultType, IntentApp, ContextType, Intent, ControlContextType } from "../support/intent-support-2.0";
import { RaiseIntentControl2_0, IntentResultType, IntentApp, ContextType, Intent } from "../support/intent-support-2.0";
import { wait } from "../../../utils";
import constants from "../../../constants";

const control = new RaiseIntentControl2_0();

Expand Down Expand Up @@ -32,7 +31,7 @@ export default () =>
const RaiseIntentVoidResult5secs = "(2.0-RaiseIntentVoidResult5secs) App A receives a void IntentResult after a 5 second delay";
it(RaiseIntentVoidResult5secs, async () => {
errorListener = await control.listenForError();
let receiver = control.receiveContext(ControlContextType.aTestingIntentListenerTriggered, 8000);
const { listenerPromise: receiver } = await control.receiveContext("aTestingIntent-listener-triggered", 8000);
const intentResolution = await control.raiseIntent(Intent.aTestingIntent, ContextType.testContextX, undefined, 5000);
control.validateIntentResolution(IntentApp.IntentAppA, intentResolution);
let intentResultPromise = control.getIntentResult(intentResolution);
Expand All @@ -56,7 +55,7 @@ export default () =>
const RaiseIntentContextResult5secs = "(2.0-RaiseIntentContextResult5secs) IntentResult resolves to testContextY instance after a 5 second delay";
it(RaiseIntentContextResult5secs, async () => {
errorListener = await control.listenForError();
let receiver = control.receiveContext(ControlContextType.sharedTestingIntent1ListenerTriggered, 8000);
const { listenerPromise: receiver } = await control.receiveContext("sharedTestingIntent1-listener-triggered", 8000);
const intentResolution = await control.raiseIntent(Intent.sharedTestingIntent1, ContextType.testContextY, undefined, 5000);
control.validateIntentResolution(IntentApp.IntentAppB, intentResolution);
const intentResultPromise = control.getIntentResult(intentResolution);
Expand All @@ -71,7 +70,7 @@ export default () =>
const RaiseIntentChannelResult = "(2.0-RaiseIntentChannelResult) IntentResult resolves to a Channel object";
it(RaiseIntentChannelResult, async () => {
errorListener = await control.listenForError();
let receiver = control.receiveContext(ControlContextType.sharedTestingIntent2ResultSent, constants.WaitTime);
const { listenerPromise: receiver } = await control.receiveContext(ContextType.testContextZ, 5000);
const intentResolution = await control.raiseIntent(Intent.sharedTestingIntent2, ContextType.testContextY, {
appId: IntentApp.IntentAppE,
});
Expand All @@ -88,7 +87,7 @@ export default () =>
const RaiseIntentPrivateChannelResult = "(2.0-RaiseIntentPrivateChannelResult) IntentResult resolves to a private Channel object";
it(RaiseIntentPrivateChannelResult, async () => {
errorListener = await control.listenForError();
let receiver = control.receiveContext(ControlContextType.sharedTestingIntent2ResultSent, constants.WaitTime);
const { listenerPromise: receiver } = await control.receiveContext(ContextType.testContextZ, 5000);
const intentResolution = await control.raiseIntent(Intent.sharedTestingIntent2, ContextType.testContextY, {
appId: IntentApp.IntentAppF,
});
Expand All @@ -105,7 +104,7 @@ export default () =>
const RaiseIntentVoidResult61secs = "(2.0-RaiseIntentVoidResult61secs) App A receives a void IntentResult after a 61 second delay";
it(RaiseIntentVoidResult61secs, async () => {
errorListener = await control.listenForError();
let receiver = control.receiveContext(ControlContextType.aTestingIntentListenerTriggered, 64000);
const { listenerPromise: receiver } = await control.receiveContext("aTestingIntent-listener-triggered", 64000);
const intentResolution = await control.raiseIntent(Intent.aTestingIntent, ContextType.testContextX, undefined, 61000);
control.validateIntentResolution(IntentApp.IntentAppA, intentResolution);
let intentResultPromise = control.getIntentResult(intentResolution);
Expand All @@ -120,7 +119,7 @@ export default () =>
const RaiseIntentContextResult61secs = "(2.0-RaiseIntentContextResult61secs) IntentResult resolves to testContextY instance after a 61 second delay";
it(RaiseIntentContextResult61secs, async () => {
errorListener = await control.listenForError();
let receiver = control.receiveContext(ControlContextType.sharedTestingIntent1ListenerTriggered, 64000);
const { listenerPromise: receiver } = await control.receiveContext("sharedTestingIntent1-listener-triggered", 64000);
const intentResolution = await control.raiseIntent(Intent.sharedTestingIntent1, ContextType.testContextY, undefined, 61000);
control.validateIntentResolution(IntentApp.IntentAppB, intentResolution);
let intentResultPromise = control.getIntentResult(intentResolution);
Expand All @@ -131,4 +130,4 @@ export default () =>
control.validateIntentResult(intentResult, IntentResultType.Context, ContextType.testContextY);
}
}).timeout(80000);
});
});

0 comments on commit c63155a

Please sign in to comment.