Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX: Post copy link not working (#25086)
Followup to c6cb319, the actionCallback function was double-wrapped with () => {} which meant that copyClipboard did not return a promise.
- Loading branch information
1 parent
6b8e051
commit b92993f
Showing
3 changed files
with
30 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# 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 |
b92993f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit has been mentioned on Discourse Meta. There might be relevant details there:
https://meta.discourse.org/t/copy-link-button-not-responding/290488/8