From d2fb263cb4e0ddff95781eeaad3e8467c11bd6ee Mon Sep 17 00:00:00 2001 From: antuarc Date: Fri, 1 Sep 2023 15:44:31 +1000 Subject: [PATCH] [QOLDEV-312] handle test comment reporting without JavaScript - Enable the Report link to flag the comment even without script. It's clumsy for now, but better than nothing. --- ckanext/data_qld/templates/package/comment_list.html | 2 +- test/features/comments.feature | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ckanext/data_qld/templates/package/comment_list.html b/ckanext/data_qld/templates/package/comment_list.html index 0f003ce7..4d2846e5 100644 --- a/ckanext/data_qld/templates/package/comment_list.html +++ b/ckanext/data_qld/templates/package/comment_list.html @@ -80,7 +80,7 @@

Reply to comment:

Reported {% if userobj and comment.flagged != True %} - + Report {% elif comment.flagged == True %} diff --git a/test/features/comments.feature b/test/features/comments.feature index bf5fbe9e..dd85f261 100644 --- a/test/features/comments.feature +++ b/test/features/comments.feature @@ -105,7 +105,9 @@ Feature: Comments When I press the element with xpath "//a[contains(@class, 'flag-comment')][1]" And I confirm the dialog containing "comment has been flagged as inappropriate" if present - Then I should see "Reported" within 5 seconds + And I wait for 5 seconds + And I go to data request "$last_generated_title" comments + Then I should see "Reported" And I should receive a base64 email at "test_org_admin@localhost" containing "This comment has been flagged as inappropriate by a user" @comment-reply