Fix tests typing
This commit is contained in:
parent
188d5d09a2
commit
083ff0b7c7
|
@ -137,6 +137,10 @@ class TestConfiguration {
|
||||||
}
|
}
|
||||||
|
|
||||||
getAppId() {
|
getAppId() {
|
||||||
|
if (!this.appId) {
|
||||||
|
throw "appId has not been initialised properly"
|
||||||
|
}
|
||||||
|
|
||||||
return this.appId
|
return this.appId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -510,7 +514,7 @@ class TestConfiguration {
|
||||||
// create dev app
|
// create dev app
|
||||||
// clear any old app
|
// clear any old app
|
||||||
this.appId = null
|
this.appId = null
|
||||||
this.app = await context.doInAppContext(null, async () => {
|
this.app = await context.doInTenant(this.tenantId!, async () => {
|
||||||
const app = await this._req(
|
const app = await this._req(
|
||||||
{ name: appName },
|
{ name: appName },
|
||||||
null,
|
null,
|
||||||
|
@ -519,7 +523,7 @@ class TestConfiguration {
|
||||||
this.appId = app.appId!
|
this.appId = app.appId!
|
||||||
return app
|
return app
|
||||||
})
|
})
|
||||||
return await context.doInAppContext(this.appId, async () => {
|
return await context.doInAppContext(this.getAppId(), async () => {
|
||||||
// create production app
|
// create production app
|
||||||
this.prodApp = await this.publish()
|
this.prodApp = await this.publish()
|
||||||
|
|
||||||
|
@ -817,7 +821,7 @@ class TestConfiguration {
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAutomationLogs() {
|
async getAutomationLogs() {
|
||||||
return context.doInAppContext(this.appId, async () => {
|
return context.doInAppContext(this.getAppId(), async () => {
|
||||||
const now = new Date()
|
const now = new Date()
|
||||||
return await pro.sdk.automations.logs.logSearch({
|
return await pro.sdk.automations.logs.logSearch({
|
||||||
startDate: new Date(now.getTime() - 100000).toISOString(),
|
startDate: new Date(now.getTime() - 100000).toISOString(),
|
||||||
|
|
Loading…
Reference in New Issue