Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ export default apiInitializer((api) => {
return;
}

const router = api.container.lookup("service:router");
if (router.currentRouteName?.startsWith("nested")) {
dag.delete("replies");
}

dag.add("nested-replies-expand", NestedRepliesExpandButton);
});

Expand Down
6 changes: 6 additions & 0 deletions spec/system/nested_view_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
expect(nested_view).to have_root_post(root_reply)
end

it "does not show the standard replies button on the OP" do
nested_view.visit_nested(topic)

expect(nested_view).to have_no_show_replies_button_for(op)
end

it "shows the original post content" do
op.update!(raw: "This is the original post content")
op.rebake!
Expand Down
4 changes: 4 additions & 0 deletions spec/system/page_objects/pages/nested_view.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ def has_no_replies_toggle_for?(post)
)
end

def has_no_show_replies_button_for?(post)
has_no_css?("[data-post-number='#{post.post_number}'] .post-action-menu__show-replies")
end

def has_depth_line_for?(post)
wrapper = nested_post_wrapper(post)
wrapper.find(".nested-post__gutter", match: :first).has_css?(".nested-post__depth-line")
Expand Down