1
0
mirror of https://github.com/sasjs/adapter.git synced 2025-12-11 01:14:36 +00:00

fix: sasjs-tests are passing on sas9 except one

This commit is contained in:
2023-02-09 22:04:47 +05:00
parent 2210e43880
commit 435993e50e
3 changed files with 10 additions and 3 deletions

View File

@@ -53,7 +53,9 @@ export const basicTests = (
return await newAdapterIns.checkSession()
},
assertion: (response: any) =>
response?.isLoggedIn && response?.userName === userName
adapter.getSasjsConfig().serverType === ServerType.Sas9
? response?.isLoggedIn
: response?.isLoggedIn && response?.userName === userName
},
{
title: 'Multiple Log in attempts',

View File

@@ -141,7 +141,7 @@ export class AuthManager {
await this.performCASSecurityCheck()
}
this.loginCallback()
await this.loginCallback()
this.userName = loginParams.username
}

View File

@@ -16,7 +16,8 @@ import { SASViyaApiClient } from '../SASViyaApiClient'
import {
isRelativePath,
parseSasViyaDebugResponse,
appendExtraResponseAttributes
appendExtraResponseAttributes,
getValidJson
} from '../utils'
import { BaseJobExecutor } from './JobExecutor'
import { parseWeboutResponse } from '../utils/parseWeboutResponse'
@@ -183,6 +184,10 @@ export class WebJobExecutor extends BaseJobExecutor {
}
}
if (typeof jsonResponse === 'string') {
jsonResponse = getValidJson(jsonResponse)
}
const responseObject = appendExtraResponseAttributes(
{ result: jsonResponse, log: res.log },
extraResponseAttributes