mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 05:48:23 +08:00

Followup to c6cb3196718ba2dde8e799f5d9cdd999f3116d1f, the actionCallback function was double-wrapped with () => {} which meant that copyClipboard did not return a promise.
23 lines
598 B
Ruby
23 lines
598 B
Ruby
# frozen_string_literal: true
|
|
|
|
describe "Post menu", type: :system, js: true do
|
|
fab!(:current_user) { Fabricate(:user) }
|
|
fab!(:post)
|
|
|
|
let(:topic_page) { PageObjects::Pages::Topic.new }
|
|
|
|
before { sign_in(current_user) }
|
|
|
|
describe "copy link" do
|
|
let(:cdp) { PageObjects::CDP.new }
|
|
|
|
before { cdp.allow_clipboard }
|
|
|
|
xit "copies the absolute link to the post when clicked" do
|
|
topic_page.visit_topic(post.topic)
|
|
topic_page.click_post_action_button(post, :copy_link)
|
|
expect(cdp.read_clipboard).to eq(post.full_url + "?u=#{current_user.username}")
|
|
end
|
|
end
|
|
end
|