From 91ab795e38138d565a83021874dd4272c6885031 Mon Sep 17 00:00:00 2001 From: Ahmed Ejaz Date: Wed, 22 Nov 2023 22:11:10 +0500 Subject: [PATCH] #1448, add specs --- spec/views/inbox/_entry.html.haml_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/views/inbox/_entry.html.haml_spec.rb b/spec/views/inbox/_entry.html.haml_spec.rb index c8df132f..02dd3559 100644 --- a/spec/views/inbox/_entry.html.haml_spec.rb +++ b/spec/views/inbox/_entry.html.haml_spec.rb @@ -94,6 +94,11 @@ describe "inbox/_entry.html.haml", type: :view do expect(rendered).to have_css(%(.inbox-entry__sharing a.btn[data-inbox-sharing-target="twitter"])) end + it "has a link-button to copy to clipboard" do + expected_attribute_selectors = %([data-controller="clipboard"][data-action="clipboard#copy"][data-inbox-sharing-target="clipboard"]) + expect(rendered).to have_css(%(.inbox-entry__sharing a.btn#{expected_attribute_selectors})) + end + it "does not have a link-button to share to a custom site" do expect(rendered).not_to have_css(%(.inbox-entry__sharing a.btn[data-inbox-sharing-target="custom"])) end