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-6058 Hide byline of unrevealed work in notes of child related work #3911

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 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
2 changes: 2 additions & 0 deletions app/views/works/_work_header_notes.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@

<% if related_work.parent.is_a?(ExternalWork) %>
<%= link_to related_work.parent.title.html_safe, related_work.parent %> by <%= byline(related_work.parent) %>.
<% elsif related_work.parent.unrevealed? %>
<%= ts("a work in an unrevealed collection.") %>
<% elsif related_work.parent.restricted? && !logged_in? %>
<%= ts("[Restricted Work] by") %> <%= byline(related_work.parent) %>. <%= ts("Log in to view.") %>
<% else %>
Expand Down
11 changes: 11 additions & 0 deletions features/works/work_related.feature
Original file line number Diff line number Diff line change
Expand Up @@ -583,3 +583,14 @@ Scenario: When a user is notified that a co-authored work has been inspired by a
And I should not see "A work in an unrevealed collection"
And I should not see "Worldbuilding Translated by translator"
And I should not see "From English to Deutsch"

Scenario: A work that is inspired by a work in an unrevealed collection does not list the title or creator of the unrevealed work in its notes
Given a hidden collection "Hidden"
And I have related works setup
When I am logged in as "inspiration"
And I add the work "Worldbuilding" to the collection "Hidden"
And I post a related work as remixer
When I view the work "Followup"
Then I should not see "Worldbuilding"
And I should not see "inspiration"
And I should see "Inspired by a work in an unrevealed collection."