mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
AAE-23572 all builds but the extensions one
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
import assert from 'assert';
|
||||
import { AlfrescoApi, ContentAuth } from '../src';
|
||||
import { EcmAuthMock as AuthEcmMock } from '../test/mockObjects';
|
||||
import { EcmAuthMock as AuthEcmMock } from './mockObjects';
|
||||
|
||||
describe('Ecm Auth test', () => {
|
||||
const hostEcm = 'https://127.0.0.1:8080';
|
||||
|
@@ -18,6 +18,8 @@
|
||||
import assert from 'assert';
|
||||
import { AlfrescoApi, ContentApi, Oauth2Auth } from '../src';
|
||||
import { EcmAuthMock, OAuthMock } from './mockObjects';
|
||||
import { TextEncoder, TextDecoder } from 'util';
|
||||
Object.assign(global, { TextDecoder, TextEncoder });
|
||||
import jsdom from 'jsdom';
|
||||
|
||||
const { JSDOM } = jsdom;
|
||||
@@ -169,7 +171,6 @@ describe('Oauth2 test', () => {
|
||||
});
|
||||
|
||||
it('should refresh token when the login not use the implicitFlow ', function (done) {
|
||||
this.timeout(3000);
|
||||
oauth2Mock.get200Response();
|
||||
|
||||
const oauth2Auth = new Oauth2Auth(
|
||||
@@ -202,10 +203,9 @@ describe('Oauth2 test', () => {
|
||||
}, 600);
|
||||
|
||||
oauth2Auth.login('admin', 'admin');
|
||||
});
|
||||
}, 3000);
|
||||
|
||||
it('should not hang the app also if teh logout is missing', function (done) {
|
||||
this.timeout(3000);
|
||||
oauth2Mock.get200Response();
|
||||
|
||||
const oauth2Auth = new Oauth2Auth(
|
||||
@@ -237,7 +237,7 @@ describe('Oauth2 test', () => {
|
||||
}, 600);
|
||||
|
||||
oauth2Auth.login('admin', 'admin');
|
||||
});
|
||||
}, 3000);
|
||||
|
||||
it('should emit a token_issued event if login is ok ', (done) => {
|
||||
oauth2Mock.get200Response();
|
||||
@@ -426,7 +426,6 @@ describe('Oauth2 test', () => {
|
||||
// TODO: very flaky test, fails on different machines if running slow, might relate to `this.timeout`
|
||||
// eslint-disable-next-line ban/ban
|
||||
xit('should extend content session after oauth token refresh', function (done) {
|
||||
this.timeout(3000);
|
||||
|
||||
oauth2Mock.get200Response();
|
||||
authResponseMock.get200ValidTicket();
|
||||
@@ -464,9 +463,8 @@ describe('Oauth2 test', () => {
|
||||
});
|
||||
|
||||
alfrescoApi.login('admin', 'admin');
|
||||
this.timeout(3000);
|
||||
alfrescoApi.refreshToken();
|
||||
});
|
||||
}, 3000);
|
||||
|
||||
it('isLoggedIn should return true if the api is logged in', (done) => {
|
||||
oauth2Mock.get200Response();
|
||||
|
@@ -9,6 +9,6 @@
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"skipLibCheck": true,
|
||||
"skipDefaultLibCheck": true,
|
||||
"types": ["mocha"]
|
||||
"types": ["jest"]
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user