File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components
tests/LinkDotNet.Blog.UnitTests/Web/Features/ShowBlogPost/Components Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 1919 <i class =" twitter me-3" ></i >Share on X
2020 </a >
2121 </li >
22+ <li >
23+ <a id =" share-bluesky" class =" dropdown-item" href =" @BlueskyShare" target =" _blank" rel =" noreferrer" >
24+ <i class =" bluesky me-3" ></i >Share on Bluesky
25+ </a >
26+ </li >
2227 </ul >
2328</div >
2429@code {
2530 private string LinkedInShare => $" https://www.linkedin.com/shareArticle?mini=true&url={NavigationManager .Uri }" ;
2631 private string XShare => $" https://twitter.com/intent/tweet?url={NavigationManager .Uri }" ;
32+ private string BlueskyShare => $" https://bsky.app/intent/compose?text={NavigationManager .Uri }" ;
2733}
Original file line number Diff line number Diff line change @@ -43,4 +43,15 @@ public void ShouldShareToX()
4343 var linkedInShare = ( IHtmlAnchorElement ) cut . Find ( "#share-x" ) ;
4444 linkedInShare . Href . ShouldBe ( "https://twitter.com/intent/tweet?url=http://localhost/blogPost/1" ) ;
4545 }
46+
47+ [ Fact ]
48+ public void ShouldShareToBluesky ( )
49+ {
50+ Services . GetRequiredService < BunitNavigationManager > ( ) . NavigateTo ( "blogPost/1" ) ;
51+
52+ var cut = Render < ShareBlogPost > ( ) ;
53+
54+ var blueskyShare = ( IHtmlAnchorElement ) cut . Find ( "#share-bluesky" ) ;
55+ blueskyShare . Href . ShouldBe ( "https://bsky.app/intent/compose?text=http://localhost/blogPost/1" ) ;
56+ }
4657}
You can’t perform that action at this time.
0 commit comments