UX: Apply decorators to small action posts (#24397)

This commit is contained in:
Penar Musaraj
2023-11-16 08:52:07 -05:00
committed by GitHub
parent 28f27b2490
commit f08e5c897e
3 changed files with 104 additions and 14 deletions

View File

@ -0,0 +1,24 @@
# frozen_string_literal: true
describe "Post small actions", type: :system do
fab!(:current_user) { Fabricate(:user) }
fab!(:topic) { Fabricate(:topic) }
fab!(:post) { Fabricate(:post, topic: topic) }
let(:topic_page) { PageObjects::Pages::Topic.new }
before { sign_in(current_user) }
it "applies local date decorations" do
post =
Fabricate(
:small_action,
raw: "[date=2023-11-15 timezone=\"America/Los_Angeles\"] a date",
topic: topic,
)
topic_page.visit_topic(topic)
expect(topic_page).to have_post_number(post.post_number)
expect(page).to have_css(".small-action-custom-message .discourse-local-date.cooked-date")
end
end