[ACA-1797] add tests for viewer actions extension (#666)

This commit is contained in:
Adina Parpalita
2018-09-25 09:29:21 +01:00
committed by Denys Vuika
parent 8f0ae1a917
commit b2b0da4c86
5 changed files with 996 additions and 756 deletions
File diff suppressed because it is too large Load Diff
@@ -628,7 +628,70 @@
}
],
"viewer": {
"toolbar": [
"toolbarActions": [
{
"id": "app.toolbar.download",
"order": 100,
"title": "My custom title",
"icon": "get_app",
"actions": {
"click": "DOWNLOAD_NODES"
},
"rules": {
"visible": "app.toolbar.canDownload"
}
},
{
"id": "app.toolbar.my-action",
"order": 150,
"title": "My action",
"icon": "http",
"actions": {
"click": "SHARE_NODE"
},
"rules": {
"visible": "app.selection.file.canShare"
}
},
{
"id": "app.viewer.print",
"order": 200,
"title": "APP.ACTIONS.PRINT",
"icon": "print",
"disabled": true,
"actions": {
"click": "PRINT_FILE"
},
"rules": {
"visible": "app.toolbar.canViewFile"
}
},
{
"id": "app.viewer.share",
"order": 300,
"title": "APP.ACTIONS.SHARE",
"icon": "share",
"actions": {
"click": "SHARE_NODE"
},
"rules": {
"visible": "app.selection.file.canShare"
}
},
{
"id": "app.viewer.fullscreen",
"order": 400,
"title": "APP.ACTIONS.FULLSCREEN",
"icon": "fullscreen",
"actions": {
"click": "FULLSCREEN_VIEWER"
},
"rules": {
"visible": "app.toolbar.canViewFile"
}
}
],
"toolbarMoreMenu": [
{
"id": "app.viewer.favorite.add",
"order": 100,
@@ -653,6 +716,28 @@
"visible": "app.toolbar.favorite.canRemove"
}
},
{
"id": "app.viewer.favorite",
"comment": "workaround for Recent Files and Search API issue",
"type": "custom",
"order": 101,
"component": "app.toolbar.toggleFavorite",
"rules": {
"visible": "app.toolbar.favorite.canToggle"
}
},
{
"id": "app.toolbar.my-secondary-action",
"order": 150,
"title": "My secondary action",
"icon": "alarm",
"actions": {
"click": "PRINT_FILE"
},
"rules": {
"visible": "app.toolbar.canViewFile"
}
},
{
"id": "app.viewer.share",
"order": 300,
@@ -680,7 +765,7 @@
{
"id": "app.viewer.move",
"order": 500,
"title": "APP.ACTIONS.MOVE",
"title": "My new title",
"icon": "library_books",
"actions": {
"click": "MOVE_NODES"
@@ -717,6 +802,7 @@
"id": "app.viewer.permissions",
"order": 800,
"title": "APP.ACTIONS.PERMISSIONS",
"disabled": true,
"icon": "settings_input_component",
"actions": {
"click": "MANAGE_PERMISSIONS"