mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ACA-1921] automate tests for Create folder from template (#1320)
* automate tests for Create folder from template added unit test for exclusion of folder links * fix stupid mistake
This commit is contained in:
committed by
Cilibiu Bogdan
parent
1eab186340
commit
2733c69c9a
@@ -150,7 +150,7 @@ describe('NodeTemplateService', () => {
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
it('should return false if row is a `link` nodeType', () => {
|
||||
it('should return false if row is a `filelink` nodeType', () => {
|
||||
spyOn(
|
||||
alfrescoApiService.getInstance().nodes,
|
||||
'getNodeInfo'
|
||||
@@ -174,6 +174,30 @@ describe('NodeTemplateService', () => {
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
it('should return false if row is a `folderlink` nodeType', () => {
|
||||
spyOn(
|
||||
alfrescoApiService.getInstance().nodes,
|
||||
'getNodeInfo'
|
||||
).and.returnValue(
|
||||
of({
|
||||
id: 'templates-folder-id',
|
||||
path: {
|
||||
elements: [],
|
||||
name: '/Company Home/Data Dictionary'
|
||||
}
|
||||
})
|
||||
);
|
||||
spyOn(dialog, 'open');
|
||||
|
||||
nodeTemplateService.selectTemplateDialog(fileTemplateConfig);
|
||||
|
||||
expect(
|
||||
dialog.open['calls'].argsFor(0)[1].data.rowFilter({
|
||||
node: { entry: { nodeType: 'app:folderlink' } }
|
||||
})
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
describe('File templates', () => {
|
||||
it('should return false if selected node is not a file', () => {
|
||||
spyOn(
|
||||
|
||||
Reference in New Issue
Block a user