mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-08-07 17:48:27 +00:00
[ACA-213] Edit Offline - permissions (#911)
* edit offline action rules * unlock node error message * update extensions rules * lock unlock evaluators * LockNodeDirective over EditOfflineDirective * disable tests failing cause of unrelated bug * isUserWriteLockOwner over isUserWriteLock
This commit is contained in:
committed by
Denys Vuika
parent
f7ed576847
commit
913685eb14
@@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
import { ToggleEditOfflineComponent } from './toggle-edit-offline.component';
|
||||
import { EditOfflineDirective } from '../../../directives/edit-offline.directive';
|
||||
import { LockNodeDirective } from '../../../directives/lock-node.directive';
|
||||
import { setupTestBed, CoreModule } from '@alfresco/adf-core';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { of } from 'rxjs';
|
||||
@@ -44,7 +44,7 @@ describe('ToggleEditOfflineComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreModule],
|
||||
declarations: [ToggleEditOfflineComponent, EditOfflineDirective],
|
||||
declarations: [ToggleEditOfflineComponent, LockNodeDirective],
|
||||
providers: [
|
||||
{
|
||||
provide: Store,
|
||||
@@ -115,12 +115,12 @@ describe('ToggleEditOfflineComponent', () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it('should raise notification on error', () => {
|
||||
it('should raise notification on lock error', () => {
|
||||
component.selection = {
|
||||
entry: { name: 'test' }
|
||||
};
|
||||
|
||||
component.onError();
|
||||
component.onLockError();
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(dispatchSpy.calls.argsFor(0)).toEqual([
|
||||
@@ -129,4 +129,19 @@ describe('ToggleEditOfflineComponent', () => {
|
||||
})
|
||||
]);
|
||||
});
|
||||
|
||||
it('should raise notification on unlock error', () => {
|
||||
component.selection = {
|
||||
entry: { name: 'test' }
|
||||
};
|
||||
|
||||
component.onUnlockLockError();
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(dispatchSpy.calls.argsFor(0)).toEqual([
|
||||
new SnackbarErrorAction('APP.MESSAGES.ERRORS.UNLOCK_NODE', {
|
||||
fileName: 'test'
|
||||
})
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user