microapps-automation-helper
Advanced tools
Comparing version 1.7.0 to 1.8.0
@@ -957,3 +957,23 @@ "use strict"; | ||
} | ||
async checkIntegrationMissConfiguration({ authInstance, microappsAdminUrl, integrationId, }) { | ||
const response = await this.integrityCheck({ authInstance, microappsAdminUrl }); | ||
const missconfigured = response.data; | ||
const responseApps = await this.getApps({ authInstance, microappsAdminUrl }); | ||
const appsData = responseApps.data; | ||
const missconfiguredAppsId = missconfigured.map((app) => app.appId); | ||
let res = []; | ||
res = appsData.filter((app) => { | ||
return missconfiguredAppsId.find((missConfiguredAppId) => { | ||
return missConfiguredAppId === app.id; | ||
}); | ||
}); | ||
const intregrations = res.find((e) => e.app.serviceId === integrationId); | ||
if (intregrations) { | ||
return [{ missConfigured: 'true' }]; | ||
} | ||
else { | ||
return [{ missConfigured: 'false' }]; | ||
} | ||
} | ||
} | ||
exports.MicroappsAdmin = MicroappsAdmin; |
{ | ||
"name": "microapps-automation-helper", | ||
"version": "1.7.0", | ||
"version": "1.8.0", | ||
"description": "> library which provides common functions to test integration between Microapps Admin and Citrix Worskspace", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -13,2 +13,3 @@ import FormData from 'form-data'; | ||
CheckAppMissconfigurations, | ||
CheckIntegrationMissConfiguration, | ||
CreateHTTPIntegration, | ||
@@ -35,5 +36,5 @@ CreateJavaIntegration, | ||
Subscribe, | ||
WaitForAllSync, | ||
WaitForProcessStatus, | ||
WaitForSync, | ||
WaitForAllSync, | ||
} from './types/microappsAdmin'; | ||
@@ -1216,2 +1217,32 @@ | ||
} | ||
async checkIntegrationMissConfiguration({ | ||
authInstance, | ||
microappsAdminUrl, | ||
integrationId, | ||
}: CheckIntegrationMissConfiguration) { | ||
const response = await this.integrityCheck({ authInstance, microappsAdminUrl }); | ||
const missconfigured = response.data; | ||
const responseApps = await this.getApps({ authInstance, microappsAdminUrl }); | ||
const appsData = responseApps.data; | ||
const missconfiguredAppsId = missconfigured.map((app: { appId: string }) => app.appId); | ||
let res = []; | ||
res = appsData.filter((app: { id: string }) => { | ||
return missconfiguredAppsId.find((missConfiguredAppId: string) => { | ||
return missConfiguredAppId === app.id; | ||
}); | ||
}); | ||
const intregrations = res.find((e: { app: { serviceId: number } }) => e.app.serviceId === integrationId); | ||
if (intregrations) { | ||
return [{ missConfigured: 'true' }]; | ||
} else { | ||
return [{ missConfigured: 'false' }]; | ||
} | ||
} | ||
} |
@@ -192,1 +192,8 @@ import { Page } from 'playwright'; | ||
}; | ||
export type CheckIntegrationMissConfiguration = { | ||
authInstance: AxiosInstance; | ||
microappsAdminUrl: string; | ||
integrationId: string | number | ||
} |
import { API } from './api'; | ||
import { AxiosResponse } from 'axios'; | ||
import type { AddSubscriber, AddSubscribers, CheckAppMissconfigurations, CreateHTTPIntegration, CreateJavaIntegration, ExportApp, ExportIntegrationUI, ExportMicroAppUI, GetComponentId, GetIntegrationId, GetIntegrationType, GetLastSyncTime, GetMicroAppId, GetNotificationId, GetStatusIntegration, ImportIntegration, ImportIntegrationUI, ImportMicroAppUI, MicroappsAdminLogin, OauthLogout, RenameIntegration, RunEvent, RunSynchronization, WaitForProcessStatus, WaitForSync, WaitForAllSync } from './types/microappsAdmin'; | ||
import type { AddSubscriber, AddSubscribers, CheckAppMissconfigurations, CheckIntegrationMissConfiguration, CreateHTTPIntegration, CreateJavaIntegration, ExportApp, ExportIntegrationUI, ExportMicroAppUI, GetComponentId, GetIntegrationId, GetIntegrationType, GetLastSyncTime, GetMicroAppId, GetNotificationId, GetStatusIntegration, ImportIntegration, ImportIntegrationUI, ImportMicroAppUI, MicroappsAdminLogin, OauthLogout, RenameIntegration, RunEvent, RunSynchronization, WaitForAllSync, WaitForProcessStatus, WaitForSync } from './types/microappsAdmin'; | ||
/** Class representing a Microapps Admin. */ | ||
@@ -193,2 +193,5 @@ export declare class MicroappsAdmin extends API { | ||
waitForAllSync({ synchronizationType, timeToRepeat, authInstance, microappsAdminUrl, }: WaitForAllSync): Promise<void>; | ||
checkIntegrationMissConfiguration({ authInstance, microappsAdminUrl, integrationId, }: CheckIntegrationMissConfiguration): Promise<{ | ||
missConfigured: string; | ||
}[]>; | ||
} |
@@ -166,1 +166,6 @@ import { Page } from 'playwright'; | ||
}; | ||
export declare type CheckIntegrationMissConfiguration = { | ||
authInstance: AxiosInstance; | ||
microappsAdminUrl: string; | ||
integrationId: string | number; | ||
}; |
@@ -35,3 +35,3 @@ import type { Login, CreateDsAuthInstance, GoToActions, StartAction, SkipTour, GetDsauthTokens, GetFeedCardButton, GetFeedNotifications, GetOneTimeToken, GetTokens, GetUserData, WaitForFeedCardId, WaitForPopUp } from './types/workspace'; | ||
*/ | ||
getFeedNotifications({ page }: GetFeedNotifications): Promise<{}>; | ||
getFeedNotifications({ page }: GetFeedNotifications): Promise<import("playwright/types/structs").Serializable>; | ||
/** | ||
@@ -38,0 +38,0 @@ * Wait for FeedCard to show up in Notifications |
267696
6098