From 39abdad518573be0473efbcc2dc8b04a965c9d7f Mon Sep 17 00:00:00 2001 From: Mihajlo Medjedovic Date: Mon, 3 Apr 2023 12:48:32 +0200 Subject: [PATCH 1/3] fix: sas9 m8 redirected login --- src/auth/AuthManager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/auth/AuthManager.ts b/src/auth/AuthManager.ts index b6bf709..ac1886e 100644 --- a/src/auth/AuthManager.ts +++ b/src/auth/AuthManager.ts @@ -13,7 +13,7 @@ export class AuthManager { public userLongName = '' private loginUrl: 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( private serverUrl: string, private serverType: ServerType, From 548a44d6656b6093657a3f3fd24f62b91da53be3 Mon Sep 17 00:00:00 2001 From: Mihajlo Medjedovic Date: Tue, 4 Apr 2023 14:08:47 +0200 Subject: [PATCH 2/3] chore: auth manager test fix --- src/auth/spec/AuthManager.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/auth/spec/AuthManager.spec.ts b/src/auth/spec/AuthManager.spec.ts index 46eb09e..1eb7392 100644 --- a/src/auth/spec/AuthManager.spec.ts +++ b/src/auth/spec/AuthManager.spec.ts @@ -365,7 +365,7 @@ describe('AuthManager', () => { expect(loginResponse.userName).toEqual(userName) expect(openWebPageModule.openWebPage).toHaveBeenCalledWith( - `/SASLogon/home`, + `/SASLogon`, 'SASLogon', { width: 500, @@ -409,7 +409,7 @@ describe('AuthManager', () => { expect(loginResponse.userName).toEqual(userName) expect(openWebPageModule.openWebPage).toHaveBeenCalledWith( - `/SASLogon/home`, + `/SASLogon`, 'SASLogon', { width: 500, @@ -453,7 +453,7 @@ describe('AuthManager', () => { expect(loginResponse.userName).toEqual('') expect(openWebPageModule.openWebPage).toHaveBeenCalledWith( - `/SASLogon/home`, + `/SASLogon`, 'SASLogon', { width: 500, @@ -497,7 +497,7 @@ describe('AuthManager', () => { expect(loginResponse.userName).toEqual('') expect(openWebPageModule.openWebPage).toHaveBeenCalledWith( - `/SASLogon/home`, + `/SASLogon`, 'SASLogon', { width: 500, From a729d67d3ecbe78dc181b09744a263fbf96b1a8a Mon Sep 17 00:00:00 2001 From: Mihajlo Medjedovic Date: Wed, 5 Apr 2023 15:39:31 +0200 Subject: [PATCH 3/3] chore: remove /home leftovers --- src/auth/spec/verifySas9Login.spec.ts | 2 +- src/auth/spec/verifySasViyaLogin.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/auth/spec/verifySas9Login.spec.ts b/src/auth/spec/verifySas9Login.spec.ts index 78f84fc..c71f595 100644 --- a/src/auth/spec/verifySas9Login.spec.ts +++ b/src/auth/spec/verifySas9Login.spec.ts @@ -17,7 +17,7 @@ describe('verifySas9Login', () => { it('should return isLoggedIn true by checking state of popup', async () => { const popup = { window: { - location: { href: serverUrl + `/SASLogon/home` }, + location: { href: serverUrl + `/SASLogon` }, document: { body: { innerText: '

You have signed in.

' } } } } as unknown as Window diff --git a/src/auth/spec/verifySasViyaLogin.spec.ts b/src/auth/spec/verifySasViyaLogin.spec.ts index f0d1d7d..dc99e32 100644 --- a/src/auth/spec/verifySasViyaLogin.spec.ts +++ b/src/auth/spec/verifySasViyaLogin.spec.ts @@ -18,7 +18,7 @@ describe('verifySasViyaLogin', () => { it('should return isLoggedIn true by checking state of popup', async () => { const popup = { window: { - location: { href: serverUrl + `/SASLogon/home` }, + location: { href: serverUrl + `/SASLogon` }, document: { body: { innerText: '

You have signed in.

' } } } } as unknown as Window