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 19
19
<i class =" twitter me-3" ></i >Share on X
20
20
</a >
21
21
</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 >
22
27
</ul >
23
28
</div >
24
29
@code {
25
30
private string LinkedInShare => $" https://www.linkedin.com/shareArticle?mini=true&url={NavigationManager .Uri }" ;
26
31
private string XShare => $" https://twitter.com/intent/tweet?url={NavigationManager .Uri }" ;
32
+ private string BlueskyShare => $" https://bsky.app/intent/compose?text={NavigationManager .Uri }" ;
27
33
}
Original file line number Diff line number Diff line change @@ -43,4 +43,15 @@ public void ShouldShareToX()
43
43
var linkedInShare = ( IHtmlAnchorElement ) cut . Find ( "#share-x" ) ;
44
44
linkedInShare . Href . ShouldBe ( "https://twitter.com/intent/tweet?url=http://localhost/blogPost/1" ) ;
45
45
}
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
+ }
46
57
}
You can’t perform that action at this time.
0 commit comments