diff --git a/decidim-core/lib/decidim/core/test/shared_examples/manage_component_share_tokens.rb b/decidim-core/lib/decidim/core/test/shared_examples/manage_component_share_tokens.rb index c7b5bac0c9ad2..2892b64507028 100644 --- a/decidim-core/lib/decidim/core/test/shared_examples/manage_component_share_tokens.rb +++ b/decidim-core/lib/decidim/core/test/shared_examples/manage_component_share_tokens.rb @@ -59,6 +59,16 @@ def visit_share_component expect(page).to have_css("#share_token_no_expiration_true") end + it "allows copying the share link from the share token" do + within ".share_tokens tbody tr:first-child" do + click_on "Copy link" + end + + expect(page).to have_css("[data-clipboard-copy-label]") + expect(page).to have_css("[data-clipboard-copy-message]") + expect(page).to have_css("[data-clipboard-content]") + end + it "has a share link for each token" do urls = share_tokens.map(&:url).map { |url| url.split("?").first } within ".share_tokens tbody tr:first-child" do