mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACA-1439] Resolve multi-select issues (#392)
* toolbar enhancements * code cleanup
This commit is contained in:
@@ -74,31 +74,31 @@ describe('PageComponent', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('firstSelectedDocument', () => {
|
||||
describe('selectedFile', () => {
|
||||
it('returns true if selected node is file', () => {
|
||||
const selection = [ { entry: { isFile: true } } ];
|
||||
component.setSelection(selection);
|
||||
expect(component.firstSelectedDocument).toBe(selection[0]);
|
||||
expect(component.selectedFile).toBe(selection[0]);
|
||||
});
|
||||
|
||||
it('returns false if selected node is folder', () => {
|
||||
const selection = [ { entry: { isFile: false, isFolder: true } } ];
|
||||
component.setSelection(selection);
|
||||
expect(component.firstSelectedDocument).toBeFalsy();
|
||||
expect(component.selectedFile).toBeFalsy();
|
||||
});
|
||||
});
|
||||
|
||||
describe('firstSelectedFolder', () => {
|
||||
describe('selectedFolder', () => {
|
||||
it('returns true if selected node is folder', () => {
|
||||
const selection = [ { entry: { isFile: false, isFolder: true } } ];
|
||||
component.setSelection(selection);
|
||||
expect(component.firstSelectedFolder).toBe(selection[0]);
|
||||
expect(component.selectedFolder).toBe(selection[0]);
|
||||
});
|
||||
|
||||
it('returns false if selected node is file', () => {
|
||||
const selection = [ { entry: { isFile: true, isFolder: false } } ];
|
||||
component.setSelection(selection);
|
||||
expect(component.firstSelectedFolder).toBeFalsy();
|
||||
expect(component.selectedFolder).toBeFalsy();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user