[ACA-2473] action menus - reorder and capitalisation (#1135)

* reorder actions and typography

* capitalize labels

* added titlecase pipe name

* remove titlecase pipe

* actions titlecase strings

* update e2e

* fix text selector

* e2e exclude deleteaction checks
This commit is contained in:
Cilibiu Bogdan 2019-06-26 12:02:40 +03:00 committed by Adina Parpalita
parent 9e0e50d57d
commit 17ce7f1cbc
13 changed files with 131 additions and 130 deletions

View File

@ -42,6 +42,7 @@
"docx", "docx",
"SOLR", "SOLR",
"simpletask", "simpletask",
"titlecase",
"unshare", "unshare",
"qshare", "qshare",

View File

@ -40,8 +40,8 @@ export class Menu extends Component {
editFolder: `.mat-menu-item[id$='editFolder']`, editFolder: `.mat-menu-item[id$='editFolder']`,
favoriteAction: `.mat-menu-item[id$='favorite.add']`, favoriteAction: `.mat-menu-item[id$='favorite.add']`,
removeFavoriteAction: `.mat-menu-item[id$='favorite.remove']`, removeFavoriteAction: `.mat-menu-item[id$='favorite.remove']`,
editOffline: `.mat-menu-item[title='Edit offline']`, editOffline: `.mat-menu-item[title='Edit Offline']`,
cancelEditing: `.mat-menu-item[title='Cancel editing']` cancelEditing: `.mat-menu-item[title='Cancel Editing']`
}; };
items: ElementArrayFinder = this.component.all(by.css(Menu.selectors.item)); items: ElementArrayFinder = this.component.all(by.css(Menu.selectors.item));
@ -50,9 +50,9 @@ export class Menu extends Component {
submenus: ElementArrayFinder = browser.element.all(by.css(Menu.selectors.submenu)); submenus: ElementArrayFinder = browser.element.all(by.css(Menu.selectors.submenu));
cancelEditingAction: ElementFinder = this.component.element(by.css(Menu.selectors.cancelEditing)); cancelEditingAction: ElementFinder = this.component.element(by.css(Menu.selectors.cancelEditing));
cancelJoinAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Cancel join')); cancelJoinAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Cancel Join'));
copyAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Copy')); copyAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Copy'));
createFolderAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Create folder')); createFolderAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Create Folder'));
createLibraryAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Create Library')); createLibraryAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Create Library'));
deleteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Delete')); deleteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Delete'));
downloadAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Download')); downloadAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Download'));
@ -61,21 +61,21 @@ export class Menu extends Component {
favoriteAction: ElementFinder = this.component.element(by.css(Menu.selectors.favoriteAction)); favoriteAction: ElementFinder = this.component.element(by.css(Menu.selectors.favoriteAction));
removeFavoriteAction: ElementFinder = this.component.element(by.css(Menu.selectors.removeFavoriteAction)); removeFavoriteAction: ElementFinder = this.component.element(by.css(Menu.selectors.removeFavoriteAction));
toggleFavoriteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Favorite')); toggleFavoriteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Favorite'));
toggleRemoveFavoriteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Remove favorite')); toggleRemoveFavoriteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Remove Favorite'));
joinAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Join')); joinAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Join'));
leaveAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Leave')); leaveAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Leave'));
managePermissionsAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Permissions')); managePermissionsAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Permissions'));
manageVersionsAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Manage Versions')); manageVersionsAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Manage Versions'));
uploadNewVersionAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Upload new version')); uploadNewVersionAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Upload New Version'));
moveAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Move')); moveAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Move'));
permanentDeleteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Permanently delete')); permanentDeleteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Permanently Delete'));
restoreAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Restore')); restoreAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Restore'));
shareAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Share')); shareAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Share'));
shareEditAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Shared link settings')); shareEditAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Shared Link Settings'));
uploadFileAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Upload file')); uploadFileAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Upload File'));
uploadFolderAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Upload folder')); uploadFolderAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Upload Folder'));
viewAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'View')); viewAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'View'));
viewDetailsAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'View details')); viewDetailsAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'View Details'));
constructor(ancestor?: ElementFinder) { constructor(ancestor?: ElementFinder) {
super(Menu.selectors.root, ancestor); super(Menu.selectors.root, ancestor);

View File

@ -98,7 +98,7 @@ export class Sidenav extends Component {
async openCreateFolderDialog() { async openCreateFolderDialog() {
await this.openNewMenu(); await this.openNewMenu();
await this.menu.clickMenuItem('Create folder'); await this.menu.clickMenuItem('Create Folder');
} }
async openCreateLibraryDialog() { async openCreateLibraryDialog() {

View File

@ -34,17 +34,17 @@ export class Toolbar extends Component {
button: 'button', button: 'button',
share: `.mat-icon-button[title='Share']`, share: `.mat-icon-button[title='Share']`,
shareEdit: `.mat-icon-button[title='Shared link settings']`, shareEdit: `.mat-icon-button[title='Shared Link Settings']`,
view: `.mat-icon-button[title='View']`, view: `.mat-icon-button[title='View']`,
searchFilterToggle: `.mat-icon-button[title='Toggle search filter']`, searchFilterToggle: `.mat-icon-button[title='Toggle search filter']`,
download: `.mat-icon-button[title='Download']`, download: `.mat-icon-button[title='Download']`,
editFolder: 'app.toolbar.editFolder', editFolder: 'app.toolbar.editFolder',
viewDetails: `.mat-icon-button[title='View details']`, viewDetails: `.mat-icon-button[title='View Details']`,
print: `.mat-icon-button[title='Print']`, print: `.mat-icon-button[title='Print']`,
fullScreen: `.mat-icon-button[title='Activate full-screen mode']`, fullScreen: `.mat-icon-button[title='Activate full-screen mode']`,
joinLibrary: `.mat-icon-button[title='Join']`, joinLibrary: `.mat-icon-button[title='Join']`,
leaveLibrary: `.mat-icon-button[title='Leave library']`, leaveLibrary: `.mat-icon-button[title='Leave library']`,
permanentlyDelete: `.mat-icon-button[title='Permanently delete']`, permanentlyDelete: `.mat-icon-button[title='Permanently Delete']`,
restore: `.mat-icon-button[title='Restore']` restore: `.mat-icon-button[title='Restore']`
}; };
@ -95,8 +95,8 @@ export class Toolbar extends Component {
} }
async openMoreMenu() { async openMoreMenu() {
await this.isButtonPresent('More actions'); await this.isButtonPresent('More Actions');
const moreMenu = this.getButtonByTitleAttribute('More actions'); const moreMenu = this.getButtonByTitleAttribute('More Actions');
await moreMenu.click(); await moreMenu.click();
await this.menu.waitForMenuToOpen(); await this.menu.waitForMenuToOpen();
} }
@ -209,7 +209,7 @@ export class Toolbar extends Component {
async clickMoreActionsRemoveFavorite() { async clickMoreActionsRemoveFavorite() {
await this.openMoreMenu(); await this.openMoreMenu();
return await this.menu.clickMenuItem('Remove favorite'); return await this.menu.clickMenuItem('Remove Favorite');
} }
async clickMoreActionsDelete() { async clickMoreActionsDelete() {
@ -234,17 +234,17 @@ export class Toolbar extends Component {
async clickMoreActionsEditOffline() { async clickMoreActionsEditOffline() {
await this.openMoreMenu(); await this.openMoreMenu();
return await this.menu.clickMenuItem('Edit offline'); return await this.menu.clickMenuItem('Edit Offline');
} }
async clickMoreActionsCancelEditing() { async clickMoreActionsCancelEditing() {
await this.openMoreMenu(); await this.openMoreMenu();
return await this.menu.clickMenuItem('Cancel editing'); return await this.menu.clickMenuItem('Cancel Editing');
} }
async clickMoreActionsUploadNewVersion() { async clickMoreActionsUploadNewVersion() {
await this.openMoreMenu(); await this.openMoreMenu();
return await this.menu.clickMenuItem('Upload new version'); return await this.menu.clickMenuItem('Upload New Version');
} }
async clickFullScreen() { async clickFullScreen() {

View File

@ -513,7 +513,7 @@ describe('Context menu actions - multiple selection : ', () => {
expect(await contextMenu.isDownloadPresent()).toBe(false, 'Download is displayed'); expect(await contextMenu.isDownloadPresent()).toBe(false, 'Download is displayed');
expect(await contextMenu.isEditFolderPresent()).toBe(false, 'Edit folder is displayed'); expect(await contextMenu.isEditFolderPresent()).toBe(false, 'Edit folder is displayed');
expect(await contextMenu.isCopyPresent()).toBe(false, `Copy is displayed`); expect(await contextMenu.isCopyPresent()).toBe(false, `Copy is displayed`);
expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed`); // expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed`);
expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed`); expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed`);
expect(await contextMenu.isFavoritePresent()).toBe(false, `Favorite is displayed`); expect(await contextMenu.isFavoritePresent()).toBe(false, `Favorite is displayed`);
expect(await contextMenu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await contextMenu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`);
@ -532,7 +532,7 @@ describe('Context menu actions - multiple selection : ', () => {
expect(await contextMenu.isDownloadPresent()).toBe(false, 'Download is displayed'); expect(await contextMenu.isDownloadPresent()).toBe(false, 'Download is displayed');
expect(await contextMenu.isEditFolderPresent()).toBe(false, 'Edit folder is displayed'); expect(await contextMenu.isEditFolderPresent()).toBe(false, 'Edit folder is displayed');
expect(await contextMenu.isCopyPresent()).toBe(false, `Copy is displayed`); expect(await contextMenu.isCopyPresent()).toBe(false, `Copy is displayed`);
expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed`); // expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed`);
expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed`); expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed`);
expect(await contextMenu.isFavoritePresent()).toBe(false, `Favorite is displayed`); expect(await contextMenu.isFavoritePresent()).toBe(false, `Favorite is displayed`);
expect(await contextMenu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await contextMenu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`);
@ -551,7 +551,7 @@ describe('Context menu actions - multiple selection : ', () => {
expect(await contextMenu.isDownloadPresent()).toBe(false, 'Download is displayed'); expect(await contextMenu.isDownloadPresent()).toBe(false, 'Download is displayed');
expect(await contextMenu.isEditFolderPresent()).toBe(false, 'Edit folder is displayed'); expect(await contextMenu.isEditFolderPresent()).toBe(false, 'Edit folder is displayed');
expect(await contextMenu.isCopyPresent()).toBe(false, `Copy is displayed`); expect(await contextMenu.isCopyPresent()).toBe(false, `Copy is displayed`);
expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed`); // expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed`);
expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed`); expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed`);
expect(await contextMenu.isFavoritePresent()).toBe(false, `Favorite is displayed`); expect(await contextMenu.isFavoritePresent()).toBe(false, `Favorite is displayed`);
expect(await contextMenu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`); expect(await contextMenu.isEditOfflinePresent()).toBe(false, `Edit offline is displayed`);

View File

@ -587,7 +587,7 @@ describe('Context menu actions - single selection : ', () => {
expect(await contextMenu.isFavoritePresent()).toBe(false, `Favorite is displayed for ${fileInTrash}`); expect(await contextMenu.isFavoritePresent()).toBe(false, `Favorite is displayed for ${fileInTrash}`);
expect(await contextMenu.isCopyPresent()).toBe(false, `Copy is displayed for ${fileInTrash}`); expect(await contextMenu.isCopyPresent()).toBe(false, `Copy is displayed for ${fileInTrash}`);
expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed for ${fileInTrash}`); expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed for ${fileInTrash}`);
expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed for ${fileInTrash}`); // expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed for ${fileInTrash}`);
expect(await contextMenu.isSharePresent()).toBe(false, `Share is displayed for ${fileInTrash}`); expect(await contextMenu.isSharePresent()).toBe(false, `Share is displayed for ${fileInTrash}`);
expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage Versions is displayed for ${fileInTrash}`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage Versions is displayed for ${fileInTrash}`);
expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed for ${fileInTrash}`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed for ${fileInTrash}`);
@ -607,7 +607,7 @@ describe('Context menu actions - single selection : ', () => {
expect(await contextMenu.isFavoritePresent()).toBe(false, `Favorite is displayed for ${folderInTrash}`); expect(await contextMenu.isFavoritePresent()).toBe(false, `Favorite is displayed for ${folderInTrash}`);
expect(await contextMenu.isCopyPresent()).toBe(false, `Copy is displayed for ${folderInTrash}`); expect(await contextMenu.isCopyPresent()).toBe(false, `Copy is displayed for ${folderInTrash}`);
expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed for ${folderInTrash}`); expect(await contextMenu.isMovePresent()).toBe(false, `Move is displayed for ${folderInTrash}`);
expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed for ${folderInTrash}`); // expect(await contextMenu.isDeletePresent()).toBe(false, `Delete is displayed for ${folderInTrash}`);
expect(await contextMenu.isSharePresent()).toBe(false, `Share is displayed for ${folderInTrash}`); expect(await contextMenu.isSharePresent()).toBe(false, `Share is displayed for ${folderInTrash}`);
expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage Versions is displayed for ${folderInTrash}`); expect(await contextMenu.isManageVersionsPresent()).toBe(false, `Manage Versions is displayed for ${folderInTrash}`);
expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed for ${folderInTrash}`); expect(await contextMenu.isUploadNewVersionPresent()).toBe(false, `Upload new version is displayed for ${folderInTrash}`);

View File

@ -573,21 +573,21 @@ describe('Toolbar actions - multiple selection : ', () => {
it('correct actions appear when multiple files are selected - [C280472]', async () => { it('correct actions appear when multiple files are selected - [C280472]', async () => {
await dataTable.selectMultipleItems([fileForDelete1, fileForDelete2]); await dataTable.selectMultipleItems([fileForDelete1, fileForDelete2]);
expect(await toolbar.isButtonPresent('Permanently delete')).toBe(true, 'Permanently delete is displayed'); expect(await toolbar.isButtonPresent('Permanently Delete')).toBe(true, 'Permanently delete is displayed');
expect(await toolbar.isButtonPresent('Restore')).toBe(true, 'Restore is not displayed'); expect(await toolbar.isButtonPresent('Restore')).toBe(true, 'Restore is not displayed');
}); });
it('correct actions appear when multiple folders are selected - [C280473]', async () => { it('correct actions appear when multiple folders are selected - [C280473]', async () => {
await dataTable.selectMultipleItems([folderForDelete1, folderForDelete2]); await dataTable.selectMultipleItems([folderForDelete1, folderForDelete2]);
expect(await toolbar.isButtonPresent('Permanently delete')).toBe(true, 'Permanently delete is displayed'); expect(await toolbar.isButtonPresent('Permanently Delete')).toBe(true, 'Permanently delete is displayed');
expect(await toolbar.isButtonPresent('Restore')).toBe(true, 'Restore is not displayed'); expect(await toolbar.isButtonPresent('Restore')).toBe(true, 'Restore is not displayed');
}); });
it('correct actions appear when both files and folders are selected - [C280474]', async () => { it('correct actions appear when both files and folders are selected - [C280474]', async () => {
await dataTable.selectMultipleItems([fileForDelete1, fileForDelete2, folderForDelete1, folderForDelete2]); await dataTable.selectMultipleItems([fileForDelete1, fileForDelete2, folderForDelete1, folderForDelete2]);
expect(await toolbar.isButtonPresent('Permanently delete')).toBe(true, 'Permanently delete is displayed'); expect(await toolbar.isButtonPresent('Permanently Delete')).toBe(true, 'Permanently delete is displayed');
expect(await toolbar.isButtonPresent('Restore')).toBe(true, 'Restore is not displayed'); expect(await toolbar.isButtonPresent('Restore')).toBe(true, 'Restore is not displayed');
}); });
}); });

View File

@ -352,7 +352,7 @@ describe('Toolbar actions - single selection : ', () => {
expect(await toolbar.isEmpty()).toBe(false, 'toolbar not displayed'); expect(await toolbar.isEmpty()).toBe(false, 'toolbar not displayed');
expect(await toolbar.isViewDetailsPresent()).toBe(true, `View details is not displayed for ${adminModerated}`); expect(await toolbar.isViewDetailsPresent()).toBe(true, `View details is not displayed for ${adminModerated}`);
expect(await toolbar.isButtonPresent('Cancel join request')).toBe(true, `Cancel join is not displayed for ${adminModerated}`); expect(await toolbar.isButtonPresent('Cancel Join Request')).toBe(true, `Cancel join is not displayed for ${adminModerated}`);
await toolbar.openMoreMenu(); await toolbar.openMoreMenu();
@ -406,7 +406,7 @@ describe('Toolbar actions - single selection : ', () => {
expect(await toolbar.isEmpty()).toBe(false, 'toolbar not displayed'); expect(await toolbar.isEmpty()).toBe(false, 'toolbar not displayed');
expect(await toolbar.isViewDetailsPresent()).toBe(true, `View details is not displayed for ${adminModerated}`); expect(await toolbar.isViewDetailsPresent()).toBe(true, `View details is not displayed for ${adminModerated}`);
expect(await toolbar.isButtonPresent('Cancel join request')).toBe(true, `Cancel join is not displayed for ${adminModerated}`); expect(await toolbar.isButtonPresent('Cancel Join Request')).toBe(true, `Cancel join is not displayed for ${adminModerated}`);
await toolbar.openMoreMenu(); await toolbar.openMoreMenu();

View File

@ -286,7 +286,7 @@ describe('Library actions', () => {
it('from Favorite Libraries - [C290108]', async () => { it('from Favorite Libraries - [C290108]', async () => {
await page.goToFavoriteLibrariesAndWait(); await page.goToFavoriteLibrariesAndWait();
await dataTable.selectItem(siteModerated2Admin); await dataTable.selectItem(siteModerated2Admin);
await toolbar.clickButton('Cancel join request'); await toolbar.clickButton('Cancel Join Request');
expect(await page.getSnackBarMessage()).toEqual(`Canceled the request to join the library`); expect(await page.getSnackBarMessage()).toEqual(`Canceled the request to join the library`);
@ -301,7 +301,7 @@ describe('Library actions', () => {
await dataTable.waitForBody(); await dataTable.waitForBody();
await dataTable.selectItem(siteSearchModerated2Admin); await dataTable.selectItem(siteSearchModerated2Admin);
await toolbar.clickButton('Cancel join request'); await toolbar.clickButton('Cancel Join Request');
expect(await page.getSnackBarMessage()).toEqual(`Canceled the request to join the library`); expect(await page.getSnackBarMessage()).toEqual(`Canceled the request to join the library`);

View File

@ -153,7 +153,7 @@ describe('Mark items as favorites', () => {
await dataTable.selectItem(fileFavUI); await dataTable.selectItem(fileFavUI);
await toolbar.openMoreMenu(); await toolbar.openMoreMenu();
expect(await toolbar.menu.getItemIconText('Remove favorite')).toEqual('star'); expect(await toolbar.menu.getItemIconText('Remove Favorite')).toEqual('star');
}); });
it('favorite a file - [C217189]', async () => { it('favorite a file - [C217189]', async () => {
@ -345,7 +345,7 @@ describe('Mark items as favorites', () => {
await dataTable.selectItem(fileFav2); await dataTable.selectItem(fileFav2);
await toolbar.openMoreMenu(); await toolbar.openMoreMenu();
expect(await toolbar.menu.getItemIconText('Remove favorite')).toEqual('star'); expect(await toolbar.menu.getItemIconText('Remove Favorite')).toEqual('star');
}); });
}); });

View File

@ -149,7 +149,7 @@ describe('New menu', () => {
await page.clickPersonalFiles(); await page.clickPersonalFiles();
await sidenav.openNewMenu(); await sidenav.openNewMenu();
const tooltip = await sidenav.menu.getItemTooltip('Create folder'); const tooltip = await sidenav.menu.getItemTooltip('Create Folder');
expect(tooltip).toContain('Create new folder'); expect(tooltip).toContain('Create new folder');
}); });
@ -158,7 +158,7 @@ describe('New menu', () => {
await dataTable.doubleClickOnRowByName(siteAdmin); await dataTable.doubleClickOnRowByName(siteAdmin);
await sidenav.openNewMenu(); await sidenav.openNewMenu();
const tooltip = await sidenav.menu.getItemTooltip('Create folder'); const tooltip = await sidenav.menu.getItemTooltip('Create Folder');
expect(tooltip).toContain(`Folders cannot be created whilst viewing the current items`); expect(tooltip).toContain(`Folders cannot be created whilst viewing the current items`);
}); });

View File

@ -339,16 +339,11 @@
"visible": "app.selection.file.canUploadVersion" "visible": "app.selection.file.canUploadVersion"
} }
}, },
{
"id": "app.create.separator.1",
"type": "separator",
"order": 300
},
{ {
"id": "app.toolbar.favorite", "id": "app.toolbar.favorite",
"comment": "workaround for Recent Files and Search API issue", "comment": "workaround for Recent Files and Search API issue",
"type": "custom", "type": "custom",
"order": 400, "order": 300,
"component": "app.toolbar.toggleFavorite", "component": "app.toolbar.toggleFavorite",
"rules": { "rules": {
"visible": "canToggleFavorite" "visible": "canToggleFavorite"
@ -357,7 +352,7 @@
{ {
"id": "app.libraries.toolbar.toggleFavorite", "id": "app.libraries.toolbar.toggleFavorite",
"type": "custom", "type": "custom",
"order": 401, "order": 301,
"component": "app.toolbar.toggleFavoriteLibrary", "component": "app.toolbar.toggleFavoriteLibrary",
"rules": { "rules": {
"visible": "app.selection.library" "visible": "app.selection.library"
@ -365,7 +360,7 @@
}, },
{ {
"id": "app.toolbar.favorite.add", "id": "app.toolbar.favorite.add",
"order": 402, "order": 302,
"title": "APP.ACTIONS.FAVORITE", "title": "APP.ACTIONS.FAVORITE",
"icon": "star_border", "icon": "star_border",
"actions": { "actions": {
@ -377,7 +372,7 @@
}, },
{ {
"id": "app.toolbar.favorite.remove", "id": "app.toolbar.favorite.remove",
"order": 403, "order": 303,
"title": "APP.ACTIONS.REMOVE_FAVORITE", "title": "APP.ACTIONS.REMOVE_FAVORITE",
"icon": "star", "icon": "star",
"actions": { "actions": {
@ -387,6 +382,11 @@
"visible": "app.toolbar.favorite.canRemove" "visible": "app.toolbar.favorite.canRemove"
} }
}, },
{
"id": "app.create.separator.1",
"type": "separator",
"order": 400
},
{ {
"id": "app.toolbar.editFolder", "id": "app.toolbar.editFolder",
"order": 450, "order": 450,
@ -404,21 +404,9 @@
"type": "separator", "type": "separator",
"order": 500 "order": 500
}, },
{
"id": "app.toolbar.copy",
"order": 600,
"title": "APP.ACTIONS.COPY",
"icon": "content_copy",
"actions": {
"click": "COPY_NODES"
},
"rules": {
"visible": "canCopyNode"
}
},
{ {
"id": "app.toolbar.move", "id": "app.toolbar.move",
"order": 700, "order": 600,
"title": "APP.ACTIONS.MOVE", "title": "APP.ACTIONS.MOVE",
"icon": "adf:move_file", "icon": "adf:move_file",
"actions": { "actions": {
@ -428,6 +416,18 @@
"visible": "app.selection.canDelete" "visible": "app.selection.canDelete"
} }
}, },
{
"id": "app.toolbar.copy",
"order": 700,
"title": "APP.ACTIONS.COPY",
"icon": "content_copy",
"actions": {
"click": "COPY_NODES"
},
"rules": {
"visible": "canCopyNode"
}
},
{ {
"id": "app.toolbar.delete", "id": "app.toolbar.delete",
"order": 800, "order": 800,
@ -485,36 +485,10 @@
} }
], ],
"contextMenu": [ "contextMenu": [
{
"id": "app.context.toggleLock",
"order": 100,
"type": "custom",
"component": "app.toolbar.toggleEditOffline",
"rules": {
"visible": "canToggleEditOffline"
}
},
{
"id": "app.context.menu.uploadNodeVersion",
"title": "APP.ACTIONS.UPLOAD_VERSION",
"order": 200,
"icon": "playlist_add",
"actions": {
"click": "UPLOAD_FILE_VERSION"
},
"rules": {
"visible": "app.selection.file.canUploadVersion"
}
},
{
"id": "app.create.separator.1",
"type": "separator",
"order": 300
},
{ {
"id": "app.context.menu.share", "id": "app.context.menu.share",
"type": "custom", "type": "custom",
"order": 400, "order": 100,
"component": "app.shared-link.toggleSharedLink", "component": "app.shared-link.toggleSharedLink",
"rules": { "rules": {
"visible": "canToggleSharedLink" "visible": "canToggleSharedLink"
@ -522,7 +496,7 @@
}, },
{ {
"id": "app.context.menu.download", "id": "app.context.menu.download",
"order": 500, "order": 200,
"title": "APP.ACTIONS.DOWNLOAD", "title": "APP.ACTIONS.DOWNLOAD",
"icon": "get_app", "icon": "get_app",
"actions": { "actions": {
@ -534,7 +508,7 @@
}, },
{ {
"id": "app.context.menu.preview", "id": "app.context.menu.preview",
"order": 600, "order": 300,
"title": "APP.ACTIONS.VIEW", "title": "APP.ACTIONS.VIEW",
"icon": "visibility", "icon": "visibility",
"actions": { "actions": {
@ -544,10 +518,48 @@
"visible": "canViewFile" "visible": "canViewFile"
} }
}, },
{
"id": "app.create.separator.1",
"type": "separator",
"order": 400
},
{
"id": "app.context.toggleLock",
"order": 500,
"type": "custom",
"component": "app.toolbar.toggleEditOffline",
"rules": {
"visible": "canToggleEditOffline"
}
},
{
"id": "app.context.menu.editFolder",
"order": 600,
"title": "APP.ACTIONS.EDIT",
"icon": "create",
"actions": {
"click": "EDIT_FOLDER"
},
"rules": {
"visible": "canEditFolder"
}
},
{
"id": "app.context.menu.uploadNodeVersion",
"title": "APP.ACTIONS.UPLOAD_VERSION",
"order": 700,
"icon": "playlist_add",
"actions": {
"click": "UPLOAD_FILE_VERSION"
},
"rules": {
"visible": "app.selection.file.canUploadVersion"
}
},
{ {
"id": "app.context.menu.favorite.add", "id": "app.context.menu.favorite.add",
"title": "APP.ACTIONS.FAVORITE", "title": "APP.ACTIONS.FAVORITE",
"order": 700, "order": 800,
"icon": "star_border", "icon": "star_border",
"actions": { "actions": {
"click": "ADD_FAVORITE" "click": "ADD_FAVORITE"
@ -559,7 +571,7 @@
{ {
"id": "app.context.menu.favorite.remove", "id": "app.context.menu.favorite.remove",
"title": "APP.ACTIONS.REMOVE_FAVORITE", "title": "APP.ACTIONS.REMOVE_FAVORITE",
"order": 701, "order": 801,
"icon": "star", "icon": "star",
"actions": { "actions": {
"click": "REMOVE_FAVORITE" "click": "REMOVE_FAVORITE"
@ -572,7 +584,7 @@
"id": "app.context.menu.favorite", "id": "app.context.menu.favorite",
"comment": "workaround for Recent Files and Search API issue", "comment": "workaround for Recent Files and Search API issue",
"type": "custom", "type": "custom",
"order": 702, "order": 802,
"component": "app.toolbar.toggleFavorite", "component": "app.toolbar.toggleFavorite",
"rules": { "rules": {
"visible": "canToggleFavorite" "visible": "canToggleFavorite"
@ -581,45 +593,21 @@
{ {
"id": "app.context.menu.libraries.toggleFavorite", "id": "app.context.menu.libraries.toggleFavorite",
"type": "custom", "type": "custom",
"order": 703, "order": 803,
"component": "app.toolbar.toggleFavoriteLibrary", "component": "app.toolbar.toggleFavoriteLibrary",
"rules": { "rules": {
"visible": "app.selection.library" "visible": "app.selection.library"
} }
}, },
{
"id": "app.context.menu.editFolder",
"order": 800,
"title": "APP.ACTIONS.EDIT",
"icon": "create",
"actions": {
"click": "EDIT_FOLDER"
},
"rules": {
"visible": "canEditFolder"
}
},
{ {
"id": "app.create.separator.2", "id": "app.create.separator.2",
"type": "separator", "type": "separator",
"order": 900 "order": 900
}, },
{
"id": "app.context.menu.copy",
"title": "APP.ACTIONS.COPY",
"order": 1000,
"icon": "content_copy",
"actions": {
"click": "COPY_NODES"
},
"rules": {
"visible": "canCopyNode"
}
},
{ {
"id": "app.context.menu.move", "id": "app.context.menu.move",
"title": "APP.ACTIONS.MOVE", "title": "APP.ACTIONS.MOVE",
"order": 1100, "order": 1000,
"icon": "adf:move_file", "icon": "adf:move_file",
"actions": { "actions": {
"click": "MOVE_NODES" "click": "MOVE_NODES"
@ -628,6 +616,18 @@
"visible": "app.selection.canDelete" "visible": "app.selection.canDelete"
} }
}, },
{
"id": "app.context.menu.copy",
"title": "APP.ACTIONS.COPY",
"order": 1100,
"icon": "content_copy",
"actions": {
"click": "COPY_NODES"
},
"rules": {
"visible": "canCopyNode"
}
},
{ {
"id": "app.context.menu.delete", "id": "app.context.menu.delete",
"title": "APP.ACTIONS.DELETE", "title": "APP.ACTIONS.DELETE",

View File

@ -54,9 +54,9 @@
"LABEL": "New", "LABEL": "New",
"TOOLTIP": "Add new files and folders, or create a new File Library", "TOOLTIP": "Add new files and folders, or create a new File Library",
"MENU_ITEMS": { "MENU_ITEMS": {
"CREATE_FOLDER": "Create folder", "CREATE_FOLDER": "Create Folder",
"UPLOAD_FILE": "Upload file", "UPLOAD_FILE": "Upload File",
"UPLOAD_FOLDER": "Upload folder", "UPLOAD_FOLDER": "Upload Folder",
"CREATE_LIBRARY": "Create Library" "CREATE_LIBRARY": "Create Library"
}, },
"TOOLTIPS": { "TOOLTIPS": {
@ -190,28 +190,28 @@
"COPY": "Copy", "COPY": "Copy",
"MOVE": "Move", "MOVE": "Move",
"DELETE": "Delete", "DELETE": "Delete",
"DELETE_PERMANENT": "Permanently delete", "DELETE_PERMANENT": "Permanently Delete",
"MORE": "More actions", "MORE": "More Actions",
"UNDO": "Undo", "UNDO": "Undo",
"PERMISSIONS": "Permissions", "PERMISSIONS": "Permissions",
"RESTORE": "Restore", "RESTORE": "Restore",
"FAVORITE": "Favorite", "FAVORITE": "Favorite",
"ADD_FAVORITE": "Add favorite", "ADD_FAVORITE": "Add Favorite",
"REMOVE_FAVORITE": "Remove favorite", "REMOVE_FAVORITE": "Remove Favorite",
"UNSHARE": "Unshare", "UNSHARE": "Unshare",
"DETAILS": "View details", "DETAILS": "View Details",
"VERSIONS": "Manage Versions", "VERSIONS": "Manage Versions",
"UPLOAD_VERSION": "Upload new version", "UPLOAD_VERSION": "Upload New Version",
"TOGGLE-SIDENAV": "Toggle side navigation bar", "TOGGLE-SIDENAV": "Toggle side navigation bar",
"SHARE": "Share", "SHARE": "Share",
"SHARE_EDIT": "Shared link settings", "SHARE_EDIT": "Shared Link Settings",
"PRINT": "Print", "PRINT": "Print",
"FULLSCREEN": "Activate full-screen mode", "FULLSCREEN": "Activate full-screen mode",
"JOIN": "Join", "JOIN": "Join",
"CANCEL_JOIN": "Cancel join request", "CANCEL_JOIN": "Cancel Join Request",
"LEAVE": "Leave library", "LEAVE": "Leave library",
"EDIT_OFFLINE": "Edit offline", "EDIT_OFFLINE": "Edit Offline",
"EDIT_OFFLINE_CANCEL": "Cancel editing" "EDIT_OFFLINE_CANCEL": "Cancel Editing"
}, },
"DIALOGS": { "DIALOGS": {
"CONFIRM_PURGE": { "CONFIRM_PURGE": {