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()
2626 var cut = ctx . RenderComponent < DraftBlogPosts > ( ) ;
2727 cut . WaitForState ( ( ) => cut . FindAll ( ".blog-card" ) . Any ( ) ) ;
2828
29-
3029 var blogPosts = cut . FindComponents < ShortBlogPost > ( ) ;
3130
3231 blogPosts . Should ( ) . HaveCount ( 1 ) ;
Original file line number Diff line number Diff line change @@ -100,11 +100,13 @@ public async Task ShouldLoadPreviousBatchOnClick()
100100 var cut = ctx . RenderComponent < Index > ( ) ;
101101 cut . WaitForState ( ( ) => cut . FindAll ( ".blog-card" ) . Any ( ) ) ;
102102 cut . FindComponent < BlogPostNavigation > ( ) . Find ( "li:last-child a" ) . Click ( ) ;
103+ cut . WaitForState ( ( ) => cut . FindAll ( ".blog-card" ) . Count == 1 ) ;
103104
104105 cut . FindComponent < BlogPostNavigation > ( ) . Find ( "li:first-child a" ) . Click ( ) ;
105106
107+ cut . WaitForState ( ( ) => cut . FindAll ( ".blog-card" ) . Count > 1 ) ;
106108 var blogPosts = cut . FindComponents < ShortBlogPost > ( ) ;
107- blogPosts . Count . Should ( ) . Be ( 1 ) ;
109+ blogPosts . Count . Should ( ) . Be ( 10 ) ;
108110 }
109111
110112 private static AppConfiguration CreateSampleAppConfiguration ( )
Original file line number Diff line number Diff line change 11using System ;
2+ using System . Linq ;
23using System . Threading . Tasks ;
34using Bunit ;
45using FluentAssertions ;
@@ -21,6 +22,7 @@ public async Task ShouldOnlyDisplayTagsGivenByParameter()
2122 await AddBlogPostWithTagAsync ( "Tag 2" ) ;
2223 ctx . Services . AddScoped < IRepository > ( _ => BlogPostRepository ) ;
2324 var cut = ctx . RenderComponent < SearchByTag > ( p => p . Add ( s => s . Tag , "Tag 1" ) ) ;
25+ cut . WaitForState ( ( ) => cut . FindAll ( ".blog-card" ) . Any ( ) ) ;
2426
2527 var tags = cut . FindAll ( ".blog-card" ) ;
2628
@@ -34,6 +36,7 @@ public async Task ShouldHandleSpecialCharacters()
3436 await AddBlogPostWithTagAsync ( "C#" ) ;
3537 ctx . Services . AddScoped < IRepository > ( _ => BlogPostRepository ) ;
3638 var cut = ctx . RenderComponent < SearchByTag > ( p => p . Add ( s => s . Tag , Uri . EscapeDataString ( "C#" ) ) ) ;
39+ cut . WaitForState ( ( ) => cut . FindAll ( ".blog-card" ) . Any ( ) ) ;
3740
3841 var tags = cut . FindAll ( ".blog-card" ) ;
3942
You can’t perform that action at this time.
0 commit comments