mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-11 06:10:05 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab8da28de1 | ||
| a729d67d3e | |||
| 548a44d665 | |||
| 39abdad518 |
@@ -13,7 +13,7 @@ export class AuthManager {
|
|||||||
public userLongName = ''
|
public userLongName = ''
|
||||||
private loginUrl: string
|
private loginUrl: string
|
||||||
private logoutUrl: string
|
private logoutUrl: string
|
||||||
private redirectedLoginUrl = `/SASLogon/home`
|
private redirectedLoginUrl = `/SASLogon` //SAS 9 M8 no longer redirects from `/SASLogon/home` to the login page. `/SASLogon` seems to be stable enough across SAS versions
|
||||||
constructor(
|
constructor(
|
||||||
private serverUrl: string,
|
private serverUrl: string,
|
||||||
private serverType: ServerType,
|
private serverType: ServerType,
|
||||||
|
|||||||
@@ -365,7 +365,7 @@ describe('AuthManager', () => {
|
|||||||
expect(loginResponse.userName).toEqual(userName)
|
expect(loginResponse.userName).toEqual(userName)
|
||||||
|
|
||||||
expect(openWebPageModule.openWebPage).toHaveBeenCalledWith(
|
expect(openWebPageModule.openWebPage).toHaveBeenCalledWith(
|
||||||
`/SASLogon/home`,
|
`/SASLogon`,
|
||||||
'SASLogon',
|
'SASLogon',
|
||||||
{
|
{
|
||||||
width: 500,
|
width: 500,
|
||||||
@@ -409,7 +409,7 @@ describe('AuthManager', () => {
|
|||||||
expect(loginResponse.userName).toEqual(userName)
|
expect(loginResponse.userName).toEqual(userName)
|
||||||
|
|
||||||
expect(openWebPageModule.openWebPage).toHaveBeenCalledWith(
|
expect(openWebPageModule.openWebPage).toHaveBeenCalledWith(
|
||||||
`/SASLogon/home`,
|
`/SASLogon`,
|
||||||
'SASLogon',
|
'SASLogon',
|
||||||
{
|
{
|
||||||
width: 500,
|
width: 500,
|
||||||
@@ -453,7 +453,7 @@ describe('AuthManager', () => {
|
|||||||
expect(loginResponse.userName).toEqual('')
|
expect(loginResponse.userName).toEqual('')
|
||||||
|
|
||||||
expect(openWebPageModule.openWebPage).toHaveBeenCalledWith(
|
expect(openWebPageModule.openWebPage).toHaveBeenCalledWith(
|
||||||
`/SASLogon/home`,
|
`/SASLogon`,
|
||||||
'SASLogon',
|
'SASLogon',
|
||||||
{
|
{
|
||||||
width: 500,
|
width: 500,
|
||||||
@@ -497,7 +497,7 @@ describe('AuthManager', () => {
|
|||||||
expect(loginResponse.userName).toEqual('')
|
expect(loginResponse.userName).toEqual('')
|
||||||
|
|
||||||
expect(openWebPageModule.openWebPage).toHaveBeenCalledWith(
|
expect(openWebPageModule.openWebPage).toHaveBeenCalledWith(
|
||||||
`/SASLogon/home`,
|
`/SASLogon`,
|
||||||
'SASLogon',
|
'SASLogon',
|
||||||
{
|
{
|
||||||
width: 500,
|
width: 500,
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ describe('verifySas9Login', () => {
|
|||||||
it('should return isLoggedIn true by checking state of popup', async () => {
|
it('should return isLoggedIn true by checking state of popup', async () => {
|
||||||
const popup = {
|
const popup = {
|
||||||
window: {
|
window: {
|
||||||
location: { href: serverUrl + `/SASLogon/home` },
|
location: { href: serverUrl + `/SASLogon` },
|
||||||
document: { body: { innerText: '<h3>You have signed in.</h3>' } }
|
document: { body: { innerText: '<h3>You have signed in.</h3>' } }
|
||||||
}
|
}
|
||||||
} as unknown as Window
|
} as unknown as Window
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ describe('verifySasViyaLogin', () => {
|
|||||||
it('should return isLoggedIn true by checking state of popup', async () => {
|
it('should return isLoggedIn true by checking state of popup', async () => {
|
||||||
const popup = {
|
const popup = {
|
||||||
window: {
|
window: {
|
||||||
location: { href: serverUrl + `/SASLogon/home` },
|
location: { href: serverUrl + `/SASLogon` },
|
||||||
document: { body: { innerText: '<h3>You have signed in.</h3>' } }
|
document: { body: { innerText: '<h3>You have signed in.</h3>' } }
|
||||||
}
|
}
|
||||||
} as unknown as Window
|
} as unknown as Window
|
||||||
|
|||||||
Reference in New Issue
Block a user