@itwin/rpcinterface-full-stack-tests 5.0.0-dev.56 → 5.0.0-dev.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/common/Settings.js +11 -4
- package/lib/common/Settings.js.map +1 -1
- package/lib/dist/bundled-tests.js +40683 -34090
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/frontend/setup/IModelSession.js +5 -0
- package/lib/frontend/setup/IModelSession.js.map +1 -1
- package/lib/frontend/setup/TestContext.js +7 -1
- package/lib/frontend/setup/TestContext.js.map +1 -1
- package/package.json +13 -13
|
@@ -12,6 +12,11 @@ const core_common_1 = require("@itwin/core-common");
|
|
|
12
12
|
const imodels_client_management_1 = require("@itwin/imodels-client-management");
|
|
13
13
|
const imodels_access_frontend_1 = require("@itwin/imodels-access-frontend");
|
|
14
14
|
class IModelSession {
|
|
15
|
+
iTwinId;
|
|
16
|
+
iModelId;
|
|
17
|
+
changesetId;
|
|
18
|
+
_imodelVersion;
|
|
19
|
+
_iModel;
|
|
15
20
|
constructor(iTwinId, imodelId, changesetId) {
|
|
16
21
|
this.iTwinId = iTwinId;
|
|
17
22
|
this.iModelId = imodelId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelSession.js","sourceRoot":"","sources":["../../../src/frontend/setup/IModelSession.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,+BAA8B;AAC9B,wDAAuE;AACvE,wDAAmG;AAEnG,oDAAmD;AAEnD,gFAAiE;AACjE,4EAAoE;AAEpE,MAAa,aAAa;
|
|
1
|
+
{"version":3,"file":"IModelSession.js","sourceRoot":"","sources":["../../../src/frontend/setup/IModelSession.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,+BAA8B;AAC9B,wDAAuE;AACvE,wDAAmG;AAEnG,oDAAmD;AAEnD,gFAAiE;AACjE,4EAAoE;AAEpE,MAAa,aAAa;IAEjB,OAAO,CAAS;IA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AAK,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;IACjE,CAAC;IAEM,KAAK,CAAC,IAAI;QACf,IAAI,CAAC;YACH,sCAAsC;YACtC,OAAO,CAAC,GAAG,CAAC,gBAAgB,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC,CAAC;YAC3D,IAAI,CAAC,OAAO,GAAG,MAAM,oCAAoB,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;YACvG,IAAA,aAAM,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;QAChC,CAAC;QAAC,OAAO,CAAM,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;QACrE,CAAC;QAED,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CACF;AAlFD,sCAkFC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { expect } from \"chai\";\nimport { CheckpointConnection, IModelApp } from \"@itwin/core-frontend\";\nimport { ITwin, ITwinsAccessClient, ITwinsAPIResponse, ITwinSubClass } from \"@itwin/itwins-client\";\nimport { IModelData } from \"../../common/Settings\";\nimport { IModelVersion } from \"@itwin/core-common\";\nimport { AccessToken } from \"@itwin/core-bentley\";\nimport { IModelsClient } from \"@itwin/imodels-client-management\";\nimport { AccessTokenAdapter } from \"@itwin/imodels-access-frontend\";\n\nexport class IModelSession {\n\n public iTwinId: string;\n public iModelId: string;\n public changesetId?: string;\n private _imodelVersion: IModelVersion;\n\n private _iModel?: CheckpointConnection;\n\n private constructor(iTwinId: string, imodelId: string, changesetId?: string) {\n this.iTwinId = iTwinId;\n this.iModelId = imodelId;\n this.changesetId = changesetId;\n\n this._imodelVersion = changesetId ? IModelVersion.asOfChangeSet(changesetId) : IModelVersion.latest();\n }\n\n public static async create(requestContext: AccessToken, iModelData: IModelData): Promise<IModelSession> {\n let iTwinId;\n let imodelId;\n\n // Turn the iTwin name into an id\n if (iModelData.useITwinName) {\n if (!iModelData.iTwinName)\n throw new Error(`The iModel has no iTwin name, so it cannot get the iTwin.`);\n\n const client = new ITwinsAccessClient();\n const iTwinListResponse: ITwinsAPIResponse<ITwin[]> = await client.queryAsync(requestContext, ITwinSubClass.Project , {\n displayName: iModelData.iTwinName,\n });\n const iTwinList = iTwinListResponse.data;\n if (!iTwinList) {\n throw new Error(`ITwin ${iModelData.iTwinName} returned with no data when queried.`);\n }\n if (iTwinList.length === 0)\n throw new Error(`ITwin ${iModelData.iTwinName} was not found for the user.`);\n else if (iTwinList.length > 1)\n throw new Error(`Multiple iTwins named ${iModelData.iTwinName} were found for the user.`);\n\n iTwinId = iTwinList[0].id ?? iModelData.iTwinId!;\n } else\n iTwinId = iModelData.iTwinId!;\n\n if (iModelData.useName) {\n const imodelClient = new IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? \"\"}api.bentley.com/imodels`}});\n const imodels = imodelClient.iModels.getRepresentationList({\n authorization: AccessTokenAdapter.toAuthorizationCallback(await IModelApp.getAccessToken()),\n urlParams: {\n iTwinId,\n name: iModelData.name,\n },\n });\n for await (const iModel of imodels) {\n imodelId = iModel.id;\n break;\n }\n if (!imodelId)\n throw new Error(`The iModel ${iModelData.name} does not exist in iTwin ${iTwinId}.`);\n } else\n imodelId = iModelData.id!;\n\n console.log(`Using iModel { name:${iModelData.name}, id:${iModelData.id}, iTwinId:${iModelData.iTwinId}, changesetId:${iModelData.changeSetId} }`); // eslint-disable-line no-console\n\n return new IModelSession(iTwinId, imodelId, iModelData.changeSetId);\n }\n\n public async getConnection(): Promise<CheckpointConnection> {\n return undefined === this._iModel ? this.open() : this._iModel;\n }\n\n public async open(): Promise<CheckpointConnection> {\n try {\n // eslint-disable-next-line no-console\n console.log(`Environment: ${process.env.IMJS_URL_PREFIX}`);\n this._iModel = await CheckpointConnection.openRemote(this.iTwinId, this.iModelId, this._imodelVersion);\n expect(this._iModel).to.exist;\n } catch (e: any) {\n throw new Error(`Failed to open test iModel. Error: ${e.message}`);\n }\n\n return this._iModel;\n }\n}\n"]}
|
|
@@ -17,10 +17,16 @@ const SideChannels_1 = require("../../common/SideChannels");
|
|
|
17
17
|
const IModelSession_1 = require("./IModelSession");
|
|
18
18
|
/* eslint-disable no-console */
|
|
19
19
|
class TestContext {
|
|
20
|
+
clientAccessToken;
|
|
21
|
+
serviceAuthToken;
|
|
22
|
+
iModelWithChangesets;
|
|
23
|
+
iModelForWrite;
|
|
24
|
+
iTwinId;
|
|
25
|
+
settings;
|
|
20
26
|
constructor(env) {
|
|
21
27
|
this.settings = new Settings_1.Settings(env);
|
|
22
28
|
}
|
|
23
|
-
static
|
|
29
|
+
static _instance = undefined;
|
|
24
30
|
static async instance() {
|
|
25
31
|
if (this._instance === undefined) {
|
|
26
32
|
this._instance = new TestContext(await (0, SideChannels_1.getProcessEnvFromBackend)());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestContext.js","sourceRoot":"","sources":["../../../src/frontend/setup/TestContext.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,+BAA8B;AAC9B,sDAAoE;AACpE,oDAAyE;AACzE,wDAAmD;AACnD,uEAA2H;AAC3H,4EAAuE;AACvE,gFAAiE;AACjE,oDAAmE;AACnE,4DAAsG;AACtG,mDAAgD;AAIhD,+BAA+B;AAC/B,MAAa,WAAW;
|
|
1
|
+
{"version":3,"file":"TestContext.js","sourceRoot":"","sources":["../../../src/frontend/setup/TestContext.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,+BAA8B;AAC9B,sDAAoE;AACpE,oDAAyE;AACz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AAC,uBAAuB,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;QAE5G,MAAM,YAAY,GAAG,IAAI,yCAAa,CAAC,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,WAAW,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,EAAE,yBAAyB,EAAE,EAAE,CAAC,CAAC;QACpI,MAAM,2BAAW,CAAC,OAAO,CAAC;YACxB,kBAAkB,EAAE,eAAe;YACnC,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK;YAClC,mBAAmB,EAAE,IAAI,0CAA+B,CAAC,IAAI,CAAC,gBAAgB,CAAC;YAC/E,SAAS,EAAE,IAAI,+CAAqB,CAAC,YAAY,CAAC;SACnD,CAAC,CAAC;QAEH,IAAI,CAAC,oBAAoB,GAAG,MAAM,6BAAa,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAEpG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC;QAEjD,IAAI,IAAI,CAAC,QAAQ,CAAC,sBAAsB;YACtC,IAAI,CAAC,cAAc,GAAG,MAAM,6BAAa,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAEvG,CAAC;;AA1EH,kCA2EC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { expect } from \"chai\";\nimport { AccessToken, Logger, LogLevel } from \"@itwin/core-bentley\";\nimport { BentleyCloudRpcManager, OpenAPIInfo } from \"@itwin/core-common\";\nimport { NoRenderApp } from \"@itwin/core-frontend\";\nimport { getServiceAuthTokenFromBackend, TestFrontendAuthorizationClient } from \"@itwin/oidc-signin-tool/lib/cjs/frontend\";\nimport { FrontendIModelsAccess } from \"@itwin/imodels-access-frontend\";\nimport { IModelsClient } from \"@itwin/imodels-client-management\";\nimport { getRpcInterfaces, Settings } from \"../../common/Settings\";\nimport { getClientAccessTokenFromBackend, getProcessEnvFromBackend } from \"../../common/SideChannels\";\nimport { IModelSession } from \"./IModelSession\";\n\ndeclare const PACKAGE_VERSION: string;\n\n/* eslint-disable no-console */\nexport class TestContext {\n public clientAccessToken?: AccessToken;\n public serviceAuthToken!: AccessToken;\n\n public iModelWithChangesets?: IModelSession;\n public iModelForWrite?: IModelSession;\n public iTwinId?: string;\n\n public settings: Settings;\n\n private constructor(env: NodeJS.ProcessEnv) {\n this.settings = new Settings(env);\n }\n private static _instance?: TestContext = undefined;\n\n public static async instance(): Promise<TestContext> {\n if (this._instance === undefined) {\n this._instance = new TestContext(await getProcessEnvFromBackend());\n await this._instance.initialize();\n }\n return this._instance;\n }\n\n /** Initialize configuration for the rpc interfaces used by the application. */\n private initializeRpcInterfaces(info: OpenAPIInfo) { // eslint-disable-line @typescript-eslint/no-deprecated\n // Url without trailing slash\n const uriPrefix: string = this.settings.Backend.location.replace(/\\/$/, \"\");\n BentleyCloudRpcManager.initializeClient({ info, uriPrefix }, getRpcInterfaces(this.settings));\n }\n\n private async initialize() {\n expect(this.settings.users.length).to.be.gte(1, `Unexpected number of users found in settings - got ${this.settings.users.length}, expected at least 2`);\n expect(this.settings.iModels.length).to.be.gte(1, `Unexpected number of iModels found in settings - got ${this.settings.iModels.length}, expected at least 1`);\n\n // Print out the configuration\n console.log(this.settings.toString());\n\n // Configure iTwin.js frontend logging to go to the console\n Logger.initializeToConsole();\n Logger.setLevelDefault(this.settings.logLevel === undefined ? LogLevel.Warning : this.settings.logLevel);\n\n if (this.settings?.clientConfiguration && this.settings.clientConfiguration.clientId) {\n this.serviceAuthToken = await getServiceAuthTokenFromBackend({\n clientId: this.settings.clientConfiguration.clientId,\n clientSecret: this.settings.clientConfiguration.clientSecret,\n scope: this.settings.clientConfiguration.scope,\n authority: `https://${\n process.env.IMJS_URL_PREFIX === \"dev-\"\n ? \"qa-\"\n : process.env.IMJS_URL_PREFIX ?? \"\"\n }ims.bentley.com`,\n });\n }\n\n if (undefined !== this.settings.clientConfiguration)\n this.clientAccessToken = await getClientAccessTokenFromBackend();\n\n this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });\n\n const iModelClient = new IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? \"\"}api.bentley.com/imodels` } });\n await NoRenderApp.startup({\n applicationVersion: PACKAGE_VERSION,\n applicationId: this.settings.gprid,\n authorizationClient: new TestFrontendAuthorizationClient(this.serviceAuthToken),\n hubAccess: new FrontendIModelsAccess(iModelClient),\n });\n\n this.iModelWithChangesets = await IModelSession.create(this.serviceAuthToken, this.settings.iModel);\n\n this.iTwinId = this.iModelWithChangesets.iTwinId;\n\n if (this.settings.runiModelWriteRpcTests)\n this.iModelForWrite = await IModelSession.create(this.serviceAuthToken, this.settings.writeIModel);\n\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/rpcinterface-full-stack-tests",
|
|
3
|
-
"version": "5.0.0-dev.
|
|
3
|
+
"version": "5.0.0-dev.57",
|
|
4
4
|
"description": "Test the full iTwin.js Core stack (frontend and backend) using standard RPC interfaces",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
"dotenv-expand": "^5.1.0",
|
|
33
33
|
"mocha": "^10.2.0",
|
|
34
34
|
"openid-client": "^4.7.4",
|
|
35
|
-
"@itwin/build-tools": "5.0.0-dev.
|
|
36
|
-
"@itwin/core-bentley": "5.0.0-dev.
|
|
37
|
-
"@itwin/core-
|
|
38
|
-
"@itwin/core-
|
|
39
|
-
"@itwin/core-common": "5.0.0-dev.
|
|
40
|
-
"@itwin/core-quantity": "5.0.0-dev.
|
|
41
|
-
"@itwin/
|
|
42
|
-
"@itwin/
|
|
43
|
-
"@itwin/presentation-
|
|
35
|
+
"@itwin/build-tools": "5.0.0-dev.57",
|
|
36
|
+
"@itwin/core-bentley": "5.0.0-dev.57",
|
|
37
|
+
"@itwin/core-geometry": "5.0.0-dev.57",
|
|
38
|
+
"@itwin/core-frontend": "5.0.0-dev.57",
|
|
39
|
+
"@itwin/core-common": "5.0.0-dev.57",
|
|
40
|
+
"@itwin/core-quantity": "5.0.0-dev.57",
|
|
41
|
+
"@itwin/presentation-common": "5.0.0-dev.57",
|
|
42
|
+
"@itwin/certa": "5.0.0-dev.57",
|
|
43
|
+
"@itwin/presentation-frontend": "5.0.0-dev.57"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@itwin/itwins-client": "^1.2.0",
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"typescript": "~5.6.2",
|
|
64
64
|
"webpack": "^5.97.1",
|
|
65
65
|
"webpack-cli": "^5.0.1",
|
|
66
|
-
"@itwin/
|
|
67
|
-
"@itwin/
|
|
66
|
+
"@itwin/express-server": "5.0.0-dev.57",
|
|
67
|
+
"@itwin/core-backend": "5.0.0-dev.57",
|
|
68
68
|
"internal-tools": "3.0.0-dev.69",
|
|
69
|
-
"@itwin/presentation-backend": "5.0.0-dev.
|
|
69
|
+
"@itwin/presentation-backend": "5.0.0-dev.57"
|
|
70
70
|
},
|
|
71
71
|
"scripts": {
|
|
72
72
|
"build": "tsc 1>&2 && npm run -s webpack:test",
|