File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed
LinkDotNet.Blog.UnitTests/Web/Shared/Admin
LinkDotNet.Blog.Web/Shared Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -55,5 +55,26 @@ public void ShouldFillGivenBlogPost()
55
55
blogPostFromComponent . ShortDescription . Should ( ) . Be ( "Desc" ) ;
56
56
blogPostFromComponent . Content . Should ( ) . Be ( "Content" ) ;
57
57
}
58
+
59
+ [ Fact ]
60
+ public void ShouldNotDeleteModelWhenNotSet ( )
61
+ {
62
+ using var ctx = new TestContext ( ) ;
63
+ BlogPost blogPost = null ;
64
+ var cut = ctx . RenderComponent < CreateNewBlogPost > (
65
+ p => p . Add ( c => c . ClearAfterCreated , false )
66
+ . Add ( c => c . OnBlogPostCreated , post => blogPost = post ) ) ;
67
+ cut . Find ( "#title" ) . Change ( "My Title" ) ;
68
+ cut . Find ( "#short" ) . Change ( "My short Description" ) ;
69
+ cut . Find ( "#content" ) . Change ( "My content" ) ;
70
+ cut . Find ( "#preview" ) . Change ( "My preview url" ) ;
71
+ cut . Find ( "#tags" ) . Change ( "Tag1,Tag2,Tag3" ) ;
72
+
73
+ cut . Find ( "form" ) . Submit ( ) ;
74
+
75
+ cut .
76
+ cut . WaitForState ( ( ) => blogPost != null ) ;
77
+ cut . Find ( "#title" ) . TextContent . Should ( ) . Be ( "My Title" ) ;
78
+ }
58
79
}
59
80
}
Original file line number Diff line number Diff line change 5
5
<Meta name =" image" property =" og:image" content =" @PreviewImageUrl" />
6
6
<Meta property =" og:type" content =" article" />
7
7
<Meta property =" og:url" content =" @_navigationManager.Uri" />
8
+ @if (Description != null )
9
+ {
10
+ <Meta propertty =" og:description" content =" @Description" />
11
+ }
8
12
9
13
@code {
10
14
13
17
14
18
[Parameter ]
15
19
public string PreviewImageUrl { get ; set ; }
16
-
20
+
21
+ [Parameter ]
22
+ public string Description { get ; set ; }
17
23
}
You can’t perform that action at this time.
0 commit comments