FIX: Display new-new selector on glimmer topic list (#27602)
This commit is contained in:
parent
a07ddf4ec0
commit
fd2713e904
|
@ -136,7 +136,7 @@ export default class TopicListHeaderColumn extends Component {
|
|||
{{/if}}
|
||||
|
||||
{{#unless @bulkSelectEnabled}}
|
||||
{{#if this.showTopicsAndRepliesToggle}}
|
||||
{{#if @showTopicsAndRepliesToggle}}
|
||||
<NewListHeaderControls
|
||||
@current={{@newListSubset}}
|
||||
@newRepliesCount={{@newRepliesCount}}
|
||||
|
|
|
@ -35,3 +35,23 @@ Fabricator(:group_private_message_topic, from: :topic) do
|
|||
topic_allowed_users { |t| [Fabricate.build(:topic_allowed_user, user: t[:user])] }
|
||||
topic_allowed_groups { |t| [Fabricate.build(:topic_allowed_group, group: t[:recipient_group])] }
|
||||
end
|
||||
|
||||
Fabricator(:new_reply_topic, from: :topic) do
|
||||
transient :current_user
|
||||
|
||||
before_create do |topic, transient|
|
||||
if !transient[:current_user]
|
||||
raise "new_reply_topic fabricator requires the `current_user` param"
|
||||
end
|
||||
end
|
||||
|
||||
after_create do |topic, transient|
|
||||
Fabricate.times(2, :post, topic: topic)
|
||||
TopicUser.change(
|
||||
transient[:current_user].id,
|
||||
topic.id,
|
||||
notification_level: TopicUser.notification_levels[:tracking],
|
||||
)
|
||||
TopicUser.update_last_read(transient[:current_user], topic.id, 1, 1, 1)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -20,6 +20,23 @@ describe "glimmer topic list", type: :system do
|
|||
end
|
||||
end
|
||||
|
||||
describe "/new" do
|
||||
let(:topic_list) { PageObjects::Components::TopicList.new }
|
||||
|
||||
it "shows the list and the toggle buttons" do
|
||||
SiteSetting.experimental_new_new_view_groups = group.name
|
||||
Fabricate(:topic)
|
||||
Fabricate(:new_reply_topic, current_user: user)
|
||||
|
||||
visit("/new")
|
||||
|
||||
expect(topic_list).to have_topics(count: 2)
|
||||
expect(page).to have_css(".topics-replies-toggle.--all")
|
||||
expect(page).to have_css(".topics-replies-toggle.--topics")
|
||||
expect(page).to have_css(".topics-replies-toggle.--replies")
|
||||
end
|
||||
end
|
||||
|
||||
describe "categories-with-featured-topics page" do
|
||||
let(:category_list) { PageObjects::Components::CategoryList.new }
|
||||
|
||||
|
|
Loading…
Reference in New Issue