mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
fix tests
This commit is contained in:
parent
f9210ba048
commit
3e0fd310c5
@ -101,7 +101,7 @@ describe('DocumentListService', () => {
|
|||||||
service.getFolder('fake-node-id').subscribe(e => {
|
service.getFolder('fake-node-id').subscribe(e => {
|
||||||
expect(jasmine.Ajax.requests.mostRecent().url)
|
expect(jasmine.Ajax.requests.mostRecent().url)
|
||||||
.toBe('http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/-root-/' +
|
.toBe('http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/-root-/' +
|
||||||
'children?include=path&relativePath=fake-node-id');
|
'children?include=path%2Cproperties&relativePath=fake-node-id');
|
||||||
expect(jasmine.Ajax.requests.mostRecent().method)
|
expect(jasmine.Ajax.requests.mostRecent().method)
|
||||||
.toBe('GET');
|
.toBe('GET');
|
||||||
done();
|
done();
|
||||||
@ -116,7 +116,7 @@ describe('DocumentListService', () => {
|
|||||||
service.getFolder('fake-node-id', {maxItems: 10}).subscribe(e => {
|
service.getFolder('fake-node-id', {maxItems: 10}).subscribe(e => {
|
||||||
expect(jasmine.Ajax.requests.mostRecent().url)
|
expect(jasmine.Ajax.requests.mostRecent().url)
|
||||||
.toBe('http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/-root-/' +
|
.toBe('http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/-root-/' +
|
||||||
'children?maxItems=10&include=path&relativePath=fake-node-id');
|
'children?maxItems=10&include=path%2Cproperties&relativePath=fake-node-id');
|
||||||
expect(jasmine.Ajax.requests.mostRecent().method)
|
expect(jasmine.Ajax.requests.mostRecent().method)
|
||||||
.toBe('GET');
|
.toBe('GET');
|
||||||
done();
|
done();
|
||||||
|
@ -69,7 +69,7 @@ export class DocumentListService {
|
|||||||
let nodeId = '-root-';
|
let nodeId = '-root-';
|
||||||
let params: any = {
|
let params: any = {
|
||||||
relativePath: folder,
|
relativePath: folder,
|
||||||
include: ['path','properties']
|
include: ['path', 'properties']
|
||||||
};
|
};
|
||||||
|
|
||||||
if (opts) {
|
if (opts) {
|
||||||
|
@ -353,7 +353,7 @@ describe('AlfrescoLogin', () => {
|
|||||||
expect(component.success).toBe(true);
|
expect(component.success).toBe(true);
|
||||||
expect(compiled.querySelector('#login-success')).toBeDefined();
|
expect(compiled.querySelector('#login-success')).toBeDefined();
|
||||||
expect(compiled.querySelector('#login-success').innerHTML).toEqual('LOGIN.MESSAGES.LOGIN-SUCCESS');
|
expect(compiled.querySelector('#login-success').innerHTML).toEqual('LOGIN.MESSAGES.LOGIN-SUCCESS');
|
||||||
expect(component.onSuccess.emit).toHaveBeenCalledWith(true);
|
expect(component.onSuccess.emit).toHaveBeenCalledWith({ token: true, username: 'fake-username', password: 'fake-password' });
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should emit onError event after the login has failed', () => {
|
it('should emit onError event after the login has failed', () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user