mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACA-2312] Fix inconsistency for My Libraries (#1473)
* [ACA-2312] Fix inconsistency for My Libraries * fix quality * fix e2e * modify e2e type * fix file lib * revert replace all
This commit is contained in:
@@ -36,7 +36,7 @@ export class ContentNodeSelectorDialog extends GenericDialog {
|
||||
|
||||
locationDropDown = this.rootElem.element(by.id('site-dropdown-container'));
|
||||
locationPersonalFiles = browser.element(by.cssContainingText('.mat-option .mat-option-text', 'Personal Files'));
|
||||
locationFileLibraries = browser.element(by.cssContainingText('.mat-option .mat-option-text', 'File Libraries'));
|
||||
locationFileLibraries = browser.element(by.cssContainingText('.mat-option .mat-option-text', 'My Libraries'));
|
||||
|
||||
searchInput = this.rootElem.element(by.css('#searchInput'));
|
||||
toolbarTitle = this.rootElem.element(by.css('.adf-toolbar-title'));
|
||||
@@ -52,7 +52,7 @@ export class ContentNodeSelectorDialog extends GenericDialog {
|
||||
await waitForStaleness(browser.$('.mat-option .mat-option-text'))
|
||||
}
|
||||
|
||||
async selectLocation(location: 'Personal Files' | 'File Libraries'): Promise<void> {
|
||||
async selectLocation(location: string): Promise<void> {
|
||||
await this.locationDropDown.click();
|
||||
await waitForPresence(this.locationPersonalFiles);
|
||||
|
||||
|
@@ -22,18 +22,11 @@
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export const BROWSER_RESOLUTION_WIDTH = 1200;
|
||||
export const BROWSER_RESOLUTION_HEIGHT = 800;
|
||||
|
||||
export const BROWSER_WAIT_TIMEOUT = 10000;
|
||||
|
||||
// Application configs
|
||||
export const USE_HASH_STRATEGY = true;
|
||||
|
||||
// Repository configs
|
||||
export const REPO_API_TENANT = '-default-';
|
||||
|
||||
export const E2E_ROOT_PATH = __dirname;
|
||||
|
||||
// Dates
|
||||
|
@@ -538,7 +538,7 @@ describe('Copy content', () => {
|
||||
const noOfItems = items.length;
|
||||
await dataTable.selectMultipleItems(items, location);
|
||||
await toolbar.clickMoreActionsCopy();
|
||||
await copyDialog.selectLocation('File Libraries');
|
||||
await copyDialog.selectLocation('My Libraries');
|
||||
await copyDialog.dataTable.doubleClickOnRowByName(siteName);
|
||||
await copyDialog.dataTable.doubleClickOnRowByName('documentLibrary');
|
||||
await copyDialog.selectDestination(destination);
|
||||
|
@@ -168,7 +168,7 @@ describe('Destination picker dialog : ', () => {
|
||||
});
|
||||
|
||||
it('[C263885] User can see his Libraries', async () => {
|
||||
await dialog.selectLocation('File Libraries');
|
||||
await dialog.selectLocation('My Libraries');
|
||||
expect(await dataTable.isItemPresent(site)).toBe(true, 'user site is not displayed');
|
||||
});
|
||||
|
||||
@@ -220,8 +220,8 @@ describe('Destination picker dialog : ', () => {
|
||||
});
|
||||
|
||||
it('[C263891] File Libraries breadcrumb - main node', async () => {
|
||||
await dialog.selectLocation('File Libraries');
|
||||
expect(await breadcrumb.currentFolder.getText()).toEqual('File Libraries');
|
||||
await dialog.selectLocation('My Libraries');
|
||||
expect(await breadcrumb.currentFolder.getText()).toEqual('My Libraries');
|
||||
});
|
||||
|
||||
it('[C263899] Search results breadcrumb', async () => {
|
||||
@@ -251,7 +251,7 @@ describe('Destination picker dialog : ', () => {
|
||||
});
|
||||
|
||||
it('[C263898] File Libraries breadcrumb - folder structure', async () => {
|
||||
await dialog.selectLocation('File Libraries');
|
||||
await dialog.selectLocation('My Libraries');
|
||||
|
||||
await dataTable.doubleClickOnRowByName(site);
|
||||
expect(await breadcrumb.currentFolder.getText()).toEqual(site);
|
||||
@@ -269,7 +269,7 @@ describe('Destination picker dialog : ', () => {
|
||||
expect(await breadcrumb.currentFolder.getText()).toEqual(searchSubFolder2);
|
||||
|
||||
await breadcrumb.openPath();
|
||||
expect(await breadcrumb.getPathItems()).toEqual([searchSubFolder1, searchFolder, site, 'File Libraries']);
|
||||
expect(await breadcrumb.getPathItems()).toEqual([searchSubFolder1, searchFolder, site, 'My Libraries']);
|
||||
});
|
||||
|
||||
it('[C263895] Select a node from the breadcrumb path', async () => {
|
||||
@@ -294,7 +294,7 @@ describe('Destination picker dialog : ', () => {
|
||||
await page.toolbar.clickMoreActionsCopy();
|
||||
await dialog.waitForDialogToOpen();
|
||||
|
||||
await dialog.selectLocation('File Libraries');
|
||||
await dialog.selectLocation('My Libraries');
|
||||
await dataTable.doubleClickOnRowByName(site);
|
||||
await dataTable.doubleClickOnRowByName('documentLibrary');
|
||||
await dataTable.selectItem(searchFolder);
|
||||
@@ -308,7 +308,7 @@ describe('Destination picker dialog : ', () => {
|
||||
await page.toolbar.clickMoreActionsCopy();
|
||||
await dialog.waitForDialogToOpen();
|
||||
|
||||
await dialog.selectLocation('File Libraries');
|
||||
await dialog.selectLocation('My Libraries');
|
||||
await dataTable.doubleClickOnRowByName(site);
|
||||
await dataTable.doubleClickOnRowByName('documentLibrary');
|
||||
await dataTable.selectItem(searchFolder);
|
||||
@@ -322,7 +322,7 @@ describe('Destination picker dialog : ', () => {
|
||||
await page.toolbar.clickMoreActionsCopy();
|
||||
await dialog.waitForDialogToOpen();
|
||||
|
||||
await dialog.selectLocation('File Libraries');
|
||||
await dialog.selectLocation('My Libraries');
|
||||
await dataTable.doubleClickOnRowByName(site);
|
||||
await dataTable.doubleClickOnRowByName('documentLibrary');
|
||||
await dataTable.selectItem(searchFolder);
|
||||
|
@@ -253,7 +253,7 @@ describe('Move content', () => {
|
||||
it('[C291969] Move items into a library', async () => {
|
||||
await dataTable.selectMultipleItems([file4, folder2]);
|
||||
await toolbar.clickMoreActionsMove();
|
||||
await moveDialog.selectLocation('File Libraries');
|
||||
await moveDialog.selectLocation('My Libraries');
|
||||
await moveDialog.dataTable.doubleClickOnRowByName(siteName);
|
||||
await moveDialog.dataTable.doubleClickOnRowByName('documentLibrary');
|
||||
await moveDialog.selectDestination(folderSitePF);
|
||||
@@ -373,7 +373,7 @@ describe('Move content', () => {
|
||||
it('[C291971] Move items into a library', async () => {
|
||||
await dataTable.selectItem(file4, sourceRF);
|
||||
await toolbar.clickMoreActionsMove();
|
||||
await moveDialog.selectLocation('File Libraries');
|
||||
await moveDialog.selectLocation('My Libraries');
|
||||
await moveDialog.dataTable.doubleClickOnRowByName(siteName);
|
||||
await moveDialog.dataTable.doubleClickOnRowByName('documentLibrary');
|
||||
await moveDialog.selectDestination(folderSiteRF);
|
||||
@@ -495,7 +495,7 @@ describe('Move content', () => {
|
||||
it('[C291978] Move items into a library', async () => {
|
||||
await dataTable.selectItem(file4, sourceSF);
|
||||
await toolbar.clickMoreActionsMove();
|
||||
await moveDialog.selectLocation('File Libraries');
|
||||
await moveDialog.selectLocation('My Libraries');
|
||||
await moveDialog.dataTable.doubleClickOnRowByName(siteName);
|
||||
await moveDialog.dataTable.doubleClickOnRowByName('documentLibrary');
|
||||
await moveDialog.selectDestination(folderSiteSF);
|
||||
@@ -685,7 +685,7 @@ describe('Move content', () => {
|
||||
it('[C291979] Move items into a library', async () => {
|
||||
await dataTable.selectMultipleItems([file4, folder2], sourceFav);
|
||||
await toolbar.clickMoreActionsMove();
|
||||
await moveDialog.selectLocation('File Libraries');
|
||||
await moveDialog.selectLocation('My Libraries');
|
||||
await moveDialog.dataTable.doubleClickOnRowByName(siteName);
|
||||
await moveDialog.dataTable.doubleClickOnRowByName('documentLibrary');
|
||||
await moveDialog.selectDestination(folderSiteFav);
|
||||
|
@@ -60,9 +60,6 @@ export enum BatchOperationType {
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class NodeActionsService {
|
||||
static SNACK_MESSAGE_DURATION_WITH_UNDO = 10000;
|
||||
static SNACK_MESSAGE_DURATION = 3000;
|
||||
|
||||
contentCopied: Subject<MinimalNodeEntity[]> = new Subject<
|
||||
MinimalNodeEntity[]
|
||||
>();
|
||||
@@ -242,7 +239,7 @@ export class NodeActionsService {
|
||||
entry: {
|
||||
guid: '-mysites-',
|
||||
title: this.translation.instant(
|
||||
'APP.BROWSE.LIBRARIES.SIDENAV_LINK.LABEL'
|
||||
'APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.LABEL'
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -339,13 +336,17 @@ export class NodeActionsService {
|
||||
}
|
||||
} else if (elements.length === 1) {
|
||||
if (node.name === 'Sites') {
|
||||
node.name = this.translation.instant('APP.BROWSE.LIBRARIES.TITLE');
|
||||
node.name = this.translation.instant(
|
||||
'APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.TITLE'
|
||||
);
|
||||
elements.splice(0, 1);
|
||||
}
|
||||
}
|
||||
} else if (node === null && this.isSitesDestinationAvailable) {
|
||||
node = {
|
||||
name: this.translation.instant('APP.BROWSE.LIBRARIES.TITLE'),
|
||||
name: this.translation.instant(
|
||||
'APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.TITLE'
|
||||
),
|
||||
path: { elements: [] }
|
||||
} as any;
|
||||
}
|
||||
@@ -361,7 +362,9 @@ export class NodeActionsService {
|
||||
elements.splice(0, 1);
|
||||
|
||||
// replace first item with 'File Libraries'
|
||||
elements[0].name = this.translation.instant('APP.BROWSE.LIBRARIES.TITLE');
|
||||
elements[0].name = this.translation.instant(
|
||||
'APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.TITLE'
|
||||
);
|
||||
elements[0].id = '-mysites-';
|
||||
|
||||
if (this.isSiteContainer(node)) {
|
||||
|
Reference in New Issue
Block a user