Add test for AppPackage
This commit is contained in:
parent
947254bf44
commit
d79e1543b5
|
@ -41,7 +41,7 @@ export default class AppApi {
|
||||||
const response = await this.api.get(`/applications/${appId}/appPackage`)
|
const response = await this.api.get(`/applications/${appId}/appPackage`)
|
||||||
const json = await response.json()
|
const json = await response.json()
|
||||||
expect(response).toHaveStatusCode(200)
|
expect(response).toHaveStatusCode(200)
|
||||||
expect(json.application.apppId).toBe(appId)
|
expect(json.application.appId).toEqual(appId)
|
||||||
return [response, json]
|
return [response, json]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,21 @@ describe("Internal API - Application creation, update, publish and delete", () =
|
||||||
await config.applications.fetch()
|
await config.applications.fetch()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it("Get application details", async () => {
|
||||||
|
const app = await config.applications.create({
|
||||||
|
...generateApp(),
|
||||||
|
useTemplate: false,
|
||||||
|
})
|
||||||
|
config.applications.api.appId = app.appId
|
||||||
|
|
||||||
|
const [appPackageResponse, appPackageJson] = await config.applications.getAppPackage(<string>app.appId)
|
||||||
|
expect(appPackageJson.application.name).toEqual(app.name)
|
||||||
|
expect(appPackageJson.application.version).toEqual(app.version)
|
||||||
|
expect(appPackageJson.application.url).toEqual(app.url)
|
||||||
|
expect(appPackageJson.application.tenantId).toEqual(app.tenantId)
|
||||||
|
expect(appPackageJson.application.status).toEqual(app.status)
|
||||||
|
})
|
||||||
|
|
||||||
it("Publish app", async () => {
|
it("Publish app", async () => {
|
||||||
// create the app
|
// create the app
|
||||||
const appName = generator.word()
|
const appName = generator.word()
|
||||||
|
|
Loading…
Reference in New Issue