mirror of
https://github.com/discourse/discourse.git
synced 2026-08-07 13:19:19 +08:00
* Do not show the direct Zoom link when the livestream is enabled for the event, we want to keep people on the Discourse site <img width="942" height="637" alt="image" src="https://github.com/user-attachments/assets/6267ce8d-7848-4a7d-8769-78f82dd87417" /> * Prompt anonymous users to log in when Join Zoom is clicked
54 lines
2 KiB
Ruby
Vendored
54 lines
2 KiB
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
describe "Discourse Livestream - Topic Livestream - Mobile - Authenticated", mobile: true do
|
|
fab!(:admin)
|
|
fab!(:current_user) { Fabricate(:user, trust_level: TrustLevel[3]) }
|
|
fab!(:category)
|
|
let(:topic_page) { PageObjects::Pages::Topic.new }
|
|
let(:composer) { PageObjects::Components::Composer.new }
|
|
let(:topic_livestream) { PageObjects::Pages::TopicLivestream.new }
|
|
|
|
before do
|
|
SiteSetting.calendar_enabled = true
|
|
SiteSetting.chat_enabled = true
|
|
SiteSetting.discourse_post_event_enabled = true
|
|
topic_livestream.cache_livestream_onebox
|
|
sign_in(admin)
|
|
end
|
|
|
|
context "when in a topic view" do
|
|
it "does not display livestream chat icon on regular topics" do
|
|
topic_livestream.create_regular_topic(composer, topic_page)
|
|
expect(topic_page).not_to have_css(".livestream-header-icon")
|
|
end
|
|
|
|
it "displays the livestream chat icon on livestream topics" do
|
|
topic_livestream.create_livestream_event_topic(composer, topic_page)
|
|
|
|
expect(topic_page).to have_css(".chat-header-icon")
|
|
|
|
expect(topic_page).to have_css(".livestream-header-icon")
|
|
end
|
|
|
|
it "opens the chat channel and displays the preview after clicking the header icon" do
|
|
topic_livestream.create_livestream_event_topic(composer, topic_page)
|
|
|
|
find(".livestream-header-icon").click
|
|
expect(topic_page).to have_css("#custom-chat-container")
|
|
expect(topic_page).to have_css(".chat-channel-preview-card")
|
|
end
|
|
|
|
context "when the user is going to the event" do
|
|
it "opens the chat channel and allows chatting after clicking the header icon" do
|
|
topic_livestream.create_livestream_event_topic(composer, topic_page)
|
|
|
|
find(".going-button").click
|
|
find(".livestream-header-icon").click
|
|
expect(topic_page).to have_css("#custom-chat-container")
|
|
expect(topic_page).to have_css(".chat-drawer")
|
|
|
|
expect(topic_page).to have_css(".chat-composer")
|
|
end
|
|
end
|
|
end
|
|
end
|