mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4089] Refactoring ContentListPage (#4162)
* [ADF-NO-ISSUE] Refactoring ContentListPage * Applying changes * [ADF-4089] contentListPage refactoring * Fixing missing dependencies * Fixing core and search failing tests * Fix tooltip document-list tests * no message
This commit is contained in:
committed by
Eugenio Romano
parent
88ef01011e
commit
27c6e18a10
@@ -37,9 +37,8 @@ describe('Lock File', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const contentList = contentServicesPage.getUploadAreaDocumentList();
|
||||
const lockFilePage = new LockFilePage();
|
||||
const contentServices = new ContentServicesPage();
|
||||
|
||||
let adminUser = new AcsUserModel();
|
||||
let managerUser = new AcsUserModel();
|
||||
@@ -105,7 +104,9 @@ describe('Lock File', () => {
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(adminUser);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(documentLibrary);
|
||||
await navigationBarPage.openContentServicesFolder(documentLibrary);
|
||||
|
||||
contentServices.waitForTableBody();
|
||||
|
||||
done();
|
||||
});
|
||||
@@ -129,7 +130,7 @@ describe('Lock File', () => {
|
||||
});
|
||||
|
||||
it('[C286604] Should be able to open Lock file option by clicking the lock image', () => {
|
||||
contentList.lockContent(pngFileModel.name);
|
||||
contentServices.lockContent(pngFileModel.name);
|
||||
|
||||
lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
lockFilePage.checkCancelButtonIsDisplayed();
|
||||
@@ -137,38 +138,38 @@ describe('Lock File', () => {
|
||||
});
|
||||
|
||||
it('[C286625] Should be able to click Cancel to cancel lock file operation', () => {
|
||||
contentList.lockContent(pngFileModel.name);
|
||||
contentServices.lockContent(pngFileModel.name);
|
||||
|
||||
lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
lockFilePage.clickCancelButton();
|
||||
|
||||
contentList.checkUnlockedIcon(pngFileModel.name);
|
||||
contentServices.checkUnlockedIcon(pngFileModel.name);
|
||||
});
|
||||
|
||||
it('[C286603] Should be able to click on Lock file checkbox and lock a file', () => {
|
||||
contentList.lockContent(pngFileToLock.name);
|
||||
contentServices.lockContent(pngFileToLock.name);
|
||||
|
||||
lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
lockFilePage.clickLockFileCheckbox();
|
||||
lockFilePage.clickSaveButton();
|
||||
|
||||
contentList.checkLockedIcon(pngFileToLock.name);
|
||||
contentServices.checkLockedIcon(pngFileToLock.name);
|
||||
});
|
||||
|
||||
it('[C286618] Should be able to uncheck Lock file checkbox and unlock a file', () => {
|
||||
contentList.lockContent(pngFileModel.name);
|
||||
contentServices.lockContent(pngFileModel.name);
|
||||
|
||||
lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
lockFilePage.clickLockFileCheckbox();
|
||||
lockFilePage.clickSaveButton();
|
||||
|
||||
contentList.checkLockedIcon(pngFileModel.name);
|
||||
contentList.lockContent(pngFileModel.name);
|
||||
contentServices.checkLockedIcon(pngFileModel.name);
|
||||
contentServices.lockContent(pngFileModel.name);
|
||||
|
||||
lockFilePage.clickLockFileCheckbox();
|
||||
lockFilePage.clickSaveButton();
|
||||
|
||||
contentList.checkUnlockedIcon(pngFileModel.name);
|
||||
contentServices.checkUnlockedIcon(pngFileModel.name);
|
||||
});
|
||||
|
||||
});
|
||||
@@ -198,7 +199,7 @@ describe('Lock File', () => {
|
||||
});
|
||||
|
||||
it('[C286610] Should not be able to delete a locked file', async () => {
|
||||
await contentList.lockContent(pngFileModel.name);
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
|
||||
await lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
await lockFilePage.clickLockFileCheckbox();
|
||||
@@ -214,7 +215,7 @@ describe('Lock File', () => {
|
||||
});
|
||||
|
||||
it('[C286611] Should not be able to rename a locked file', async () => {
|
||||
await contentList.lockContent(pngFileModel.name);
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
|
||||
await lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
await lockFilePage.clickLockFileCheckbox();
|
||||
@@ -230,7 +231,7 @@ describe('Lock File', () => {
|
||||
});
|
||||
|
||||
it('[C286612] Should not be able to move a locked file', async () => {
|
||||
await contentList.lockContent(pngFileModel.name);
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
|
||||
await lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
await lockFilePage.clickLockFileCheckbox();
|
||||
@@ -245,7 +246,7 @@ describe('Lock File', () => {
|
||||
});
|
||||
|
||||
it('[C286613] Should not be able to update a new version on a locked file', async () => {
|
||||
await contentList.lockContent(pngFileModel.name);
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
|
||||
await lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
await lockFilePage.clickLockFileCheckbox();
|
||||
@@ -295,7 +296,7 @@ describe('Lock File', () => {
|
||||
});
|
||||
|
||||
it('[C286614] Owner of the locked file should be able to rename if Allow owner to modify is checked', async () => {
|
||||
await contentList.lockContent(pngFileModel.name);
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
|
||||
await lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
await lockFilePage.clickLockFileCheckbox();
|
||||
@@ -308,7 +309,7 @@ describe('Lock File', () => {
|
||||
});
|
||||
|
||||
it('[C286615] Owner of the locked file should be able to update a new version if Allow owner to modify is checked', async () => {
|
||||
await contentList.lockContent(pngFileModel.name);
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
|
||||
await lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
await lockFilePage.clickLockFileCheckbox();
|
||||
@@ -321,7 +322,7 @@ describe('Lock File', () => {
|
||||
});
|
||||
|
||||
it('[C286616] Owner of the locked file should be able to move if Allow owner to modify is checked', async () => {
|
||||
await contentList.lockContent(pngFileModel.name);
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
|
||||
await lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
await lockFilePage.clickLockFileCheckbox();
|
||||
@@ -337,15 +338,15 @@ describe('Lock File', () => {
|
||||
});
|
||||
|
||||
it('[C286617] Owner of the locked file should be able to delete if Allow owner to modify is checked', () => {
|
||||
contentList.lockContent(pngFileToLock.name);
|
||||
contentServices.lockContent(pngFileToLock.name);
|
||||
|
||||
lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
lockFilePage.clickLockFileCheckbox();
|
||||
lockFilePage.clickAllowOwnerCheckbox();
|
||||
lockFilePage.clickSaveButton();
|
||||
|
||||
contentList.deleteContentWithRoot(pngFileToBeLocked.entry.name);
|
||||
contentList.checkContentIsNotDisplayed(pngFileToBeLocked.entry.name);
|
||||
contentServices.deleteContent(pngFileToBeLocked.entry.name);
|
||||
contentServices.checkContentIsNotDisplayed(pngFileToBeLocked.entry.name);
|
||||
});
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user