-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
396 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,25 @@ | ||
import { closeWindowOnCompletion, onFdc3Ready, sendContextToTests, validateContext } from "./mock-functions"; | ||
import { DesktopAgent } from "fdc3_2_0"; | ||
import { wait } from "../../utils"; | ||
import { ContextType, Intent } from "../../test/v2.0/support/intent-support-2.0"; | ||
import { ContextType, ControlContextType, Intent } from "../../test/v2.0/support/intent-support-2.0"; | ||
import constants from "../../constants"; | ||
|
||
declare let fdc3: DesktopAgent; | ||
|
||
//used in '2.0-RaiseIntentChannelResult' | ||
onFdc3Ready().then(async () => { | ||
await closeWindowOnCompletion(); | ||
const { appMetadata } = await fdc3.getInfo(); | ||
|
||
fdc3.addIntentListener(Intent.sharedTestingIntent2, async (context) => { | ||
validateContext(context.type, ContextType.testContextY); | ||
const channel = await fdc3.getOrCreateChannel("test-channel"); | ||
|
||
//set-up alert to test framework that the task was completed after a short delay | ||
setTimeout(async () => { | ||
await sendContextToTests({ type: ControlContextType.sharedTestingIntent2ResultSent, id: { key: "uniqueId" }, instanceId: appMetadata.instanceId }); | ||
}, constants.ShortWait) | ||
|
||
return channel; | ||
}); | ||
|
||
const { appMetadata } = await fdc3.getInfo(); | ||
|
||
await wait(); // send context after short delay | ||
await sendContextToTests({ type: ContextType.testContextZ, id: { key: "uniqueId" }, instanceId: appMetadata.instanceId }); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
import { closeWindowOnCompletion, onFdc3Ready, sendContextToTests, validateContext } from "./mock-functions"; | ||
import { DesktopAgent } from "fdc3_2_0"; | ||
import { wait } from "../../utils"; | ||
import { ContextType, Intent } from "../../test/v2.0/support/intent-support-2.0"; | ||
import { ContextType, ControlContextType, Intent } from "../../test/v2.0/support/intent-support-2.0"; | ||
import constants from "../../constants"; | ||
declare let fdc3: DesktopAgent; | ||
|
||
//used in '2.0-RaiseIntentPrivateChannelResult' | ||
onFdc3Ready().then(async () => { | ||
await closeWindowOnCompletion(); | ||
const { appMetadata } = await fdc3.getInfo(); | ||
|
||
fdc3.addIntentListener(Intent.sharedTestingIntent2, async (context) => { | ||
validateContext(context.type, ContextType.testContextY); | ||
const privateChannel = await fdc3.createPrivateChannel(); | ||
|
||
//set-up alert to test framework that the task was completed after a short delay | ||
setTimeout(async () => { | ||
await sendContextToTests({ type: ControlContextType.sharedTestingIntent2ResultSent, id: { key: "uniqueId" }, instanceId: appMetadata.instanceId }); | ||
}, constants.ShortWait) | ||
|
||
return privateChannel; | ||
}); | ||
|
||
const { appMetadata } = await fdc3.getInfo(); | ||
|
||
await wait(); // send context after short delay | ||
await sendContextToTests({ type: ContextType.testContextZ, id: { key: "uniqueId" }, instanceId: appMetadata.instanceId }); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.