Skip to content

Commit

Permalink
add spec check allows copying the share link from the share token
Browse files Browse the repository at this point in the history
  • Loading branch information
ElviaBth committed Jul 19, 2024
1 parent b8695c4 commit f116064
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f116064

Please sign in to comment.