File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
LinkDotNet.Blog.IntegrationTests/Web/Pages Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ public async Task ShouldOnlyShowPublishedPosts()
26
26
var cut = ctx . RenderComponent < DraftBlogPosts > ( ) ;
27
27
cut . WaitForState ( ( ) => cut . FindAll ( ".blog-card" ) . Any ( ) ) ;
28
28
29
-
30
29
var blogPosts = cut . FindComponents < ShortBlogPost > ( ) ;
31
30
32
31
blogPosts . Should ( ) . HaveCount ( 1 ) ;
Original file line number Diff line number Diff line change @@ -100,11 +100,13 @@ public async Task ShouldLoadPreviousBatchOnClick()
100
100
var cut = ctx . RenderComponent < Index > ( ) ;
101
101
cut . WaitForState ( ( ) => cut . FindAll ( ".blog-card" ) . Any ( ) ) ;
102
102
cut . FindComponent < BlogPostNavigation > ( ) . Find ( "li:last-child a" ) . Click ( ) ;
103
+ cut . WaitForState ( ( ) => cut . FindAll ( ".blog-card" ) . Count == 1 ) ;
103
104
104
105
cut . FindComponent < BlogPostNavigation > ( ) . Find ( "li:first-child a" ) . Click ( ) ;
105
106
107
+ cut . WaitForState ( ( ) => cut . FindAll ( ".blog-card" ) . Count > 1 ) ;
106
108
var blogPosts = cut . FindComponents < ShortBlogPost > ( ) ;
107
- blogPosts . Count . Should ( ) . Be ( 1 ) ;
109
+ blogPosts . Count . Should ( ) . Be ( 10 ) ;
108
110
}
109
111
110
112
private static AppConfiguration CreateSampleAppConfiguration ( )
Original file line number Diff line number Diff line change 1
1
using System ;
2
+ using System . Linq ;
2
3
using System . Threading . Tasks ;
3
4
using Bunit ;
4
5
using FluentAssertions ;
@@ -21,6 +22,7 @@ public async Task ShouldOnlyDisplayTagsGivenByParameter()
21
22
await AddBlogPostWithTagAsync ( "Tag 2" ) ;
22
23
ctx . Services . AddScoped < IRepository > ( _ => BlogPostRepository ) ;
23
24
var cut = ctx . RenderComponent < SearchByTag > ( p => p . Add ( s => s . Tag , "Tag 1" ) ) ;
25
+ cut . WaitForState ( ( ) => cut . FindAll ( ".blog-card" ) . Any ( ) ) ;
24
26
25
27
var tags = cut . FindAll ( ".blog-card" ) ;
26
28
@@ -34,6 +36,7 @@ public async Task ShouldHandleSpecialCharacters()
34
36
await AddBlogPostWithTagAsync ( "C#" ) ;
35
37
ctx . Services . AddScoped < IRepository > ( _ => BlogPostRepository ) ;
36
38
var cut = ctx . RenderComponent < SearchByTag > ( p => p . Add ( s => s . Tag , Uri . EscapeDataString ( "C#" ) ) ) ;
39
+ cut . WaitForState ( ( ) => cut . FindAll ( ".blog-card" ) . Any ( ) ) ;
37
40
38
41
var tags = cut . FindAll ( ".blog-card" ) ;
39
42
You can’t perform that action at this time.
0 commit comments