Skip to content

Commit

Permalink
[QOLDEV-312] handle test comment reporting without JavaScript
Browse files Browse the repository at this point in the history
- Enable the Report link to flag the comment even without script. It's clumsy for now, but better than nothing.
  • Loading branch information
ThrawnCA committed Sep 1, 2023
1 parent 8600fb9 commit d2fb263
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ckanext/data_qld/templates/package/comment_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ <h3>Reply to comment:</h3>
<i class="fa fa-flag"></i> Reported
</span>
{% if userobj and comment.flagged != True %}
<a class="btn btn-primary btn-xs flag-comment" title="Flag comment as inappropriate" data-module="flag-comment" data-module-content="This comment has been flagged as inappropriate and will be reviewed by an administrator." data-module-comment_id="{{ comment.id }}">
<a class="btn btn-primary btn-xs flag-comment" href="/comment/{{ comment.id }}/flag" title="Flag comment as inappropriate" data-module="flag-comment" data-module-content="This comment has been flagged as inappropriate and will be reviewed by an administrator." data-module-comment_id="{{ comment.id }}">
<i class="fa fa-flag"></i> Report
</a>
{% elif comment.flagged == True %}
Expand Down
4 changes: 3 additions & 1 deletion test/features/comments.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d2fb263

Please sign in to comment.