File tree Expand file tree Collapse file tree 2 files changed +20
-6
lines changed
LinkDotNet.Blog.IntegrationTests/Web/Shared
LinkDotNet.Blog.Web/Shared Expand file tree Collapse file tree 2 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 1
1
using System . Linq ;
2
- using AngleSharp . Dom ;
2
+ using AngleSharp . Html . Dom ;
3
3
using Bunit ;
4
4
using Bunit . TestDoubles ;
5
5
using FluentAssertions ;
6
6
using LinkDotNet . Blog . Web ;
7
7
using LinkDotNet . Blog . Web . Shared ;
8
+ using LinkDotNet . Domain ;
8
9
using Microsoft . AspNetCore . Components ;
9
10
using Microsoft . Extensions . DependencyInjection ;
10
11
using Xunit ;
@@ -50,5 +51,23 @@ public void ShouldDisplayGithubAndLinkedInPageWhenOnlyWhenSet(
50
51
cut . FindAll ( "li" ) . Any ( l => l . TextContent . Contains ( "Github" ) ) . Should ( ) . Be ( githubAvailable ) ;
51
52
cut . FindAll ( "li" ) . Any ( l => l . TextContent . Contains ( "LinkedIn" ) ) . Should ( ) . Be ( linkedinAvailable ) ;
52
53
}
54
+
55
+ [ Fact ]
56
+ public void ShouldDisplayAboutMePage ( )
57
+ {
58
+ var config = new AppConfiguration
59
+ {
60
+ ProfileInformation = new ProfileInformation ( ) ,
61
+ } ;
62
+ Services . AddScoped ( _ => config ) ;
63
+ this . AddTestAuthorization ( ) ;
64
+
65
+ var cut = RenderComponent < NavMenu > ( ) ;
66
+
67
+ cut
68
+ . FindAll ( ".nav-link" ) . ToList ( )
69
+ . Cast < IHtmlAnchorElement > ( )
70
+ . Count ( a => a . Href . Contains ( "AboutMe" ) ) . Should ( ) . Be ( 1 ) ;
71
+ }
53
72
}
54
73
}
Original file line number Diff line number Diff line change 18
18
}
19
19
20
20
var trimmed = searchTerm .Trim ();
21
- if (trimmed == string .Empty )
22
- {
23
- return ;
24
- }
25
-
26
21
await SearchEntered .InvokeAsync (trimmed );
27
22
}
28
23
You can’t perform that action at this time.
0 commit comments