Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make app Ids fully qualified #265

Open
wants to merge 1 commit into
base: 2_0_fdc3_for_the_web
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 52 additions & 34 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"build-static": "npm run compile && npm run copy"
},
"dependencies": {
"@kite9/fdc3-get-agent": "file:../../FDC3/packages/fdc3-get-agent",
"@kite9/fdc3-get-agent": "^2.2.0-beta.29",
"buffer": "^6.0.3",
"chai": "^4.3.6",
"fdc3_1_2": "npm:@finos/fdc3@^1.2.0",
Expand All @@ -41,4 +41,4 @@
"webpack": "^5.69.1",
"webpack-cli": "^4.9.2"
}
}
}
2 changes: 1 addition & 1 deletion src/mock/v2.0/general.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ onFdc3Ready().then(async () => {
type: "fdc3-conformance-opened",
};

if (appId !== "MockAppId") {
if (appId !== "MockAppId@localhost") {
appOpenedContext.errorMessage = `Incorrect appId retrieved from getInfo(). Expected MockAppId, got ${appId}`;
}

Expand Down
12 changes: 6 additions & 6 deletions src/test/common/control/open-control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,25 @@ export interface OpenControl<X> {
export const openApp = {
a: {
name: "IntentAppA",
id: "IntentAppAId",
id: "IntentAppAId@localhost",
},
b: {
name: "MockApp",
id: "MockAppId",
id: "MockAppId@localhost",
},
c: {
name: "IntentAppC",
id: "IntentAppCId",
id: "IntentAppCId@localhost",
},
d: {
id: "OpenAppAId",
id: "OpenAppAId@localhost",
},
e: {
id: "OpenAppBId",
id: "OpenAppBId@localhost",
},
f: {
name: "IntentAppB",
id: "IntentAppBId",
id: "IntentAppBId@localhost",
},
};

Expand Down
2 changes: 1 addition & 1 deletion src/test/v1.2/advanced/fdc3.raiseIntent-NoAppsFound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default () =>
{
type: ContextType.testContextY,
},
{ name: IntentApp.IntentAppA, appId: "IntentAppAId" }
{ name: IntentApp.IntentAppA, appId: "IntentAppAId@localhost" }
);
assert.fail("Error was not thrown");
} catch (ex) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/v1.2/advanced/fdc3.raiseIntent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default () =>
{
type: ContextType.testContextX,
},
{ name: IntentApp.IntentAppA, appId: "IntentAppAId" }
{ name: IntentApp.IntentAppA, appId: "IntentAppAId@localhost" }
);
validateIntentResolution(IntentApp.IntentAppA, intentResolution);
await result;
Expand Down
6 changes: 3 additions & 3 deletions src/test/v1.2/support/intent-support-1.2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export enum Intent {
}

export enum IntentApp {
IntentAppA = "IntentAppA",
IntentAppB = "IntentAppB",
IntentAppC = "IntentAppC",
IntentAppA = "IntentAppA@localhost",
IntentAppB = "IntentAppB@localhost",
IntentAppC = "IntentAppC@localhost",
}
2 changes: 1 addition & 1 deletion src/test/v2.0/support/channels-support-2.0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class ChannelControl2_0 implements ChannelControl<Channel, Context, Liste
}

//Open ChannelsApp then execute commands in order
await fdc3.open({ appId: "ChannelsAppId" }, buildChannelsAppContext(commands, channelsAppConfig));
await fdc3.open({ appId: "ChannelsAppId@localhost" }, buildChannelsAppContext(commands, channelsAppConfig));
};

async closeMockApp(testId: string) {
Expand Down
24 changes: 12 additions & 12 deletions src/test/v2.0/support/intent-support-2.0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,18 +205,18 @@ export enum IntentResultType {
}

export enum IntentApp {
IntentAppA = "IntentAppAId",
IntentAppB = "IntentAppBId",
IntentAppC = "IntentAppCId",
IntentAppD = "IntentAppDId",
IntentAppE = "IntentAppEId",
IntentAppF = "IntentAppFId",
IntentAppG = "IntentAppGId",
IntentAppH = "IntentAppHId",
IntentAppI = "IntentAppIId",
IntentAppJ = "IntentAppJId",
IntentAppK = "IntentAppKId",
IntentAppL = "IntentAppLId",
IntentAppA = "IntentAppAId@localhost",
IntentAppB = "IntentAppBId@localhost",
IntentAppC = "IntentAppCId@localhost",
IntentAppD = "IntentAppDId@localhost",
IntentAppE = "IntentAppEId@localhost",
IntentAppF = "IntentAppFId@localhost",
IntentAppG = "IntentAppGId@localhost",
IntentAppH = "IntentAppHId@localhost",
IntentAppI = "IntentAppIId@localhost",
IntentAppJ = "IntentAppJId@localhost",
IntentAppK = "IntentAppKId@localhost",
IntentAppL = "IntentAppLId@localhost",
}

export enum ContextType {
Expand Down
8 changes: 4 additions & 4 deletions src/test/v2.0/support/metadata-support-2.0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,25 @@ export class MetadataFdc3Api {
if (contextType) {
return await fdc3.open(
{
appId: "MetadataAppId",
appId: "MetadataAppId@localhost",
},
{ type: contextType }
);
} else {
return await fdc3.open({
appId: "MetadataAppId",
appId: "MetadataAppId@localhost",
});
}
}

async getAppInstances(): Promise<AppIdentifier[]> {
return await fdc3.findInstances({ appId: "MetadataAppId" });
return await fdc3.findInstances({ appId: "MetadataAppId@localhost" });
}

async getAppMetadata(appIdentifier?: AppIdentifier): Promise<AppMetadata> {
if (!appIdentifier) {
appIdentifier = {
appId: "MetadataAppId",
appId: "MetadataAppId@localhost",
};
}

Expand Down
Loading
Loading