2023-04-20 03:49:35 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2023-06-06 21:26:58 -04:00
|
|
|
describe "Composer don't feed the trolls popup", type: :system do
|
2023-11-09 17:47:59 -05:00
|
|
|
fab!(:user)
|
2023-04-20 03:49:35 -04:00
|
|
|
fab!(:troll) { Fabricate(:user) }
|
|
|
|
fab!(:topic) { Fabricate(:topic, user: user) }
|
|
|
|
fab!(:post) { Fabricate(:post, user: user, topic: topic) }
|
|
|
|
fab!(:reply) { Fabricate(:post, user: troll, topic: topic) }
|
2024-05-22 22:19:07 -04:00
|
|
|
fab!(:flag) { Fabricate(:flag_post_action, post: reply, user: user) }
|
2023-04-20 03:49:35 -04:00
|
|
|
let(:topic_page) { PageObjects::Pages::Topic.new }
|
|
|
|
|
|
|
|
before { sign_in user }
|
|
|
|
|
|
|
|
it "shows a popup when about to reply to a troll" do
|
2023-05-31 09:18:45 -04:00
|
|
|
skip(
|
|
|
|
"TGX: This does not work when Capybara.disable_animation is set to true. We're in the midst of fixing this.",
|
|
|
|
)
|
|
|
|
|
2023-04-20 03:49:35 -04:00
|
|
|
SiteSetting.educate_until_posts = 0
|
|
|
|
|
|
|
|
topic_page.visit_topic(topic)
|
|
|
|
topic_page.click_post_action_button(reply, :reply)
|
|
|
|
|
|
|
|
expect(topic_page).to have_composer_popup_content(I18n.t("education.dont_feed_the_trolls"))
|
|
|
|
end
|
|
|
|
end
|