@@ -135,5 +135,31 @@ public void ShouldNotSetOptionToNotUpdateUpdatedDateOnInitialCreate()
135
135
136
136
found . Should ( ) . HaveCount ( 0 ) ;
137
137
}
138
+
139
+ [ Fact ]
140
+ public void ShouldAcceptInputWithoutLosingFocusOrEnter ( )
141
+ {
142
+ BlogPost blogPost = null ;
143
+ var cut = RenderComponent < CreateNewBlogPost > (
144
+ p => p . Add ( c => c . OnBlogPostCreated , bp => blogPost = bp ) ) ;
145
+ cut . Find ( "#title" ) . Input ( "My Title" ) ;
146
+ cut . Find ( "#short" ) . Input ( "My short Description" ) ;
147
+ cut . Find ( "#content" ) . Input ( "My content" ) ;
148
+ cut . Find ( "#preview" ) . Change ( "My preview url" ) ;
149
+ cut . Find ( "#published" ) . Change ( false ) ;
150
+ cut . Find ( "#tags" ) . Change ( "Tag1,Tag2,Tag3" ) ;
151
+
152
+ cut . Find ( "form" ) . Submit ( ) ;
153
+
154
+ cut . WaitForState ( ( ) => cut . Find ( "#title" ) . TextContent == string . Empty ) ;
155
+ blogPost . Should ( ) . NotBeNull ( ) ;
156
+ blogPost . Title . Should ( ) . Be ( "My Title" ) ;
157
+ blogPost . ShortDescription . Should ( ) . Be ( "My short Description" ) ;
158
+ blogPost . Content . Should ( ) . Be ( "My content" ) ;
159
+ blogPost . PreviewImageUrl . Should ( ) . Be ( "My preview url" ) ;
160
+ blogPost . IsPublished . Should ( ) . BeFalse ( ) ;
161
+ blogPost . Tags . Should ( ) . HaveCount ( 3 ) ;
162
+ blogPost . Tags . Select ( t => t . Content ) . Should ( ) . Contain ( new [ ] { "Tag1" , "Tag2" , "Tag3" } ) ;
163
+ }
138
164
}
139
165
}
0 commit comments