From 1a9e53d813cf0a573e797f5bfced33af1daeb70f Mon Sep 17 00:00:00 2001 From: Ehsan Rezaei Date: Thu, 28 Nov 2024 12:11:05 +0100 Subject: [PATCH] Fixed two excluded unit tests --- lib/js-api/test/oauth2Auth.spec.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/js-api/test/oauth2Auth.spec.ts b/lib/js-api/test/oauth2Auth.spec.ts index ed710e5cfc..f71b0c4308 100644 --- a/lib/js-api/test/oauth2Auth.spec.ts +++ b/lib/js-api/test/oauth2Auth.spec.ts @@ -191,10 +191,8 @@ describe('Oauth2 test', () => { }); }); - // TODO: we need to fix this test - // eslint-disable-next-line ban/ban - xit('should refresh token when the login not use the implicitFlow ', (done) => { - jest.setTimeout(3000); + it('should refresh token when the login not use the implicitFlow ', (done) => { + jest.spyOn(window, 'document', 'get').mockReturnValueOnce(undefined); oauth2Mock.get200Response(); const oauth2Auth = new Oauth2Auth( @@ -229,9 +227,8 @@ describe('Oauth2 test', () => { oauth2Auth.login('admin', 'admin'); }); - // TODO: we need to fix this test - // eslint-disable-next-line ban/ban - xit('should not hang the app also if teh logout is missing', (done) => { + it('should not hang the app also if the logout is missing', (done) => { + jest.spyOn(window, 'document', 'get').mockReturnValueOnce(undefined); oauth2Mock.get200Response(); const oauth2Auth = new Oauth2Auth(