Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AO3-6834 Add Parent Thread link to unreviewed comments #4956

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions app/views/comments/_comment_actions.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@
<% end %>
<% unless comment.unreviewed? %>
<li><%= link_to ts("Thread"), comment %></li>
<% if comment.depth > 0 %>
<li>
<%= link_to ts("Parent Thread"), comment_path(id: comment.thread) %>
</li>
<% end %>
<% end %>
<% if comment.depth > 0 %>
<li><%= link_to ts("Parent Thread"), comment_path(id: comment.thread) %></li>

Check failure on line 18 in app/views/comments/_comment_actions.html.erb

View workflow job for this annotation

GitHub Actions / ERB Lint runner

[] reported by reviewdog 🐶 I18n/DeprecatedHelper: Prefer Rails built-in `t` helper over `ts` and move the text into the yml file. `ts` is not actually translatable. For more information, refer to https://github.com/otwcode/otwarchive/wiki/Internationalization-(i18n)-Standards Raw Output: app/views/comments/_comment_actions.html.erb:18:20: I18n/DeprecatedHelper: Prefer Rails built-in `t` helper over `ts` and move the text into the yml file. `ts` is not actually translatable. For more information, refer to https://github.com/otwcode/otwarchive/wiki/Internationalization-(i18n)-Standards
<% end %>
<% if can_freeze_comment?(comment) %>
<li><%= freeze_comment_button(comment) %></li>
Expand Down
22 changes: 22 additions & 0 deletions features/comments_and_kudos/comment_moderation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -307,3 +307,25 @@ Feature: Comment Moderation
Then I should see "All moderated comments approved."
When I view the work "Moderation"
Then I should see "Comments (4)"

Scenario: I can view the parent thread of an unreviewed comment
Given the moderated work "Moderation" by "author" with the approved comment "Test comment" by "commenter"
And I am logged in as "new_commenter"
When I view the work "Moderation"
And I follow "Comments (1)"
And I follow "Reply" within ".odd"
And I fill in "Comment" with "A moderated reply" within ".odd"
And I press "Comment" within ".odd"
When I am logged in as "author"
And I view the work "Moderation"
And I follow "Unreviewed Comments (1)"
And I follow "Parent Thread"
Then I should see "Test comment"
When I view the unreviewed comments page for "Moderation"
And I press "Approve"
When I am logged in as "new_commenter"
And I post the comment "Zero-depth comment" on the work "Moderation"
When I am logged in as "author"
And I view the work "Moderation"
And I follow "Unreviewed Comments (1)"
Then I should not see "Parent Thread"
Loading