Skip to content

Commit

Permalink
Merge branch 'wip-NXDRIVE-2912-Display-drive-notification-for-documen…
Browse files Browse the repository at this point in the history
…t-review' of https://github.com/nuxeo/nuxeo-drive into wip-NXDRIVE-2912-Display-drive-notification-for-document-review
  • Loading branch information
poojadaine committed May 23, 2024
2 parents 80b54e8 + 8dbc618 commit 7fb4e12
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
4 changes: 3 additions & 1 deletion nxdrive/data/i18n/i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@
"FREE_DISK_SPACE": "(Free disk space: %1)",
"GENERATING": "Generating…",
"GIVE_OPINION": "Give your Opinion",
"HANDLE_TASKS": "Handle tasks",
"HELP": "Help",
"HISTORY": "History",
"HOST": "Host",
Expand Down Expand Up @@ -296,7 +297,8 @@
"PASSWORD": "Password",
"PENDING_TASKS": "Review Required",
"PERSONAL_SPACE": "Personal space",
"PENDING_DOCUMENT_REVIEWS": "New task(s) to review",
"PENDING_DOCUMENT_REVIEWS": "Awaiting document review %1",
"PENDING_TASK_REVIEWS": "New task(s) to review",
"PROXY": "Proxy",
"PROXY_APPLIED": "Proxy settings have been updated",
"PROXY_CHANGE_SETTINGS": "Proxy",
Expand Down
4 changes: 2 additions & 2 deletions nxdrive/data/qml/Systray.qml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ Rectangle {
api.open_tasks_window(accountSelect.getRole("uid"))
}
//tooltip: api.get_hostname_from_url(accountSelect.getRole("server_url"))
tooltip: qsTr("HANDLE_TASKS") + tl.tr
}

// Icon 3: open remote server's URL
Expand Down Expand Up @@ -291,8 +292,7 @@ Rectangle {
name: "pending_tasks"
PropertyChanges {
target: taskState
//text: qsTr("PENDING_DOCUMENT_REVIEWS").arg(pendingTasksCount) + tl.tr
text: qsTr("PENDING_DOCUMENT_REVIEWS")
text: qsTr("PENDING_TASK_REVIEWS")
onClicked: {
tasks_model.loadList(api.get_Tasks_list(accountSelect.getRole("uid")), api.get_username(accountSelect.getRole("uid")))
api.open_tasks_window(accountSelect.getRole("uid"))
Expand Down
24 changes: 15 additions & 9 deletions tests/functional/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

from nxdrive.gui.api import QMLDriveApi

# from nxdrive.gui.application import Application


def test_web_authentication(manager_factory, nuxeo_url):
manager = manager_factory(with_engine=False)
Expand Down Expand Up @@ -183,14 +181,22 @@ def test_get_tasks_list(manager_factory):
dummy_task = Mock()
dummy_task.actors = [{"id": "user:Administrator"}]
dummy_task.created = "2024-04-04T08:31:04.366Z"
dummy_task.directive = ("wf.serialDocumentReview.AcceptReject",)
dummy_task.dueDate = ("2024-04-09T08:31:04.365Z",)
dummy_task.id = ("e7fc7a3a-5c39-479f-8382-65ed08e8116d",)
dummy_task.name = ("wf.serialDocumentReview.DocumentValidation",)
dummy_task.targetDocumentIds = ([{"id": "5b77e4dd-c155-410b-9d4d-e72f499638b8"}],)
dummy_task.workflowInstanceId = ("81133cf7-38d9-483c-9a0b-c98fc02822a0",)
dummy_task.directive = "wf.serialDocumentReview.AcceptReject"
dummy_task.dueDate = "2024-04-09T08:31:04.365Z"
dummy_task.id = "e7fc7a3a-5c39-479f-8382-65ed08e8116d"
dummy_task.name = "wf.serialDocumentReview.DocumentValidation"
dummy_task.targetDocumentIds = [{"id": "5b77e4dd-c155-410b-9d4d-e72f499638b8"}]
dummy_task.workflowInstanceId = "81133cf7-38d9-483c-9a0b-c98fc02822a0"
dummy_task.workflowModelName = "SerialDocumentReview"
dummy_task_list = [dummy_task]
dummy_task1 = dummy_task
dummy_task1.directive = "wf.pleaseSelect"
dummy_task2 = dummy_task
dummy_task2.directive = "wf.give_opinion"
dummy_task3 = dummy_task
dummy_task3.directive = "wf.consolidate"
dummy_task4 = dummy_task
dummy_task4.directive = "wf.updateRequest"
dummy_task_list = [dummy_task, dummy_task1, dummy_task2, dummy_task3, dummy_task4]

def mocked_open_authentication_dialog():
return
Expand Down

0 comments on commit 7fb4e12

Please sign in to comment.