mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
code cleanup (#3210)
* code cleanup * rollback changes * remove dead code * remove debug app config * cleanup unused locales * no-unused-vars rule * test fixes and cleanup * remove unnecessary translate modules
This commit is contained in:
parent
19e31adbb9
commit
fd495f6e95
@ -110,7 +110,8 @@
|
||||
"@typescript-eslint/prefer-function-type": "error",
|
||||
"@typescript-eslint/triple-slash-reference": "error",
|
||||
"@typescript-eslint/unified-signatures": "error",
|
||||
"@typescript-eslint/no-unused-vars": "warn",
|
||||
"no-unused-vars": "off",
|
||||
"@typescript-eslint/no-unused-vars": "error",
|
||||
"@typescript-eslint/consistent-type-definitions": "error",
|
||||
"@typescript-eslint/dot-notation": "off",
|
||||
"@typescript-eslint/member-ordering": "off",
|
||||
|
@ -59,7 +59,7 @@ export class YourExtensionViewerComponent implements ViewerExtensionInterface {
|
||||
node: Node;
|
||||
|
||||
|
||||
....YOUR CUSTOM LOGIC
|
||||
// ....YOUR CUSTOM LOGIC
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -26,10 +26,10 @@ import { Locator, Page } from '@playwright/test';
|
||||
import { PlaywrightBase } from '../playwright-base';
|
||||
|
||||
export abstract class BaseComponent extends PlaywrightBase {
|
||||
private rootElement: string;
|
||||
private readonly rootElement: string;
|
||||
private overlayElement = this.page.locator('.cdk-overlay-backdrop-showing');
|
||||
|
||||
constructor(page: Page, rootElement: string) {
|
||||
protected constructor(page: Page, rootElement: string) {
|
||||
super(page);
|
||||
this.rootElement = rootElement;
|
||||
}
|
||||
|
@ -33,12 +33,12 @@ export interface NavigateOptions {
|
||||
remoteUrl?: string;
|
||||
}
|
||||
export abstract class BasePage extends PlaywrightBase {
|
||||
private pageUrl: string;
|
||||
private urlRequest: RegExp;
|
||||
private readonly pageUrl: string;
|
||||
private readonly urlRequest: RegExp;
|
||||
public snackBar: SnackBarComponent;
|
||||
public spinner: SpinnerComponent;
|
||||
|
||||
constructor(page: Page, pageUrl: string, urlRequest?: RegExp) {
|
||||
protected constructor(page: Page, pageUrl: string, urlRequest?: RegExp) {
|
||||
super(page);
|
||||
this.pageUrl = pageUrl;
|
||||
this.urlRequest = urlRequest;
|
||||
|
@ -29,7 +29,7 @@ export abstract class PlaywrightBase {
|
||||
public page: Page;
|
||||
public logger: LoggerLike;
|
||||
|
||||
constructor(page: Page) {
|
||||
protected constructor(page: Page) {
|
||||
this.page = page;
|
||||
this.logger = new GenericLogger(process.env.PLAYWRIGHT_CUSTOM_LOG_LEVEL);
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ describe('Locked Files - available actions : ', () => {
|
||||
|
||||
beforeAll(async () => {
|
||||
await adminApiActions.createUser({ username });
|
||||
userActions.login(username, username);
|
||||
await userActions.login(username, username);
|
||||
|
||||
parentId = await userApi.createFolder(parentName);
|
||||
|
||||
|
@ -45,7 +45,7 @@ describe('Edit offline', () => {
|
||||
|
||||
beforeAll(async () => {
|
||||
await adminApiActions.createUser({ username });
|
||||
userActions.login(username, username);
|
||||
await userActions.login(username, username);
|
||||
});
|
||||
|
||||
describe('on Personal Files', () => {
|
||||
@ -76,7 +76,7 @@ describe('Edit offline', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
userActions.login(username, username);
|
||||
await userActions.login(username, username);
|
||||
await userActions.deleteNodes([parentPFId]);
|
||||
});
|
||||
|
||||
|
@ -71,15 +71,15 @@ describe('Upload files', () => {
|
||||
it('[T14752064] Close the upload dialog ', async () => {
|
||||
await page.uploadFilesDialog.closeUploadButton.click();
|
||||
await page.uploadFilesDialog.uploadDialog.isPresent();
|
||||
await expect(await page.uploadFilesDialog.uploadDialog.isVisible()).toBe(false);
|
||||
expect(await page.uploadFilesDialog.uploadDialog.isVisible()).toBe(false);
|
||||
});
|
||||
|
||||
it('[T14752051] Minimize / maximize the upload dialog ', async () => {
|
||||
await page.uploadFilesDialog.minimizeButton.click();
|
||||
await expect(await page.uploadFilesDialog.uploadedFiles.waitNotVisible()).toBe(true);
|
||||
expect(await page.uploadFilesDialog.uploadedFiles.waitNotVisible()).toBe(true);
|
||||
|
||||
await page.uploadFilesDialog.maximizeButton.click();
|
||||
await expect(await page.uploadFilesDialog.uploadedFiles.waitVisible()).toBe(true);
|
||||
expect(await page.uploadFilesDialog.uploadedFiles.waitVisible()).toBe(true);
|
||||
});
|
||||
|
||||
it('[T14752053] Upload history is expunged on browser login/logout ', async () => {
|
||||
@ -87,12 +87,12 @@ describe('Upload files', () => {
|
||||
await loginPage.loginWith(username);
|
||||
const isUploadDialogVisible = await page.uploadFilesDialog.uploadDialog.isVisible();
|
||||
|
||||
await expect(isUploadDialogVisible).toBe(false);
|
||||
expect(isUploadDialogVisible).toBe(false);
|
||||
});
|
||||
|
||||
it('[T14752052] Upload dialog remains fixed in the browser when user performs other actions in parallel ', async () => {
|
||||
await expect(page.uploadFilesDialog.uploadDialog.isVisible()).toBe(true);
|
||||
expect(page.uploadFilesDialog.uploadDialog.isVisible()).toBe(true);
|
||||
await page.clickPersonalFiles();
|
||||
await expect(page.uploadFilesDialog.uploadDialog.isVisible()).toBe(true);
|
||||
expect(page.uploadFilesDialog.uploadDialog.isVisible()).toBe(true);
|
||||
});
|
||||
});
|
||||
|
@ -101,7 +101,7 @@ describe('Upload new version', () => {
|
||||
|
||||
beforeAll(async () => {
|
||||
await adminActions.createUser({ username });
|
||||
userActions.login(username, username);
|
||||
await userActions.login(username, username);
|
||||
|
||||
parentPFId = await apis.user.createFolder(parentPF);
|
||||
parentSFId = await apis.user.createFolder(parentSF);
|
||||
@ -111,7 +111,7 @@ describe('Upload new version', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
userActions.login(username, username);
|
||||
await userActions.login(username, username);
|
||||
await userActions.deleteNodes([parentPFId, parentSFId, parentRFId, parentFavId, parentSearchId]);
|
||||
});
|
||||
|
||||
@ -126,7 +126,7 @@ describe('Upload new version', () => {
|
||||
fileLockedSearch1Id = await apis.user.createFile(fileLockedSearch1, parentSearchId);
|
||||
fileLockedSearch2Id = await apis.user.createFile(fileLockedSearch2, parentSearchId);
|
||||
|
||||
userActions.lockNodes([fileLockedSearch1Id, fileLockedSearch2Id]);
|
||||
await userActions.lockNodes([fileLockedSearch1Id, fileLockedSearch2Id]);
|
||||
|
||||
await apis.user.search.waitForNodes(searchRandom, { expect: 6 });
|
||||
|
||||
|
@ -38,7 +38,7 @@ describe('General', () => {
|
||||
|
||||
describe('on session expire', () => {
|
||||
beforeAll(async () => {
|
||||
adminActions.login();
|
||||
await adminActions.login();
|
||||
folderId = (await adminActions.nodes.createFolder(folder)).entry.id;
|
||||
});
|
||||
|
||||
|
@ -253,7 +253,7 @@ describe('File / Folder properties', () => {
|
||||
await BrowserActions.click(page.toolbar.viewDetailsButton);
|
||||
await infoDrawer.waitForInfoDrawerToOpen();
|
||||
await infoDrawer.expandDetailsButton.click();
|
||||
await expect(await infoDrawer.expandedDetailsPermissionsTab.isPresent()).toBe(true, 'Permissions tab is not displayed');
|
||||
expect(await infoDrawer.expandedDetailsPermissionsTab.isPresent()).toBe(true, 'Permissions tab is not displayed');
|
||||
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.selectItem(parent);
|
||||
@ -262,7 +262,7 @@ describe('File / Folder properties', () => {
|
||||
const expectedSelectedTabTitle = 'permissions';
|
||||
const actualSelectedTabTitle = await infoDrawer.selectedTab.getText();
|
||||
|
||||
await expect(actualSelectedTabTitle.toLowerCase()).toEqual(expectedSelectedTabTitle);
|
||||
expect(actualSelectedTabTitle.toLowerCase()).toEqual(expectedSelectedTabTitle);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -96,10 +96,10 @@ describe('Favorites', () => {
|
||||
});
|
||||
|
||||
it('[C213226] displays the favorite files and folders', async () => {
|
||||
await expect(await dataTable.getRowsCount()).toEqual(4, 'Incorrect number of items displayed');
|
||||
await expect(await dataTable.isItemPresent(fileName1)).toBe(true, `${fileName1} not displayed`);
|
||||
await expect(await dataTable.isItemPresent(fileName2)).toBe(true, `${fileName2} not displayed`);
|
||||
await expect(await dataTable.isItemPresent(favFolderName)).toBe(true, `${favFolderName} not displayed`);
|
||||
expect(await dataTable.getRowsCount()).toEqual(4, 'Incorrect number of items displayed');
|
||||
expect(await dataTable.isItemPresent(fileName1)).toBe(true, `${fileName1} not displayed`);
|
||||
expect(await dataTable.isItemPresent(fileName2)).toBe(true, `${fileName2} not displayed`);
|
||||
expect(await dataTable.isItemPresent(favFolderName)).toBe(true, `${favFolderName} not displayed`);
|
||||
});
|
||||
|
||||
it(`[C213228] deleted favorite file does not appear`, async () => {
|
||||
@ -124,12 +124,12 @@ describe('Favorites', () => {
|
||||
|
||||
it('[C213650] Location column redirect - item in user Home', async () => {
|
||||
await dataTable.clickItemLocation(favFolderName);
|
||||
await expect(await breadcrumb.getAllItems()).toEqual(['Personal Files']);
|
||||
expect(await breadcrumb.getAllItems()).toEqual(['Personal Files']);
|
||||
});
|
||||
|
||||
it('[C280484] Location column redirect - file in folder', async () => {
|
||||
await dataTable.clickItemLocation(fileName2);
|
||||
await expect(await breadcrumb.getAllItems()).toEqual(['Personal Files', parentFolder]);
|
||||
expect(await breadcrumb.getAllItems()).toEqual(['Personal Files', parentFolder]);
|
||||
});
|
||||
|
||||
it('[C280485] Location column redirect - file in site', async () => {
|
||||
|
@ -124,7 +124,7 @@ describe('File Libraries', () => {
|
||||
const sitesList = await dataTable.getSitesNameAndVisibility();
|
||||
|
||||
for (const site of Object.keys(expectedSitesVisibility)) {
|
||||
await expect(sitesList[site]).toEqual(expectedSitesVisibility[site]);
|
||||
expect(sitesList[site]).toEqual(expectedSitesVisibility[site]);
|
||||
}
|
||||
});
|
||||
|
||||
@ -139,14 +139,14 @@ describe('File Libraries', () => {
|
||||
const sitesList = await dataTable.getSitesNameAndRole();
|
||||
|
||||
for (const site of Object.keys(expectedSitesRoles)) {
|
||||
await expect(sitesList[site]).toEqual(expectedSitesRoles[site]);
|
||||
expect(sitesList[site]).toEqual(expectedSitesRoles[site]);
|
||||
}
|
||||
});
|
||||
|
||||
it('[C217098] Site ID is displayed when two sites have the same name', async () => {
|
||||
const expectedSites = [`${siteName} (${siteId1})`, `${siteName} (${siteId2})`];
|
||||
const actualSites = await dataTable.getCellsContainingName(siteName);
|
||||
await expect(actualSites.sort()).toEqual(expectedSites.sort());
|
||||
expect(actualSites.sort()).toEqual(expectedSites.sort());
|
||||
});
|
||||
|
||||
it('[C217096] Tooltip for sites without description', async () => {
|
||||
|
@ -85,11 +85,11 @@ describe('Personal Files', () => {
|
||||
});
|
||||
|
||||
it('[C217143] has default sorted column', async () => {
|
||||
await expect(await dataTable.getSortedColumnHeaderText()).toBe('Name');
|
||||
expect(await dataTable.getSortedColumnHeaderText()).toBe('Name');
|
||||
});
|
||||
|
||||
it('[C213242] has user created content', async () => {
|
||||
await expect(await dataTable.isItemPresent(userFolder)).toBe(true, 'user folder not displayed');
|
||||
expect(await dataTable.isItemPresent(userFolder)).toBe(true, 'user folder not displayed');
|
||||
});
|
||||
|
||||
it('[C213244] navigates to folder', async () => {
|
||||
|
@ -119,7 +119,7 @@ describe('Recent Files', () => {
|
||||
|
||||
it('[C213176] Location column redirect - file in user Home', async () => {
|
||||
await dataTable.clickItemLocation(fileName2);
|
||||
await expect(await breadcrumb.getAllItems()).toEqual(['Personal Files']);
|
||||
expect(await breadcrumb.getAllItems()).toEqual(['Personal Files']);
|
||||
});
|
||||
|
||||
it('[C280486] Location column redirect - file in folder', async () => {
|
||||
|
@ -121,7 +121,7 @@ describe('Shared Files', () => {
|
||||
|
||||
it('[C213666] Location column redirect - file in user Home', async () => {
|
||||
await dataTable.clickItemLocation(file4User);
|
||||
await expect(await breadcrumb.getAllItems()).toEqual(['Personal Files']);
|
||||
expect(await breadcrumb.getAllItems()).toEqual(['Personal Files']);
|
||||
});
|
||||
|
||||
it('[C280490] Location column redirect - file in folder', async () => {
|
||||
|
@ -122,7 +122,7 @@ describe('Remember sorting', () => {
|
||||
firstElement: await documentListPage.dataTable.getFirstElementDetail('Name')
|
||||
};
|
||||
|
||||
await expect(expectedSortData).not.toEqual(initialSortState, 'Initial sort did not work');
|
||||
expect(expectedSortData).not.toEqual(initialSortState);
|
||||
|
||||
await browsingPage.clickFavorites();
|
||||
await browsingPage.clickPersonalFilesAndWait();
|
||||
@ -133,7 +133,7 @@ describe('Remember sorting', () => {
|
||||
firstElement: await documentListPage.dataTable.getFirstElementDetail('Name')
|
||||
};
|
||||
|
||||
await expect(actualSortData).toEqual(expectedSortData, 'Order is different - sorting was not retained');
|
||||
expect(actualSortData).toEqual(expectedSortData);
|
||||
});
|
||||
|
||||
it('[C261137] Size sort order is retained when user logs out and logs back in', async () => {
|
||||
@ -147,7 +147,7 @@ describe('Remember sorting', () => {
|
||||
firstElement: await documentListPage.dataTable.getFirstElementDetail('Name')
|
||||
};
|
||||
|
||||
await expect(expectedSortData).not.toEqual(initialSortState, 'Initial sort did not work');
|
||||
expect(expectedSortData).not.toEqual(initialSortState);
|
||||
|
||||
await browsingPage.signOut();
|
||||
await loginPage.loginWith(user1);
|
||||
@ -158,7 +158,7 @@ describe('Remember sorting', () => {
|
||||
firstElement: await documentListPage.dataTable.getFirstElementDetail('Name')
|
||||
};
|
||||
|
||||
await expect(actualSortData).toEqual(expectedSortData, 'Order is different - sorting was not retained');
|
||||
expect(actualSortData).toEqual(expectedSortData);
|
||||
});
|
||||
|
||||
describe('Folder actions', () => {
|
||||
@ -196,7 +196,7 @@ describe('Remember sorting', () => {
|
||||
firstElement: await documentListPage.dataTable.getFirstElementDetail('Name')
|
||||
};
|
||||
|
||||
await expect(actualSortData).toEqual(expectedSortData, 'Order is different - sorting was not retained');
|
||||
expect(actualSortData).toEqual(expectedSortData);
|
||||
});
|
||||
|
||||
it('[C261139] Sort order is retained when moving a file', async () => {
|
||||
@ -218,7 +218,7 @@ describe('Remember sorting', () => {
|
||||
firstElement: await documentListPage.dataTable.getFirstElementDetail('Name')
|
||||
};
|
||||
|
||||
await expect(actualSortData).toEqual(expectedSortData, 'Order is different - sorting was not retained');
|
||||
expect(actualSortData).toEqual(expectedSortData);
|
||||
});
|
||||
});
|
||||
|
||||
@ -243,7 +243,7 @@ describe('Remember sorting', () => {
|
||||
firstElement: await documentListPage.dataTable.getFirstElementDetail('Name')
|
||||
};
|
||||
|
||||
await expect(actualSortData).toEqual(expectedSortData, 'Order is different - sorting was not retained');
|
||||
expect(actualSortData).toEqual(expectedSortData);
|
||||
});
|
||||
|
||||
it('[C261153] Sort order should be remembered separately on each list view', async () => {
|
||||
@ -268,7 +268,7 @@ describe('Remember sorting', () => {
|
||||
firstElement: await documentListPage.dataTable.getFirstElementDetail('Name')
|
||||
};
|
||||
|
||||
await expect(favouritesSortData).not.toEqual(personalFilesSortData, 'Order is the same - sorting was retained');
|
||||
expect(favouritesSortData).not.toEqual(personalFilesSortData);
|
||||
|
||||
await browsingPage.clickPersonalFilesAndWait();
|
||||
|
||||
@ -278,7 +278,7 @@ describe('Remember sorting', () => {
|
||||
firstElement: await documentListPage.dataTable.getFirstElementDetail('Name')
|
||||
};
|
||||
|
||||
await expect(personalFilesSortDataAfterFavSort).toEqual(personalFilesSortData, 'Order is different - sorting was not retained');
|
||||
expect(personalFilesSortDataAfterFavSort).toEqual(personalFilesSortData);
|
||||
});
|
||||
|
||||
it('[C261147] Sort order is retained when user changes the page from pagination', async () => {
|
||||
@ -300,7 +300,7 @@ describe('Remember sorting', () => {
|
||||
firstElement: await documentListPage.dataTable.getFirstElementDetail('Name')
|
||||
};
|
||||
|
||||
await expect(currentPersonalFilesSortDataPage2).toEqual(expectedPersonalFilesSortDataPage2, 'Order is different- sorting was not retained');
|
||||
expect(currentPersonalFilesSortDataPage2).toEqual(expectedPersonalFilesSortDataPage2);
|
||||
|
||||
await dataTable.sortBy('Name', 'desc');
|
||||
await dataTable.waitForFirstElementToChange(currentPersonalFilesSortDataPage2.firstElement);
|
||||
@ -318,7 +318,7 @@ describe('Remember sorting', () => {
|
||||
firstElement: await documentListPage.dataTable.getFirstElementDetail('Name')
|
||||
};
|
||||
|
||||
await expect(expectedPersonalFilesSortDataPage2).toEqual(currentPersonalFilesSortDataPage2, 'Order is different - sorting was not retained');
|
||||
expect(expectedPersonalFilesSortDataPage2).toEqual(currentPersonalFilesSortDataPage2);
|
||||
});
|
||||
|
||||
it('[C261150] Sort order is not retained between different users', async () => {
|
||||
@ -341,7 +341,7 @@ describe('Remember sorting', () => {
|
||||
firstElement: await documentListPage.dataTable.getFirstElementDetail('Name')
|
||||
};
|
||||
|
||||
await expect(actualSortData).not.toEqual(expectedSortData, 'Order is the same - sorting was retained');
|
||||
expect(actualSortData).not.toEqual(expectedSortData);
|
||||
|
||||
await browsingPage.signOut();
|
||||
});
|
||||
|
@ -476,16 +476,6 @@
|
||||
"CANCEL": "إلغاء",
|
||||
"UPLOAD": "تحميل"
|
||||
},
|
||||
"FORM": {
|
||||
"SUBTITLE": "ما مستوى التغييرات التي تم إجراؤها على هذا الإصدار؟",
|
||||
"VERSION": {
|
||||
"MINOR": "ثانوية (#.1)",
|
||||
"MAJOR": "رئيسية (2.0)"
|
||||
},
|
||||
"COMMENT": {
|
||||
"PLACEHOLDER": "أضف ملاحظات تصف ما تم تغييره"
|
||||
}
|
||||
},
|
||||
"SELECTION": {
|
||||
"EMPTY": "يرجى اختيار مستند للاطلاع على إصداراته.",
|
||||
"NO_PERMISSION": "ليس لديك إذن لإدارة إصدارات هذا المحتوى."
|
||||
@ -496,7 +486,7 @@
|
||||
},
|
||||
"INFO_PANEL": {
|
||||
"TABS": {
|
||||
|
||||
|
||||
},
|
||||
"DETAILS": "التفاصيل"
|
||||
},
|
||||
@ -657,4 +647,4 @@
|
||||
"BASELINE-LOCK-24PX": "ملف مؤمن"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -476,16 +476,6 @@
|
||||
"CANCEL": "Zrušit",
|
||||
"UPLOAD": "Odeslat"
|
||||
},
|
||||
"FORM": {
|
||||
"SUBTITLE": "Jaká úroveň změn proběhla v této verzi?",
|
||||
"VERSION": {
|
||||
"MINOR": "Menší (x.1)",
|
||||
"MAJOR": "Hlavní (2.0)"
|
||||
},
|
||||
"COMMENT": {
|
||||
"PLACEHOLDER": "Přidejte poznámky popisující dané změny"
|
||||
}
|
||||
},
|
||||
"SELECTION": {
|
||||
"EMPTY": "Zvolte dokument, u kterého chcete vidět jeho verze.",
|
||||
"NO_PERMISSION": "Nemáte potřebná oprávnění pro správu verzí tohoto obsahu."
|
||||
@ -496,7 +486,7 @@
|
||||
},
|
||||
"INFO_PANEL": {
|
||||
"TABS": {
|
||||
|
||||
|
||||
},
|
||||
"DETAILS": "Podrobnosti"
|
||||
},
|
||||
@ -657,4 +647,4 @@
|
||||
"BASELINE-LOCK-24PX": "uzamčený soubor"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -476,16 +476,6 @@
|
||||
"CANCEL": "Annuller",
|
||||
"UPLOAD": "Upload"
|
||||
},
|
||||
"FORM": {
|
||||
"SUBTITLE": "Hvilket niveau af ændringer er foretaget i denne version?",
|
||||
"VERSION": {
|
||||
"MINOR": "Mindre (#.1)",
|
||||
"MAJOR": "Større (2.0)"
|
||||
},
|
||||
"COMMENT": {
|
||||
"PLACEHOLDER": "Tilføj noter, der beskriver ændringerne"
|
||||
}
|
||||
},
|
||||
"SELECTION": {
|
||||
"EMPTY": "Vælg et dokument for at se versionerne af dokumentet.",
|
||||
"NO_PERMISSION": "Du har ikke tilladelse til at administrere versionerne af dette indhold."
|
||||
@ -496,7 +486,7 @@
|
||||
},
|
||||
"INFO_PANEL": {
|
||||
"TABS": {
|
||||
|
||||
|
||||
},
|
||||
"DETAILS": "Detaljer"
|
||||
},
|
||||
@ -657,4 +647,4 @@
|
||||
"BASELINE-LOCK-24PX": "låst fil"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -476,16 +476,6 @@
|
||||
"CANCEL": "Abbrechen",
|
||||
"UPLOAD": "Hochladen"
|
||||
},
|
||||
"FORM": {
|
||||
"SUBTITLE": "Welches Ausmaß haben die an dieser Version vorgenommenen Änderungen?",
|
||||
"VERSION": {
|
||||
"MINOR": "Nebenversion (x.1)",
|
||||
"MAJOR": "Hauptversion (2.0)"
|
||||
},
|
||||
"COMMENT": {
|
||||
"PLACEHOLDER": "Fügen Sie eine Beschreibung der Änderungen hinzu"
|
||||
}
|
||||
},
|
||||
"SELECTION": {
|
||||
"EMPTY": "Wählen Sie ein Dokument aus, um die Versionen davon anzuzeigen.",
|
||||
"NO_PERMISSION": "Sie verfügen nicht über die nötigen Benutzerrechte, um Versionen dieser Inhalte anzuzeigen."
|
||||
@ -496,7 +486,7 @@
|
||||
},
|
||||
"INFO_PANEL": {
|
||||
"TABS": {
|
||||
|
||||
|
||||
},
|
||||
"DETAILS": "Details"
|
||||
},
|
||||
@ -657,4 +647,4 @@
|
||||
"BASELINE-LOCK-24PX": "gesperrte Datei"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -479,16 +479,6 @@
|
||||
"CANCEL": "Cancel",
|
||||
"UPLOAD": "Upload"
|
||||
},
|
||||
"FORM": {
|
||||
"SUBTITLE": "What level of changes were made to this version?",
|
||||
"VERSION": {
|
||||
"MINOR": "Minor (#.1)",
|
||||
"MAJOR": "Major (2.0)"
|
||||
},
|
||||
"COMMENT": {
|
||||
"PLACEHOLDER": "Add notes describing what changed"
|
||||
}
|
||||
},
|
||||
"SELECTION": {
|
||||
"EMPTY": "Please choose a document to see the versions of it.",
|
||||
"NO_PERMISSION": "You don't have permission to manage the versions of this content."
|
||||
|
@ -476,16 +476,6 @@
|
||||
"CANCEL": "Cancelar",
|
||||
"UPLOAD": "Cargar"
|
||||
},
|
||||
"FORM": {
|
||||
"SUBTITLE": "¿Qué nivel de cambios se hicieron a esta versión?",
|
||||
"VERSION": {
|
||||
"MINOR": "Menor (#.1)",
|
||||
"MAJOR": "Mayor (2.0)"
|
||||
},
|
||||
"COMMENT": {
|
||||
"PLACEHOLDER": "Añadir notas describiendo lo que se cambió"
|
||||
}
|
||||
},
|
||||
"SELECTION": {
|
||||
"EMPTY": "Por favor, seleccione un documento para ver sus versiones.",
|
||||
"NO_PERMISSION": "No tiene permiso para gestionar las versiones de este contenido."
|
||||
@ -496,7 +486,7 @@
|
||||
},
|
||||
"INFO_PANEL": {
|
||||
"TABS": {
|
||||
|
||||
|
||||
},
|
||||
"DETAILS": "Detalles"
|
||||
},
|
||||
@ -657,4 +647,4 @@
|
||||
"BASELINE-LOCK-24PX": "fichero bloqueado"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -476,16 +476,6 @@
|
||||
"CANCEL": "Peruuta",
|
||||
"UPLOAD": "Lataa"
|
||||
},
|
||||
"FORM": {
|
||||
"SUBTITLE": "Millainen muutos tähän versioon tehtiin?",
|
||||
"VERSION": {
|
||||
"MINOR": "Vähäinen (#.1)",
|
||||
"MAJOR": "Merkittävä (2.0)"
|
||||
},
|
||||
"COMMENT": {
|
||||
"PLACEHOLDER": "Lisää muutosta koskevia tietoja"
|
||||
}
|
||||
},
|
||||
"SELECTION": {
|
||||
"EMPTY": "Jos haluat nähdä asiakirjan versiot, valitse haluamasi asiakirja.",
|
||||
"NO_PERMISSION": "Sinulla ei ole oikeuksia hallita tämän sisällön versioita."
|
||||
@ -496,7 +486,7 @@
|
||||
},
|
||||
"INFO_PANEL": {
|
||||
"TABS": {
|
||||
|
||||
|
||||
},
|
||||
"DETAILS": "Tiedot"
|
||||
},
|
||||
@ -657,4 +647,4 @@
|
||||
"BASELINE-LOCK-24PX": "tiedosto lukittu"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -476,16 +476,6 @@
|
||||
"CANCEL": "Annuler",
|
||||
"UPLOAD": "Importer"
|
||||
},
|
||||
"FORM": {
|
||||
"SUBTITLE": "Quel type de changements ont été apportés à cette version ?",
|
||||
"VERSION": {
|
||||
"MINOR": "Mineure (#.1)",
|
||||
"MAJOR": "Majeure (2.0)"
|
||||
},
|
||||
"COMMENT": {
|
||||
"PLACEHOLDER": "Ajouter des commentaires décrivant les changements"
|
||||
}
|
||||
},
|
||||
"SELECTION": {
|
||||
"EMPTY": "Choisissez un document pour en voir les versions.",
|
||||
"NO_PERMISSION": "Vous n'êtes pas autorisé(e) à gérer les versions de ce contenu."
|
||||
@ -496,7 +486,7 @@
|
||||
},
|
||||
"INFO_PANEL": {
|
||||
"TABS": {
|
||||
|
||||
|
||||
},
|
||||
"DETAILS": "Détails"
|
||||
},
|
||||
@ -657,4 +647,4 @@
|
||||
"BASELINE-LOCK-24PX": "fichier verrouillé"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -476,16 +476,6 @@
|
||||
"CANCEL": "Annulla",
|
||||
"UPLOAD": "Carica"
|
||||
},
|
||||
"FORM": {
|
||||
"SUBTITLE": "Qual è il livello delle modifiche apportate a questa versione?",
|
||||
"VERSION": {
|
||||
"MINOR": "Minore (x.1)",
|
||||
"MAJOR": "Maggiore (2.0)"
|
||||
},
|
||||
"COMMENT": {
|
||||
"PLACEHOLDER": "Aggiungere note per descrivere le modifiche"
|
||||
}
|
||||
},
|
||||
"SELECTION": {
|
||||
"EMPTY": "Selezionare un documento per vedere le versioni.",
|
||||
"NO_PERMISSION": "Non si dispone dell'autorizzazione per gestire le versioni del contenuto."
|
||||
@ -496,7 +486,7 @@
|
||||
},
|
||||
"INFO_PANEL": {
|
||||
"TABS": {
|
||||
|
||||
|
||||
},
|
||||
"DETAILS": "Dettagli"
|
||||
},
|
||||
@ -657,4 +647,4 @@
|
||||
"BASELINE-LOCK-24PX": "File bloccato"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -476,16 +476,6 @@
|
||||
"CANCEL": "キャンセル",
|
||||
"UPLOAD": "アップロード"
|
||||
},
|
||||
"FORM": {
|
||||
"SUBTITLE": "このバージョンに加えた変更はどのレベルですか?",
|
||||
"VERSION": {
|
||||
"MINOR": "マイナー (#.1)",
|
||||
"MAJOR": "メジャー (2.0)"
|
||||
},
|
||||
"COMMENT": {
|
||||
"PLACEHOLDER": "変更内容の説明を追加してください"
|
||||
}
|
||||
},
|
||||
"SELECTION": {
|
||||
"EMPTY": "バージョンを表示する文書を選択してください。",
|
||||
"NO_PERMISSION": "このコンテンツのバージョンを管理するための権限がありません。"
|
||||
@ -496,7 +486,7 @@
|
||||
},
|
||||
"INFO_PANEL": {
|
||||
"TABS": {
|
||||
|
||||
|
||||
},
|
||||
"DETAILS": "詳細"
|
||||
},
|
||||
@ -657,4 +647,4 @@
|
||||
"BASELINE-LOCK-24PX": "ロックされているファイル"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -476,16 +476,6 @@
|
||||
"CANCEL": "Avbryt",
|
||||
"UPLOAD": "Last opp"
|
||||
},
|
||||
"FORM": {
|
||||
"SUBTITLE": "Hvor omfattende endringer ble gjort i denne versjonen?",
|
||||
"VERSION": {
|
||||
"MINOR": "Små (#.1)",
|
||||
"MAJOR": "Store (2.0)"
|
||||
},
|
||||
"COMMENT": {
|
||||
"PLACEHOLDER": "Legg til merknader som beskriver hva som er endret"
|
||||
}
|
||||
},
|
||||
"SELECTION": {
|
||||
"EMPTY": "Velg et dokument for å se versjonene av det.",
|
||||
"NO_PERMISSION": "Du har ikke tillatelse til å administrere versjonene av dette innholdet."
|
||||
@ -496,7 +486,7 @@
|
||||
},
|
||||
"INFO_PANEL": {
|
||||
"TABS": {
|
||||
|
||||
|
||||
},
|
||||
"DETAILS": "Detaljer"
|
||||
},
|
||||
@ -657,4 +647,4 @@
|
||||
"BASELINE-LOCK-24PX": "låst fil"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -476,16 +476,6 @@
|
||||
"CANCEL": "Annuleren",
|
||||
"UPLOAD": "Uploaden"
|
||||
},
|
||||
"FORM": {
|
||||
"SUBTITLE": "Welk niveau wijzigingen zijn in deze versie aangebracht?",
|
||||
"VERSION": {
|
||||
"MINOR": "Klein (#.1)",
|
||||
"MAJOR": "Belangrijk (2.0)"
|
||||
},
|
||||
"COMMENT": {
|
||||
"PLACEHOLDER": "Voeg opmerkingen toe met een beschrijving van wat er is gewijzigd"
|
||||
}
|
||||
},
|
||||
"SELECTION": {
|
||||
"EMPTY": "Kies een document om de versies ervan weer te geven.",
|
||||
"NO_PERMISSION": "U hebt geen rechten voor het beheren van de versies van deze content."
|
||||
@ -496,7 +486,7 @@
|
||||
},
|
||||
"INFO_PANEL": {
|
||||
"TABS": {
|
||||
|
||||
|
||||
},
|
||||
"DETAILS": "Gegevens"
|
||||
},
|
||||
@ -657,4 +647,4 @@
|
||||
"BASELINE-LOCK-24PX": "Vergrendeld bestand"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -476,16 +476,6 @@
|
||||
"CANCEL": "Anuluj",
|
||||
"UPLOAD": "Prześlij"
|
||||
},
|
||||
"FORM": {
|
||||
"SUBTITLE": "Jakiego poziomu zmiany zostały dokonane w tej wersji?",
|
||||
"VERSION": {
|
||||
"MINOR": "Drobne (#.1)",
|
||||
"MAJOR": "Istotne (2.0)"
|
||||
},
|
||||
"COMMENT": {
|
||||
"PLACEHOLDER": "Dodaj uwagi opisujące, co się zmieniło"
|
||||
}
|
||||
},
|
||||
"SELECTION": {
|
||||
"EMPTY": "Wybierz dokument, aby zobaczyć jego wersje.",
|
||||
"NO_PERMISSION": "Nie masz uprawnień do zarządzania wersjami tej zawartości."
|
||||
@ -496,7 +486,7 @@
|
||||
},
|
||||
"INFO_PANEL": {
|
||||
"TABS": {
|
||||
|
||||
|
||||
},
|
||||
"DETAILS": "Szczegóły"
|
||||
},
|
||||
@ -657,4 +647,4 @@
|
||||
"BASELINE-LOCK-24PX": "zablokowany plik"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -476,16 +476,6 @@
|
||||
"CANCEL": "Cancelar",
|
||||
"UPLOAD": "Carregar"
|
||||
},
|
||||
"FORM": {
|
||||
"SUBTITLE": "Qual foi o nível das mudanças feitas nesta versão?",
|
||||
"VERSION": {
|
||||
"MINOR": "Poucas (#.1)",
|
||||
"MAJOR": "Muitas (2.0)"
|
||||
},
|
||||
"COMMENT": {
|
||||
"PLACEHOLDER": "Inclua notas descrevendo o que mudou"
|
||||
}
|
||||
},
|
||||
"SELECTION": {
|
||||
"EMPTY": "Escolha um documento para ver suas versões.",
|
||||
"NO_PERMISSION": "Você não tem permissão para gerenciar as versões deste conteúdo."
|
||||
@ -496,7 +486,7 @@
|
||||
},
|
||||
"INFO_PANEL": {
|
||||
"TABS": {
|
||||
|
||||
|
||||
},
|
||||
"DETAILS": "Detalhes"
|
||||
},
|
||||
@ -657,4 +647,4 @@
|
||||
"BASELINE-LOCK-24PX": "arquivo bloqueado"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -476,16 +476,6 @@
|
||||
"CANCEL": "Отмена",
|
||||
"UPLOAD": "Загрузить"
|
||||
},
|
||||
"FORM": {
|
||||
"SUBTITLE": "Изменения какого уровня были выполнены в данной версии?",
|
||||
"VERSION": {
|
||||
"MINOR": "Незначительные (#.1)",
|
||||
"MAJOR": "Значительные (2.0)"
|
||||
},
|
||||
"COMMENT": {
|
||||
"PLACEHOLDER": "Добавьте комментарии с описанием изменений"
|
||||
}
|
||||
},
|
||||
"SELECTION": {
|
||||
"EMPTY": "Пожалуйста, выберите документ чтобы просмотреть его версии.",
|
||||
"NO_PERMISSION": "У вас нет разрешения на управление версиями этого контента."
|
||||
@ -496,7 +486,7 @@
|
||||
},
|
||||
"INFO_PANEL": {
|
||||
"TABS": {
|
||||
|
||||
|
||||
},
|
||||
"DETAILS": "Сведения"
|
||||
},
|
||||
@ -657,4 +647,4 @@
|
||||
"BASELINE-LOCK-24PX": "заблокированный файл"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -476,16 +476,6 @@
|
||||
"CANCEL": "Avbryt",
|
||||
"UPLOAD": "Ladda upp"
|
||||
},
|
||||
"FORM": {
|
||||
"SUBTITLE": "Vilken nivå på ändringarna har gjorts av den här versionen?",
|
||||
"VERSION": {
|
||||
"MINOR": "Smärre (#.1)",
|
||||
"MAJOR": "Större (2.0)"
|
||||
},
|
||||
"COMMENT": {
|
||||
"PLACEHOLDER": "Lägg till noteringar som beskriver vad som har ändrats"
|
||||
}
|
||||
},
|
||||
"SELECTION": {
|
||||
"EMPTY": "Välj ett dokument för att se versionerna för det.",
|
||||
"NO_PERMISSION": "Du har inte behörighet att hantera versionerna för det här innehållet."
|
||||
@ -496,7 +486,7 @@
|
||||
},
|
||||
"INFO_PANEL": {
|
||||
"TABS": {
|
||||
|
||||
|
||||
},
|
||||
"DETAILS": "Detaljer"
|
||||
},
|
||||
@ -657,4 +647,4 @@
|
||||
"BASELINE-LOCK-24PX": "låst fil"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -476,16 +476,6 @@
|
||||
"CANCEL": "取消",
|
||||
"UPLOAD": "上传"
|
||||
},
|
||||
"FORM": {
|
||||
"SUBTITLE": "对此版本进行了多大程度的变更?",
|
||||
"VERSION": {
|
||||
"MINOR": "次要 (#.1)",
|
||||
"MAJOR": "主要 (2.0)"
|
||||
},
|
||||
"COMMENT": {
|
||||
"PLACEHOLDER": "添加注释,描述变更内容"
|
||||
}
|
||||
},
|
||||
"SELECTION": {
|
||||
"EMPTY": "请选定一个文件去看它的版本。",
|
||||
"NO_PERMISSION": "您没有权限管理此内容的版本。"
|
||||
@ -496,7 +486,7 @@
|
||||
},
|
||||
"INFO_PANEL": {
|
||||
"TABS": {
|
||||
|
||||
|
||||
},
|
||||
"DETAILS": "详细信息"
|
||||
},
|
||||
@ -657,4 +647,4 @@
|
||||
"BASELINE-LOCK-24PX": "锁定的文件"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -31,13 +31,13 @@ import { AosEditOnlineService, IAosEditOnlineService } from '../aos-extension.se
|
||||
import { AosEffects } from './aos.effects';
|
||||
|
||||
class AosEditOnlineServiceMock implements IAosEditOnlineService {
|
||||
onActionEditOnlineAos(_node: MinimalNodeEntryEntity): void {}
|
||||
onActionEditOnlineAos(): void {}
|
||||
}
|
||||
|
||||
describe('AosEffects', () => {
|
||||
let aosActions$: Observable<AosAction>;
|
||||
let effects: AosEffects;
|
||||
let aosEditOnlineServiceMock: AosEditOnlineServiceMock;
|
||||
let aosEditOnlineService: AosEditOnlineService;
|
||||
|
||||
beforeEach(() => {
|
||||
aosActions$ = new Observable<AosAction>();
|
||||
@ -54,11 +54,11 @@ describe('AosEffects', () => {
|
||||
});
|
||||
|
||||
effects = TestBed.inject(AosEffects);
|
||||
aosEditOnlineServiceMock = TestBed.inject(AosEditOnlineService);
|
||||
aosEditOnlineService = TestBed.inject(AosEditOnlineService);
|
||||
});
|
||||
|
||||
it('should call onActionEditOnlineAos on AOS_ACTION', () => {
|
||||
const onActionEditOnlineAosSpy = spyOn(aosEditOnlineServiceMock, 'onActionEditOnlineAos');
|
||||
const onActionEditOnlineAosSpy = spyOn(aosEditOnlineService, 'onActionEditOnlineAos');
|
||||
|
||||
const payload = new MinimalNodeEntryEntity();
|
||||
const action = new AosAction(payload);
|
||||
|
@ -25,15 +25,7 @@
|
||||
import { HammerModule } from '@angular/platform-browser';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import {
|
||||
TRANSLATION_PROVIDER,
|
||||
CoreModule,
|
||||
AppConfigService,
|
||||
DebugAppConfigService,
|
||||
AuthGuardEcm,
|
||||
LanguagePickerComponent,
|
||||
NotificationHistoryComponent
|
||||
} from '@alfresco/adf-core';
|
||||
import { TRANSLATION_PROVIDER, CoreModule, AuthGuardEcm, LanguagePickerComponent, NotificationHistoryComponent } from '@alfresco/adf-core';
|
||||
import {
|
||||
ContentModule,
|
||||
ContentVersionService,
|
||||
@ -42,7 +34,7 @@ import {
|
||||
LibraryStatusColumnComponent,
|
||||
TrashcanNameColumnComponent
|
||||
} from '@alfresco/adf-content-services';
|
||||
import { DocumentBasePageService, ExtensionsDataLoaderGuard, PageLayoutModule, RouterExtensionService, SharedModule } from '@alfresco/aca-shared';
|
||||
import { DocumentBasePageService, ExtensionsDataLoaderGuard, PageLayoutModule, SharedModule } from '@alfresco/aca-shared';
|
||||
import * as rules from '@alfresco/aca-shared/rules';
|
||||
|
||||
import { FilesComponent } from './components/files/files.component';
|
||||
@ -64,7 +56,6 @@ import { AppCommonModule } from './components/common/common.module';
|
||||
import { AppSearchInputModule } from './components/search/search-input.module';
|
||||
import { DocumentListCustomComponentsModule } from './components/dl-custom-components/document-list-custom-components.module';
|
||||
import { AppSearchResultsModule } from './components/search/search-results.module';
|
||||
import { AppNodeVersionModule } from './components/node-version/node-version.module';
|
||||
import { FavoritesComponent } from './components/favorites/favorites.component';
|
||||
import { RecentFilesComponent } from './components/recent-files/recent-files.component';
|
||||
import { SharedFilesComponent } from './components/shared-files/shared-files.component';
|
||||
@ -73,23 +64,7 @@ import { DetailsComponent } from './components/details/details.component';
|
||||
import { ContentUrlService } from './services/content-url.service';
|
||||
import { HomeComponent } from './components/home/home.component';
|
||||
|
||||
import { CommonModule, registerLocaleData } from '@angular/common';
|
||||
import localeFr from '@angular/common/locales/fr';
|
||||
import localeDe from '@angular/common/locales/de';
|
||||
import localeIt from '@angular/common/locales/it';
|
||||
import localeEs from '@angular/common/locales/es';
|
||||
import localeJa from '@angular/common/locales/ja';
|
||||
import localeNl from '@angular/common/locales/nl';
|
||||
import localePt from '@angular/common/locales/pt';
|
||||
import localeNb from '@angular/common/locales/nb';
|
||||
import localeRu from '@angular/common/locales/ru';
|
||||
import localeCh from '@angular/common/locales/zh';
|
||||
import localeAr from '@angular/common/locales/ar';
|
||||
import localeCs from '@angular/common/locales/cs';
|
||||
import localePl from '@angular/common/locales/pl';
|
||||
import localeFi from '@angular/common/locales/fi';
|
||||
import localeDa from '@angular/common/locales/da';
|
||||
import localeSv from '@angular/common/locales/sv';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { LocationLinkComponent } from './components/common/location-link/location-link.component';
|
||||
import { LogoutComponent } from './components/common/logout/logout.component';
|
||||
import { ToggleSharedComponent } from './components/common/toggle-shared/toggle-shared.component';
|
||||
@ -120,23 +95,6 @@ import { ContentManagementService } from './services/content-management.service'
|
||||
import { ShellLayoutComponent, SHELL_NAVBAR_MIN_WIDTH } from '@alfresco/adf-core/shell';
|
||||
import { UserMenuComponent } from './components/sidenav/user-menu/user-menu.component';
|
||||
|
||||
registerLocaleData(localeFr);
|
||||
registerLocaleData(localeDe);
|
||||
registerLocaleData(localeIt);
|
||||
registerLocaleData(localeEs);
|
||||
registerLocaleData(localeJa);
|
||||
registerLocaleData(localeNl);
|
||||
registerLocaleData(localePt);
|
||||
registerLocaleData(localeNb);
|
||||
registerLocaleData(localeRu);
|
||||
registerLocaleData(localeCh);
|
||||
registerLocaleData(localeAr);
|
||||
registerLocaleData(localeCs);
|
||||
registerLocaleData(localePl);
|
||||
registerLocaleData(localeFi);
|
||||
registerLocaleData(localeDa);
|
||||
registerLocaleData(localeSv);
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
@ -161,7 +119,6 @@ registerLocaleData(localeSv);
|
||||
DocumentListCustomComponentsModule,
|
||||
AppSearchInputModule,
|
||||
AppSearchResultsModule,
|
||||
AppNodeVersionModule,
|
||||
HammerModule,
|
||||
ViewProfileModule,
|
||||
AppTrashcanModule,
|
||||
@ -181,7 +138,6 @@ registerLocaleData(localeSv);
|
||||
UploadFilesDialogComponent
|
||||
],
|
||||
providers: [
|
||||
{ provide: AppConfigService, useClass: DebugAppConfigService },
|
||||
{ provide: ContentVersionService, useClass: ContentUrlService },
|
||||
{ provide: DocumentBasePageService, useExisting: ContentManagementService },
|
||||
{
|
||||
@ -196,7 +152,7 @@ registerLocaleData(localeSv);
|
||||
]
|
||||
})
|
||||
export class ContentServiceExtensionModule {
|
||||
constructor(public extensions: ExtensionService, public routeExtensionService: RouterExtensionService) {
|
||||
constructor(public extensions: ExtensionService) {
|
||||
extensions.setAuthGuards({
|
||||
'app.auth': AuthGuardEcm,
|
||||
'app.extensions.dataLoaderGuard': ExtensionsDataLoaderGuard
|
||||
|
@ -26,24 +26,17 @@ import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||
import { AppTestingModule } from '../../testing/app-testing.module';
|
||||
import { ContextMenuItemComponent } from './context-menu-item.component';
|
||||
import { ContextMenuModule } from './context-menu.module';
|
||||
import { TranslateModule, TranslateLoader, TranslateFakeLoader } from '@ngx-translate/core';
|
||||
import { AppExtensionService } from '@alfresco/aca-shared';
|
||||
|
||||
describe('ContextMenuComponent', () => {
|
||||
let fixture: ComponentFixture<ContextMenuItemComponent>;
|
||||
let component: ContextMenuItemComponent;
|
||||
let extensionsService;
|
||||
let extensionsService: AppExtensionService;
|
||||
let contextItem;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
AppTestingModule,
|
||||
ContextMenuModule,
|
||||
TranslateModule.forRoot({
|
||||
loader: { provide: TranslateLoader, useClass: TranslateFakeLoader }
|
||||
})
|
||||
],
|
||||
imports: [AppTestingModule, ContextMenuModule],
|
||||
providers: [AppExtensionService]
|
||||
});
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Injectable, Injector, ComponentRef } from '@angular/core';
|
||||
import { ComponentRef, Injectable, Injector } from '@angular/core';
|
||||
import { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';
|
||||
import { ComponentPortal } from '@angular/cdk/portal';
|
||||
import { ContextMenuOverlayRef } from './context-menu-overlay';
|
||||
@ -97,7 +97,7 @@ export class ContextMenuService {
|
||||
}
|
||||
]);
|
||||
|
||||
const overlayConfig = new OverlayConfig({
|
||||
return new OverlayConfig({
|
||||
hasBackdrop: config.hasBackdrop,
|
||||
backdropClass: config.backdropClass,
|
||||
panelClass: config.panelClass,
|
||||
@ -105,7 +105,5 @@ export class ContextMenuService {
|
||||
positionStrategy,
|
||||
direction: this.direction
|
||||
});
|
||||
|
||||
return overlayConfig;
|
||||
}
|
||||
}
|
||||
|
@ -24,26 +24,34 @@
|
||||
|
||||
import { CreateMenuComponent } from './create-menu.component';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { CoreModule } from '@alfresco/adf-core';
|
||||
import { AppCreateMenuModule } from './create-menu.module';
|
||||
import { OverlayContainer, OverlayModule } from '@angular/cdk/overlay';
|
||||
import { AppExtensionService } from '@alfresco/aca-shared';
|
||||
import { ContentActionType } from '@alfresco/adf-extensions';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { AppTestingModule } from '../../testing/app-testing.module';
|
||||
import { MatMenuModule } from '@angular/material/menu';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { of } from 'rxjs';
|
||||
import { getContentActionRef } from '../../testing/content-action-ref';
|
||||
import { ContentActionRef, ContentActionType } from '@alfresco/adf-extensions';
|
||||
|
||||
describe('CreateMenuComponent', () => {
|
||||
let fixture: ComponentFixture<CreateMenuComponent>;
|
||||
let extensionService: AppExtensionService;
|
||||
let getCreateActionsSpy: jasmine.Spy;
|
||||
|
||||
const getContentActionRef = (): ContentActionRef => ({
|
||||
id: 'id',
|
||||
type: ContentActionType.button,
|
||||
title: 'ACTION_TITLE',
|
||||
disabled: false,
|
||||
actions: {
|
||||
click: 'ACTION_CLICK'
|
||||
}
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [AppTestingModule, CoreModule.forRoot(), AppCreateMenuModule, OverlayModule, MatMenuModule, MatButtonModule]
|
||||
imports: [AppTestingModule, AppCreateMenuModule, OverlayModule, MatMenuModule, MatButtonModule]
|
||||
});
|
||||
|
||||
extensionService = TestBed.inject(AppExtensionService);
|
||||
|
@ -27,7 +27,7 @@ import { AppTestingModule } from '../../testing/app-testing.module';
|
||||
import { DetailsComponent } from './details.component';
|
||||
import { MetadataTabComponent } from '../info-drawer/metadata-tab/metadata-tab.component';
|
||||
import { CommentsTabComponent } from '../info-drawer/comments-tab/comments-tab.component';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { of, Subject } from 'rxjs';
|
||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { Store } from '@ngrx/store';
|
||||
@ -36,16 +36,14 @@ import { AppExtensionService } from '@alfresco/adf-extensions';
|
||||
import { ContentApiService } from '@alfresco/aca-shared';
|
||||
import { SetSelectedNodesAction } from '@alfresco/aca-shared/store';
|
||||
import { NodeEntry } from '@alfresco/js-api';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
|
||||
describe('DetailsComponent', () => {
|
||||
let component: DetailsComponent;
|
||||
let fixture: ComponentFixture<DetailsComponent>;
|
||||
let contentApiService: ContentApiService;
|
||||
let store;
|
||||
const router: any = {
|
||||
url: '',
|
||||
navigate: jasmine.createSpy('navigate')
|
||||
};
|
||||
let store: Store;
|
||||
|
||||
const mockStream = new Subject();
|
||||
const storeMock = {
|
||||
dispatch: jasmine.createSpy('dispatch'),
|
||||
@ -59,10 +57,7 @@ describe('DetailsComponent', () => {
|
||||
providers: [
|
||||
ContentManagementService,
|
||||
AppExtensionService,
|
||||
{
|
||||
provide: Router,
|
||||
useValue: router
|
||||
},
|
||||
RouterTestingModule,
|
||||
{ provide: Store, useValue: storeMock },
|
||||
{
|
||||
provide: ActivatedRoute,
|
||||
|
@ -26,13 +26,13 @@ import { CustomNameColumnComponent } from './name-column.component';
|
||||
import { DocumentListCustomComponentsModule } from '../document-list-custom-components.module';
|
||||
import { Actions } from '@ngrx/effects';
|
||||
import { StoreModule } from '@ngrx/store';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { CoreModule } from '@alfresco/adf-core';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('CustomNameColumnComponent', () => {
|
||||
let fixture;
|
||||
let component;
|
||||
let fixture: ComponentFixture<CustomNameColumnComponent>;
|
||||
let component: CustomNameColumnComponent;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
|
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
import { HomeComponent } from './home.component';
|
||||
import { AppConfigService, AppConfigServiceMock, setupTestBed } from '@alfresco/adf-core';
|
||||
import { AppConfigService, AppConfigServiceMock } from '@alfresco/adf-core';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { Router } from '@angular/router';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
@ -34,12 +34,11 @@ describe('HomeComponent', () => {
|
||||
let fixture: ComponentFixture<HomeComponent>;
|
||||
let router: Router;
|
||||
|
||||
setupTestBed({
|
||||
imports: [HttpClientModule, RouterTestingModule],
|
||||
providers: [{ provide: AppConfigService, useClass: AppConfigServiceMock }]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientModule, RouterTestingModule],
|
||||
providers: [{ provide: AppConfigService, useClass: AppConfigServiceMock }]
|
||||
});
|
||||
fixture = TestBed.createComponent(HomeComponent);
|
||||
router = TestBed.inject(Router);
|
||||
appConfig = TestBed.inject(AppConfigService);
|
||||
|
@ -26,10 +26,10 @@ import { MetadataTabComponent } from './metadata-tab.component';
|
||||
import { Node } from '@alfresco/js-api';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { AppTestingModule } from '../../../testing/app-testing.module';
|
||||
import { AppConfigService, setupTestBed, CoreModule } from '@alfresco/adf-core';
|
||||
import { AppConfigService, CoreModule } from '@alfresco/adf-core';
|
||||
import { ContentMetadataModule } from '@alfresco/adf-content-services';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { SetInfoDrawerMetadataAspectAction, AppState } from '@alfresco/aca-shared/store';
|
||||
import { AppState, SetInfoDrawerMetadataAspectAction } from '@alfresco/aca-shared/store';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { AppExtensionService } from '@alfresco/aca-shared';
|
||||
|
||||
@ -46,9 +46,11 @@ describe('MetadataTabComponent', () => {
|
||||
custom: []
|
||||
};
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreModule, AppTestingModule, ContentMetadataModule],
|
||||
declarations: [MetadataTabComponent]
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CoreModule, AppTestingModule, ContentMetadataModule],
|
||||
declarations: [MetadataTabComponent]
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
@ -87,45 +89,37 @@ describe('MetadataTabComponent', () => {
|
||||
});
|
||||
|
||||
it('should return true if node is not locked and has update permission', () => {
|
||||
const node = {
|
||||
component.node = {
|
||||
isLocked: false,
|
||||
allowableOperations: ['update']
|
||||
} as Node;
|
||||
|
||||
component.node = node;
|
||||
expect(component.canUpdateNode).toBe(true);
|
||||
});
|
||||
|
||||
it('should return false if node is locked', () => {
|
||||
const node = {
|
||||
component.node = {
|
||||
isLocked: true,
|
||||
allowableOperations: ['update']
|
||||
} as Node;
|
||||
|
||||
component.node = node;
|
||||
expect(component.canUpdateNode).toBe(false);
|
||||
});
|
||||
|
||||
it('should return false if node has no update permission', () => {
|
||||
const node = {
|
||||
component.node = {
|
||||
isLocked: false,
|
||||
allowableOperations: ['other']
|
||||
} as Node;
|
||||
|
||||
component.node = node;
|
||||
expect(component.canUpdateNode).toBe(false);
|
||||
});
|
||||
|
||||
it('should return false if node has read only property', () => {
|
||||
const node = {
|
||||
component.node = {
|
||||
isLocked: false,
|
||||
allowableOperations: ['update'],
|
||||
properties: {
|
||||
'cm:lockType': 'WRITE_LOCK'
|
||||
}
|
||||
} as Node;
|
||||
|
||||
component.node = node;
|
||||
expect(component.canUpdateNode).toBe(false);
|
||||
});
|
||||
});
|
||||
|
@ -1,27 +0,0 @@
|
||||
<form novalidate [formGroup]="form" class="form">
|
||||
<p class="form__subtitle">
|
||||
{{ 'VERSION.FORM.SUBTITLE' | translate }}
|
||||
</p>
|
||||
|
||||
<mat-radio-group formControlName="version" class="form__version">
|
||||
<mat-radio-button
|
||||
class="form__version--option"
|
||||
color="primary"
|
||||
*ngFor="let option of versions"
|
||||
[attr.data-automation-id]="option.value"
|
||||
[value]="option.value"
|
||||
>
|
||||
{{ option.label | translate }}
|
||||
</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
|
||||
<mat-form-field class="form__comment">
|
||||
<textarea
|
||||
matInput
|
||||
placeholder="{{ 'VERSION.FORM.COMMENT.PLACEHOLDER' | translate }}"
|
||||
rows="1"
|
||||
autocomplete="off"
|
||||
formControlName="comment"
|
||||
></textarea>
|
||||
</mat-form-field>
|
||||
</form>
|
@ -1,21 +0,0 @@
|
||||
.app-node-version-form__container {
|
||||
display: flex;
|
||||
max-width: 400px;
|
||||
|
||||
.form__version {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
.form__version--option:last-child {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.form {
|
||||
width: 100%;
|
||||
padding: 0 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
@ -1,66 +0,0 @@
|
||||
/*!
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { AppNodeVersionFormComponent } from './node-version-form.component';
|
||||
import { setupTestBed, CoreModule } from '@alfresco/adf-core';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('AppNodeVersionFormComponent', () => {
|
||||
let fixture;
|
||||
let component;
|
||||
|
||||
setupTestBed({
|
||||
imports: [TranslateModule.forRoot(), CoreModule.forRoot(), NoopAnimationsModule],
|
||||
declarations: [AppNodeVersionFormComponent]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(AppNodeVersionFormComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should have minor version option selected', () => {
|
||||
const isSelected = fixture.debugElement.nativeElement.querySelectorAll('.form__version--option')[0].classList.contains('mat-radio-checked');
|
||||
|
||||
expect(isSelected).toBe(true);
|
||||
});
|
||||
|
||||
it('should emit form state on changes', () => {
|
||||
const formData = {
|
||||
comment: 'some text',
|
||||
version: true
|
||||
};
|
||||
spyOn(component.update, 'emit');
|
||||
|
||||
component.form.valueChanges.next(formData);
|
||||
expect(component.update.emit).toHaveBeenCalledWith(formData);
|
||||
});
|
||||
|
||||
it('form should have valid state upon initialization', () => {
|
||||
expect(component.form.valid).toBe(true);
|
||||
});
|
||||
});
|
@ -1,75 +0,0 @@
|
||||
/*!
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Component, OnDestroy, OnInit, ViewEncapsulation, Output, EventEmitter } from '@angular/core';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
|
||||
export interface VersionFormEntry {
|
||||
comment: string;
|
||||
version: boolean;
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'app-node-version-form',
|
||||
templateUrl: './node-version-form.component.html',
|
||||
styleUrls: ['./node-version-form.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
host: { class: 'app-node-version-form__container' },
|
||||
exportAs: 'nodeVersionForm'
|
||||
})
|
||||
export class AppNodeVersionFormComponent implements OnInit, OnDestroy {
|
||||
@Output() update: EventEmitter<VersionFormEntry> = new EventEmitter();
|
||||
|
||||
form: UntypedFormGroup;
|
||||
|
||||
private onDestroy$: Subject<boolean> = new Subject<boolean>();
|
||||
private versionOptions = [
|
||||
{ label: 'VERSION.FORM.VERSION.MINOR', value: false },
|
||||
{ label: 'VERSION.FORM.VERSION.MAJOR', value: true }
|
||||
];
|
||||
|
||||
constructor(private formBuilder: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.form = this.formBuilder.group({
|
||||
comment: [''],
|
||||
version: [this.versionOptions[0].value]
|
||||
});
|
||||
|
||||
this.form.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe((values: VersionFormEntry) => {
|
||||
this.update.emit(values);
|
||||
});
|
||||
}
|
||||
|
||||
get versions() {
|
||||
return this.versionOptions;
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.onDestroy$.next(true);
|
||||
this.onDestroy$.complete();
|
||||
}
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
/*!
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { AppNodeVersionFormComponent } from './node-version-form.component';
|
||||
import { MatDialogModule } from '@angular/material/dialog';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
|
||||
import { CoreModule } from '@alfresco/adf-core';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { MatRadioModule } from '@angular/material/radio';
|
||||
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
@NgModule({
|
||||
imports: [
|
||||
CoreModule,
|
||||
MatButtonModule,
|
||||
MatDialogModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
BrowserModule,
|
||||
CommonModule,
|
||||
MatRadioModule,
|
||||
MatFormFieldModule,
|
||||
MatInputModule
|
||||
],
|
||||
exports: [AppNodeVersionFormComponent],
|
||||
declarations: [AppNodeVersionFormComponent]
|
||||
})
|
||||
export class AppNodeVersionModule {}
|
@ -81,14 +81,13 @@ export class SearchLibrariesQueryBuilderService {
|
||||
buildQuery(): LibrarySearchQuery {
|
||||
const query = this.userQuery;
|
||||
if (query && query.length > 1) {
|
||||
const resultQuery = {
|
||||
return {
|
||||
term: query,
|
||||
opts: {
|
||||
skipCount: this.paging && this.paging.skipCount,
|
||||
maxItems: this.paging && this.paging.maxItems
|
||||
}
|
||||
};
|
||||
return resultQuery;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -25,7 +25,6 @@
|
||||
import { NodeEntry } from '@alfresco/js-api';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { CoreModule } from '@angular/flex-layout';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { AppTestingModule } from '../../../testing/app-testing.module';
|
||||
import { AppSearchResultsModule } from '../search-results.module';
|
||||
import { SearchResultsRowComponent } from './search-results-row.component';
|
||||
@ -45,7 +44,7 @@ describe('SearchResultsRowComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [TranslateModule.forRoot(), CoreModule, AppTestingModule, AppSearchResultsModule]
|
||||
imports: [CoreModule, AppTestingModule, AppSearchResultsModule]
|
||||
});
|
||||
|
||||
fixture = TestBed.createComponent(SearchResultsRowComponent);
|
||||
|
@ -31,7 +31,6 @@ import { NavigateToFolder, SnackbarErrorAction } from '@alfresco/aca-shared/stor
|
||||
import { Pagination, SearchRequest } from '@alfresco/js-api';
|
||||
import { SearchQueryBuilderService } from '@alfresco/adf-content-services';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { BehaviorSubject, Subject } from 'rxjs';
|
||||
import { AppTestingModule } from '../../../testing/app-testing.module';
|
||||
import { AppService } from '@alfresco/aca-shared';
|
||||
@ -50,7 +49,7 @@ describe('SearchComponent', () => {
|
||||
beforeEach(() => {
|
||||
params = new BehaviorSubject({ q: 'TYPE: "cm:folder" AND %28=cm: name: email OR cm: name: budget%29' });
|
||||
TestBed.configureTestingModule({
|
||||
imports: [TranslateModule.forRoot(), AppTestingModule, CoreModule.forRoot(), AppSearchResultsModule],
|
||||
imports: [AppTestingModule, CoreModule.forRoot(), AppSearchResultsModule],
|
||||
providers: [
|
||||
{
|
||||
provide: AppService,
|
||||
|
@ -26,7 +26,6 @@ import { ButtonMenuComponent } from './button-menu.component';
|
||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||
import { AppTestingModule } from '../../../testing/app-testing.module';
|
||||
import { Router } from '@angular/router';
|
||||
import { TranslateModule, TranslateLoader, TranslateFakeLoader } from '@ngx-translate/core';
|
||||
import { AppSidenavModule } from '../sidenav.module';
|
||||
|
||||
describe('ButtonMenuComponent', () => {
|
||||
@ -36,13 +35,7 @@ describe('ButtonMenuComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
AppTestingModule,
|
||||
AppSidenavModule,
|
||||
TranslateModule.forRoot({
|
||||
loader: { provide: TranslateLoader, useClass: TranslateFakeLoader }
|
||||
})
|
||||
]
|
||||
imports: [AppTestingModule, AppSidenavModule]
|
||||
});
|
||||
|
||||
fixture = TestBed.createComponent(ButtonMenuComponent);
|
||||
|
@ -26,7 +26,6 @@ import { ExpandMenuComponent } from './expand-menu.component';
|
||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||
import { AppTestingModule } from '../../../testing/app-testing.module';
|
||||
import { Router } from '@angular/router';
|
||||
import { TranslateModule, TranslateLoader, TranslateFakeLoader } from '@ngx-translate/core';
|
||||
import { AppSidenavModule } from '../sidenav.module';
|
||||
|
||||
describe('ExpandMenuComponent', () => {
|
||||
@ -36,13 +35,7 @@ describe('ExpandMenuComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
AppTestingModule,
|
||||
AppSidenavModule,
|
||||
TranslateModule.forRoot({
|
||||
loader: { provide: TranslateLoader, useClass: TranslateFakeLoader }
|
||||
})
|
||||
]
|
||||
imports: [AppTestingModule, AppSidenavModule]
|
||||
});
|
||||
|
||||
fixture = TestBed.createComponent(ExpandMenuComponent);
|
||||
|
@ -1,38 +0,0 @@
|
||||
/*!
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Component, Input } from '@angular/core';
|
||||
|
||||
/**
|
||||
* This wrapper is designated to be used with 'adf-dynamic-component'.
|
||||
* It forwards the dynamic component inputs to original sidenav.
|
||||
*/
|
||||
@Component({
|
||||
selector: 'aca-sidenav-wrapper',
|
||||
templateUrl: './sidenav-wrapper.component.html'
|
||||
})
|
||||
export class SidenavWrapperComponent {
|
||||
@Input()
|
||||
data: { mode?: 'collapsed' | 'expanded' } = {};
|
||||
}
|
@ -28,6 +28,7 @@ import { PeopleContentService } from '@alfresco/adf-content-services';
|
||||
import { AppTestingModule } from '../../../testing/app-testing.module';
|
||||
import { UserMenuComponent } from './user-menu.component';
|
||||
import { of } from 'rxjs';
|
||||
import { SharedToolbarModule } from '@alfresco/aca-shared';
|
||||
|
||||
describe('UserMenuComponent', () => {
|
||||
let component: UserMenuComponent;
|
||||
@ -106,7 +107,7 @@ describe('UserMenuComponent', () => {
|
||||
};
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [AppTestingModule],
|
||||
imports: [AppTestingModule, SharedToolbarModule],
|
||||
declarations: [UserMenuComponent],
|
||||
providers: [
|
||||
{ provide: AuthenticationService, useValue: authServiceStub },
|
||||
|
@ -25,7 +25,6 @@
|
||||
import { DocumentDisplayModeComponent } from './document-display-mode.component';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { CoreModule } from '@angular/flex-layout';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { AppTestingModule } from '../../../testing/app-testing.module';
|
||||
import { of } from 'rxjs';
|
||||
|
||||
@ -35,7 +34,7 @@ describe('DocumentDisplayModeComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [TranslateModule.forRoot(), CoreModule, AppTestingModule]
|
||||
imports: [CoreModule, AppTestingModule]
|
||||
});
|
||||
|
||||
fixture = TestBed.createComponent(DocumentDisplayModeComponent);
|
||||
|
@ -30,7 +30,6 @@ import { Store } from '@ngrx/store';
|
||||
import { AppTestingModule } from '../../../testing/app-testing.module';
|
||||
import { of } from 'rxjs';
|
||||
import { Router } from '@angular/router';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { AppHookService, ContentApiService } from '@alfresco/aca-shared';
|
||||
|
||||
describe('ToggleFavoriteLibraryComponent', () => {
|
||||
@ -46,7 +45,7 @@ describe('ToggleFavoriteLibraryComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [TranslateModule.forRoot(), CoreModule.forRoot(), AppTestingModule],
|
||||
imports: [CoreModule.forRoot(), AppTestingModule],
|
||||
declarations: [ToggleFavoriteLibraryComponent],
|
||||
providers: [
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import { ExtensionService } from '@alfresco/adf-extensions';
|
||||
import { CoreModule } from '@alfresco/adf-core';
|
||||
import { Router } from '@angular/router';
|
||||
import { of } from 'rxjs';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { AppTestingModule } from '../../../testing/app-testing.module';
|
||||
import { ContentDirectiveModule } from '@alfresco/adf-content-services';
|
||||
|
||||
@ -51,7 +50,7 @@ describe('ToggleFavoriteComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [TranslateModule.forRoot(), CoreModule.forRoot(), ContentDirectiveModule, AppTestingModule],
|
||||
imports: [CoreModule.forRoot(), ContentDirectiveModule, AppTestingModule],
|
||||
declarations: [ToggleFavoriteComponent],
|
||||
providers: [ExtensionService, { provide: Store, useValue: mockStore }, { provide: Router, useValue: mockRouter }]
|
||||
});
|
||||
|
@ -25,7 +25,6 @@
|
||||
import { ToggleInfoDrawerComponent } from './toggle-info-drawer.component';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { CoreModule } from '@angular/flex-layout';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { AppTestingModule } from '../../../testing/app-testing.module';
|
||||
import { Subject } from 'rxjs';
|
||||
import { Store } from '@ngrx/store';
|
||||
@ -40,7 +39,7 @@ describe('ToggleInfoDrawerComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [TranslateModule.forRoot(), CoreModule, AppTestingModule],
|
||||
imports: [CoreModule, AppTestingModule],
|
||||
providers: [{ provide: Store, useValue: storeMock }]
|
||||
});
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { CanActivate, ActivatedRouteSnapshot } from '@angular/router';
|
||||
import { CanActivate } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { AuthenticationService } from '@alfresco/adf-core';
|
||||
|
||||
@ -33,11 +33,11 @@ import { AuthenticationService } from '@alfresco/adf-core';
|
||||
export class ViewProfileRuleGuard implements CanActivate {
|
||||
constructor(private authService: AuthenticationService) {}
|
||||
|
||||
canActivate(_: ActivatedRouteSnapshot): Observable<boolean> | Promise<boolean> | boolean {
|
||||
canActivate(): Observable<boolean> | Promise<boolean> | boolean {
|
||||
return this.isEcmLoggedIn() || this.authService.isOauth();
|
||||
}
|
||||
|
||||
private isEcmLoggedIn() {
|
||||
private isEcmLoggedIn(): boolean {
|
||||
return this.authService.isEcmLoggedIn() || (this.authService.isECMProvider() && this.authService.isKerberosEnabled());
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,6 @@ import { MatDialogModule, MAT_DIALOG_DATA, MatDialogRef } from '@angular/materia
|
||||
import { Store } from '@ngrx/store';
|
||||
import { CreateFromTemplate } from '@alfresco/aca-shared/store';
|
||||
import { Node } from '@alfresco/js-api';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
const text = (length: number) => new Array(length).fill(Math.random().toString().substring(2, 3)).join('');
|
||||
|
||||
@ -52,7 +51,7 @@ describe('CreateFileFromTemplateDialogComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [TranslateModule.forRoot(), CoreModule.forRoot(), AppTestingModule, MatDialogModule],
|
||||
imports: [CoreModule.forRoot(), AppTestingModule, MatDialogModule],
|
||||
declarations: [CreateFromTemplateDialogComponent],
|
||||
providers: [
|
||||
{
|
||||
|
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
import { ContentServiceExtensionService } from './content-service-extension.service';
|
||||
import { AppConfigService, AppConfigServiceMock, setupTestBed } from '@alfresco/adf-core';
|
||||
import { AppConfigService, AppConfigServiceMock } from '@alfresco/adf-core';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { of } from 'rxjs';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
@ -32,12 +32,11 @@ describe('ContentServiceExtensionService', () => {
|
||||
let service: ContentServiceExtensionService;
|
||||
let appConfig: AppConfigService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [HttpClientModule],
|
||||
providers: [{ provide: AppConfigService, useClass: AppConfigServiceMock }]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientModule],
|
||||
providers: [{ provide: AppConfigService, useClass: AppConfigServiceMock }]
|
||||
});
|
||||
service = TestBed.inject(ContentServiceExtensionService);
|
||||
appConfig = TestBed.inject(AppConfigService);
|
||||
appConfig.config = Object.assign(appConfig.config, {
|
||||
|
@ -876,7 +876,7 @@ describe('NodeActionsService', () => {
|
||||
|
||||
it('should try to move children nodes of a folder to already existing folder with same name', () => {
|
||||
const parentFolderToMove = new TestNode('parent-folder', !isFile, 'conflicting-name');
|
||||
const moveNodeSpy = spyOn(documentListService, 'moveNode').and.callFake((nodeId: string, _targetParentId: string) => {
|
||||
const moveNodeSpy = spyOn(documentListService, 'moveNode').and.callFake((nodeId: string) => {
|
||||
if (nodeId === parentFolderToMove.entry.id) {
|
||||
return throwError(conflictError);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { Observable, Subject, of, zip, from } from 'rxjs';
|
||||
import { AlfrescoApiService, DataColumn, TranslationService, ThumbnailService } from '@alfresco/adf-core';
|
||||
import { AlfrescoApiService, TranslationService, ThumbnailService } from '@alfresco/adf-core';
|
||||
import {
|
||||
DocumentListService,
|
||||
ContentNodeSelectorComponent,
|
||||
@ -565,7 +565,7 @@ export class NodeActionsService {
|
||||
return !node.isFile && node.nodeType !== 'app:folderlink';
|
||||
}
|
||||
|
||||
private imageResolver(row: ShareDataRow, _: DataColumn): string | null {
|
||||
private imageResolver(row: ShareDataRow): string | null {
|
||||
const entry: MinimalNodeEntryEntity = row.node.entry;
|
||||
if (!this.contentService.hasAllowableOperations(entry, 'update')) {
|
||||
return this.thumbnailService.getMimeTypeIcon('disable/folder');
|
||||
|
@ -44,9 +44,9 @@ import { UploadService, FileModel } from '@alfresco/adf-content-services';
|
||||
|
||||
@Injectable()
|
||||
export class UploadEffects {
|
||||
private fileInput: HTMLInputElement;
|
||||
private folderInput: HTMLInputElement;
|
||||
private fileVersionInput: HTMLInputElement;
|
||||
private readonly fileInput: HTMLInputElement;
|
||||
private readonly folderInput: HTMLInputElement;
|
||||
private readonly fileVersionInput: HTMLInputElement;
|
||||
private readonly uploadMenuButtonSelector = 'app-toolbar-menu button[id="app.toolbar.upload"]';
|
||||
|
||||
constructor(
|
||||
@ -132,7 +132,7 @@ export class UploadEffects {
|
||||
this.contentService
|
||||
.getNodeInfo()
|
||||
.pipe(
|
||||
catchError((_) => {
|
||||
catchError(() => {
|
||||
this.store.dispatch(new SnackbarErrorAction('VERSION.ERROR.GENERIC'));
|
||||
return of(null);
|
||||
})
|
||||
|
@ -180,7 +180,7 @@ export class ViewerEffects {
|
||||
|
||||
let previewLocation = this.router.url;
|
||||
if (previewLocation.lastIndexOf('/') > 0) {
|
||||
previewLocation = previewLocation.substr(0, this.router.url.indexOf('/', 1));
|
||||
previewLocation = previewLocation.substring(0, this.router.url.indexOf('/', 1));
|
||||
}
|
||||
previewLocation = previewLocation.replace(/\//g, '');
|
||||
|
||||
|
@ -1,34 +0,0 @@
|
||||
/*!
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { ContentActionRef } from '@alfresco/adf-extensions';
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { getContentActionRef } from './content-action-ref';
|
||||
export class AppExtensionServiceMock {
|
||||
getMainAction(): Observable<ContentActionRef> {
|
||||
return of(getContentActionRef());
|
||||
}
|
||||
|
||||
runActionById(_id: string) {}
|
||||
}
|
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { TranslatePipe, TranslateModule } from '@ngx-translate/core';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import {
|
||||
TranslationService,
|
||||
@ -42,7 +42,6 @@ import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { EffectsModule } from '@ngrx/effects';
|
||||
import { MaterialModule } from '../material.module';
|
||||
import { INITIAL_STATE } from '../store/initial-state';
|
||||
import { TranslatePipeMock } from './translate-pipe.directive';
|
||||
import { BehaviorSubject, Observable, of } from 'rxjs';
|
||||
import { ContentManagementService } from '../services/content-management.service';
|
||||
import { DocumentBasePageService } from '@alfresco/aca-shared';
|
||||
@ -67,12 +66,10 @@ import { DocumentBasePageService } from '@alfresco/aca-shared';
|
||||
EffectsModule.forRoot([]),
|
||||
PipeModule
|
||||
],
|
||||
declarations: [TranslatePipeMock],
|
||||
exports: [TranslatePipeMock, RouterTestingModule, MaterialModule, PipeModule],
|
||||
exports: [RouterTestingModule, MaterialModule, PipeModule, TranslateModule],
|
||||
providers: [
|
||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
||||
{ provide: TranslationService, useClass: TranslationMock },
|
||||
{ provide: TranslatePipe, useClass: TranslatePipeMock },
|
||||
{ provide: DocumentBasePageService, useExisting: ContentManagementService },
|
||||
{
|
||||
provide: DiscoveryApiService,
|
||||
|
@ -1,38 +0,0 @@
|
||||
/*!
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { ContentActionRef, ContentActionType } from '@alfresco/adf-extensions';
|
||||
|
||||
export const ACTION_TITLE = 'ACTION_TITLE';
|
||||
export const ACTION_CLICK = 'ACTION_CLICK';
|
||||
|
||||
export const getContentActionRef = (): ContentActionRef => ({
|
||||
id: 'id',
|
||||
type: ContentActionType.button,
|
||||
title: ACTION_TITLE,
|
||||
disabled: false,
|
||||
actions: {
|
||||
click: ACTION_CLICK
|
||||
}
|
||||
});
|
@ -1,32 +0,0 @@
|
||||
/*!
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
|
||||
@Pipe({ name: 'translate' })
|
||||
export class TranslatePipeMock implements PipeTransform {
|
||||
transform(value: any) {
|
||||
return value;
|
||||
}
|
||||
}
|
@ -33,8 +33,6 @@ import { of } from 'rxjs';
|
||||
|
||||
describe('ActionsService', () => {
|
||||
let actionsService: ActionsService;
|
||||
let apiCallSpy;
|
||||
const params = [{}, {}, {}, {}, {}, ['application/json'], ['application/json']];
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
@ -67,10 +65,11 @@ describe('ActionsService', () => {
|
||||
});
|
||||
|
||||
it('loadParameterConstraints should send GET request and return formatted observable', async () => {
|
||||
const params = [{}, {}, {}, {}, {}, ['application/json'], ['application/json']];
|
||||
const constraintName = dummyConstraints[0].name;
|
||||
const formattedConstraints = dummyConstraints[0].constraints;
|
||||
|
||||
apiCallSpy = spyOn<any>(actionsService, 'publicApiCall')
|
||||
const apiCallSpy = spyOn<any>(actionsService, 'publicApiCall')
|
||||
.withArgs(`/action-parameter-constraints/${constraintName}`, 'GET', params)
|
||||
.and.returnValue(of(rawConstraints));
|
||||
|
||||
@ -81,7 +80,7 @@ describe('ActionsService', () => {
|
||||
});
|
||||
|
||||
it('loadActionParameterConstraints should load the data into the observable', async () => {
|
||||
spyOn<any>(actionsService, 'getParameterConstraints').and.returnValue(of(dummyConstraints[0].constraints));
|
||||
spyOn(actionsService, 'getParameterConstraints').and.returnValue(of(dummyConstraints[0].constraints));
|
||||
|
||||
const constraintsPromise = actionsService.parameterConstraints$.pipe(take(2)).toPromise();
|
||||
|
||||
|
@ -48,7 +48,7 @@ describe('FolderRulesService', () => {
|
||||
const nodeId = owningFolderIdMock;
|
||||
const ruleSetId = 'rule-set-id';
|
||||
const mockedRule = ruleMock('rule-mock');
|
||||
const { id, ...mockedRuleWithoutId } = mockedRule;
|
||||
const { ...mockedRuleWithoutId } = mockedRule;
|
||||
const mockedRuleEntry = { entry: mockedRule };
|
||||
const ruleId = mockedRule.id;
|
||||
const mockedRuleSettingsEntry = { entry: ruleSettingsMock };
|
||||
|
@ -39,7 +39,7 @@ import { PreviewComponent } from './preview.component';
|
||||
import { BehaviorSubject, Observable, of, throwError } from 'rxjs';
|
||||
import { ContentApiService, AppHookService, DocumentBasePageService } from '@alfresco/aca-shared';
|
||||
import { Store, StoreModule } from '@ngrx/store';
|
||||
import { Node, NodePaging, FavoritePaging, SharedLinkPaging, PersonEntry, ResultSetPaging, RepositoryInfo, NodeEntry } from '@alfresco/js-api';
|
||||
import { Node, NodePaging, FavoritePaging, SharedLinkPaging, PersonEntry, ResultSetPaging, RepositoryInfo } from '@alfresco/js-api';
|
||||
import { PreviewModule } from '../preview.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
@ -48,10 +48,10 @@ import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { EffectsModule } from '@ngrx/effects';
|
||||
|
||||
class DocumentBasePageServiceMock extends DocumentBasePageService {
|
||||
canUpdateNode(_node: NodeEntry): boolean {
|
||||
canUpdateNode(): boolean {
|
||||
return true;
|
||||
}
|
||||
canUploadContent(_node: Node): boolean {
|
||||
canUploadContent(): boolean {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ export class TestRuleContext implements RuleContext {
|
||||
isEmpty: true
|
||||
};
|
||||
|
||||
getEvaluator(_key: string): RuleEvaluator {
|
||||
getEvaluator(): RuleEvaluator {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
@ -23,14 +23,12 @@
|
||||
*/
|
||||
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { OpenInAppComponent } from './open-in-app.component';
|
||||
import { initialState, LibTestingModule } from '../../testing/lib-testing-module';
|
||||
import { provideMockStore } from '@ngrx/store/testing';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { MatIconTestingModule } from '@angular/material/icon/testing';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { SharedModule } from '@alfresco/aca-shared';
|
||||
|
||||
describe('OpenInAppComponent', () => {
|
||||
@ -44,7 +42,7 @@ describe('OpenInAppComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [LibTestingModule, TranslateModule, SharedModule.forRoot(), MatIconModule, MatIconTestingModule],
|
||||
imports: [LibTestingModule, SharedModule.forRoot(), MatIconTestingModule],
|
||||
providers: [
|
||||
provideMockStore({ initialState }),
|
||||
{ provide: MAT_DIALOG_DATA, useValue: { redirectUrl: 'mockRedirectUrl' } },
|
||||
@ -59,14 +57,13 @@ describe('OpenInAppComponent', () => {
|
||||
|
||||
it('should redirect to app when click on `Open in App` button` ', async () => {
|
||||
let currentLocation: string | string[];
|
||||
const windowStub: Window & typeof globalThis = {
|
||||
component.window = {
|
||||
location: {
|
||||
set href(value: string | string[]) {
|
||||
currentLocation = value;
|
||||
}
|
||||
}
|
||||
} as Window & typeof globalThis;
|
||||
component.window = windowStub;
|
||||
const saveButton = fixture.debugElement.query(By.css('[data-automation-id="open-in-app-button"]')).nativeElement;
|
||||
saveButton.dispatchEvent(new Event('click'));
|
||||
fixture.detectChanges();
|
||||
|
@ -35,7 +35,7 @@ export interface OpenInAppDialogOptions {
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class OpenInAppComponent {
|
||||
private redirectUrl: string;
|
||||
private readonly redirectUrl: string;
|
||||
public window: Window & typeof globalThis = window;
|
||||
|
||||
constructor(
|
||||
|
@ -27,7 +27,6 @@ import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||
import { UserPreferencesService, AppConfigService, PaginationComponent, PaginationModel, CoreTestingModule } from '@alfresco/adf-core';
|
||||
import { initialState, LibTestingModule } from '../testing/lib-testing-module';
|
||||
import { SharedDirectivesModule } from './shared.directives.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { provideMockStore } from '@ngrx/store/testing';
|
||||
|
||||
describe('PaginationDirective', () => {
|
||||
@ -39,7 +38,7 @@ describe('PaginationDirective', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [TranslateModule.forRoot(), LibTestingModule, SharedDirectivesModule, CoreTestingModule],
|
||||
imports: [LibTestingModule, SharedDirectivesModule, CoreTestingModule],
|
||||
providers: [provideMockStore({ initialState })]
|
||||
});
|
||||
|
||||
|
@ -33,7 +33,7 @@ describe('AppSharedRuleGuard', () => {
|
||||
const guard = new AppSharedRuleGuard(store);
|
||||
const emittedSpy = jasmine.createSpy('emitted');
|
||||
|
||||
guard.canActivate({} as any).subscribe(emittedSpy);
|
||||
guard.canActivate().subscribe(emittedSpy);
|
||||
expect(emittedSpy).toHaveBeenCalledWith(true);
|
||||
});
|
||||
|
||||
@ -44,7 +44,7 @@ describe('AppSharedRuleGuard', () => {
|
||||
const guard = new AppSharedRuleGuard(store);
|
||||
const emittedSpy = jasmine.createSpy('emitted');
|
||||
|
||||
guard.canActivateChild({} as any).subscribe(emittedSpy);
|
||||
guard.canActivateChild().subscribe(emittedSpy);
|
||||
expect(emittedSpy).toHaveBeenCalledWith(true);
|
||||
});
|
||||
});
|
||||
|
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { CanActivate, ActivatedRouteSnapshot } from '@angular/router';
|
||||
import { CanActivate } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { AppStore, isQuickShareEnabled } from '@alfresco/aca-shared/store';
|
||||
@ -38,11 +38,11 @@ export class AppSharedRuleGuard implements CanActivate {
|
||||
this.isQuickShareEnabled$ = store.select(isQuickShareEnabled);
|
||||
}
|
||||
|
||||
canActivate(_: ActivatedRouteSnapshot): Observable<boolean> {
|
||||
canActivate(): Observable<boolean> {
|
||||
return this.isQuickShareEnabled$;
|
||||
}
|
||||
|
||||
canActivateChild(route: ActivatedRouteSnapshot): Observable<boolean> {
|
||||
return this.canActivate(route);
|
||||
canActivateChild(): Observable<boolean> {
|
||||
return this.canActivate();
|
||||
}
|
||||
}
|
||||
|
@ -142,11 +142,9 @@ export class AppService implements OnDestroy {
|
||||
|
||||
const { router } = this;
|
||||
|
||||
this.router.events
|
||||
.pipe(filter((event) => event instanceof ActivationEnd && event.snapshot.children.length === 0))
|
||||
.subscribe((_event: ActivationEnd) => {
|
||||
this.store.dispatch(new SetCurrentUrlAction(router.url));
|
||||
});
|
||||
this.router.events.pipe(filter((event) => event instanceof ActivationEnd && event.snapshot.children.length === 0)).subscribe(() => {
|
||||
this.store.dispatch(new SetCurrentUrlAction(router.url));
|
||||
});
|
||||
|
||||
this.router.events.pipe(filter((event) => event instanceof NavigationStart)).subscribe(() => {
|
||||
this.store.dispatch(new ResetSelectionAction());
|
||||
|
@ -87,6 +87,7 @@ export const initialState = {
|
||||
}),
|
||||
PipeModule
|
||||
],
|
||||
exports: [TranslateModule],
|
||||
providers: [
|
||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
||||
{ provide: TranslationService, useClass: TranslationMock }
|
||||
|
@ -27,7 +27,7 @@ import { isPresentAndDisplayed, Utils } from '../../../utilities/utils';
|
||||
import { BrowserActions, TestElement } from '@alfresco/adf-testing';
|
||||
|
||||
export class GenericFilter {
|
||||
private filterName: string;
|
||||
private readonly filterName: string;
|
||||
|
||||
constructor(filterName: string) {
|
||||
this.filterName = filterName;
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
import { browser, by } from 'protractor';
|
||||
import { Component } from '../component';
|
||||
import { waitForPresence, waitElement } from '../../utilities/utils';
|
||||
import { waitElement, waitForPresence } from '../../utilities/utils';
|
||||
import { BrowserActions, BrowserVisibility, TestElement } from '@alfresco/adf-testing';
|
||||
|
||||
export class SearchInput extends Component {
|
||||
@ -174,7 +174,7 @@ export class SearchInput extends Component {
|
||||
async searchUntilResult(text: string, methodType: 'URL' | 'UI', waitPerSearch: number = 2000, timeout: number = 20000) {
|
||||
const attempts = Math.round(timeout / waitPerSearch);
|
||||
let loopCount = 0;
|
||||
let myPromise = new Promise((resolve, reject) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const check = async () => {
|
||||
loopCount++;
|
||||
loopCount >= attempts ? reject('File not found') : methodType === 'UI' ? await this.searchFor(text) : await this.searchByURL(text);
|
||||
@ -182,6 +182,5 @@ export class SearchInput extends Component {
|
||||
};
|
||||
return check();
|
||||
});
|
||||
return myPromise;
|
||||
}
|
||||
}
|
||||
|
@ -23,8 +23,8 @@
|
||||
*/
|
||||
|
||||
import { RepoApi } from '../repo-api';
|
||||
import { NodeContentTree, flattenNodeContentTree } from './node-content-tree';
|
||||
import { NodesApi as AdfNodeApi, NodeEntry, NodeChildAssociationPaging } from '@alfresco/js-api';
|
||||
import { flattenNodeContentTree, NodeContentTree } from './node-content-tree';
|
||||
import { NodeChildAssociationPaging, NodeEntry, NodesApi as AdfNodeApi } from '@alfresco/js-api';
|
||||
import { Utils } from '../../../../utilities/utils';
|
||||
|
||||
export class NodesApi extends RepoApi {
|
||||
@ -166,8 +166,7 @@ export class NodesApi extends RepoApi {
|
||||
try {
|
||||
await names.reduce(async (previous, current) => {
|
||||
await previous;
|
||||
const req = await this.deleteNodeByPath(`${relativePath}/${current}`, permanent);
|
||||
return req;
|
||||
return await this.deleteNodeByPath(`${relativePath}/${current}`, permanent);
|
||||
}, Promise.resolve());
|
||||
} catch (error) {
|
||||
this.handleError(`${this.constructor.name} ${this.deleteNodes.name}`, error);
|
||||
|
@ -199,7 +199,7 @@ export class AcaViewerComponent implements OnInit, OnDestroy {
|
||||
this.displayNode(file.data.entry.id);
|
||||
});
|
||||
|
||||
this.previewLocation = this.router.url.substr(0, this.router.url.indexOf('/', 1)).replace(/\//g, '');
|
||||
this.previewLocation = this.router.url.substring(0, this.router.url.indexOf('/', 1)).replace(/\//g, '');
|
||||
}
|
||||
|
||||
onViewerVisibilityChanged() {
|
||||
|
@ -11,7 +11,7 @@ module.exports = async ({github, context, version}) => {
|
||||
if (prs?.length > 0) {
|
||||
const title = prs[0].title;
|
||||
const result = title.match(version);
|
||||
return result?.length > 0 ? true : false;
|
||||
return result?.length > 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -9,23 +9,23 @@ module.exports = async ({github, dependencyName}) => {
|
||||
|
||||
const localVersion = pkg.dependencies[dependencyFullName];
|
||||
|
||||
const { data: availablePakages } = await github.rest.packages.getAllPackageVersionsForPackageOwnedByOrg({
|
||||
const { data: availablePackages } = await github.rest.packages.getAllPackageVersionsForPackageOwnedByOrg({
|
||||
package_type: 'npm',
|
||||
package_name: dependencyName,
|
||||
org: organization
|
||||
});
|
||||
|
||||
const latestPkgToUpdate = availablePakages[0];
|
||||
const latestPkgToUpdate = availablePackages[0];
|
||||
|
||||
if (localVersion === latestPkgToUpdate?.name) {
|
||||
return { hasNewVersion: 'false' };
|
||||
} else {
|
||||
const findLocalVerionOnRemote = availablePakages.find((item) => item.name === localVersion);
|
||||
const findLocalVersionOnRemote = availablePackages.find((item) => item.name === localVersion);
|
||||
let rangeInDays = 'N/A'
|
||||
if (findLocalVerionOnRemote !== undefined) {
|
||||
var creationLocal = new Date(findLocalVerionOnRemote.created_at);
|
||||
var creationLatest = new Date(latestPkgToUpdate.created_at,);
|
||||
rangeInDays = inDays(creationLocal, creationLatest);
|
||||
if (findLocalVersionOnRemote !== undefined) {
|
||||
const creationLocal = new Date(findLocalVersionOnRemote.created_at);
|
||||
const creationLatest = new Date(latestPkgToUpdate.created_at);
|
||||
rangeInDays = inDays(creationLocal, creationLatest);
|
||||
}
|
||||
return { hasNewVersion: 'true', remoteVersion: { name: latestPkgToUpdate?.name, rangeInDays } , localVersion};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user