@@ -768,32 +768,15 @@ public void CanDispatchToFormDefinedInNonPageComponent(bool suppressEnhancedNavi
768
768
}
769
769
770
770
[ Fact ]
771
- public void CanRenderAmbiguousForms ( )
771
+ public void CannotRenderAmbiguousForms ( )
772
772
{
773
773
var dispatchToForm = new DispatchToForm ( this )
774
774
{
775
775
Url = "forms/ambiguous-forms" ,
776
776
FormCssSelector = "form" ,
777
777
ExpectedActionValue = null ,
778
- DispatchEvent = false
779
- } ;
780
- DispatchToFormCore ( dispatchToForm ) ;
781
- }
782
-
783
- [ Theory ]
784
- [ InlineData ( true ) ]
785
- [ InlineData ( false ) ]
786
- public void DispatchingToAmbiguousFormFails ( bool suppressEnhancedNavigation )
787
- {
788
- var dispatchToForm = new DispatchToForm ( this )
789
- {
790
- Url = "forms/ambiguous-forms" ,
791
- FormCssSelector = "form" ,
792
- ExpectedActionValue = null ,
793
- DispatchEvent = true ,
794
- SubmitButtonId = "send-second" ,
778
+ DispatchEvent = false ,
795
779
ShouldCauseInternalServerError = true ,
796
- SuppressEnhancedNavigation = suppressEnhancedNavigation ,
797
780
} ;
798
781
DispatchToFormCore ( dispatchToForm ) ;
799
782
}
@@ -824,19 +807,6 @@ public void FormThatDisappearsBeforeQuiesceDoesNotBind()
824
807
DispatchToFormCore ( dispatchToForm ) ;
825
808
}
826
809
827
- [ Fact ]
828
- public void ChangingComponentsToDispatchBeforeQuiesceDoesNotBind ( )
829
- {
830
- var dispatchToForm = new DispatchToForm ( this )
831
- {
832
- Url = "forms/switching-components-does-not-bind" ,
833
- FormCssSelector = "form" ,
834
- ExpectedActionValue = null ,
835
- ShouldCauseInternalServerError = true ,
836
- } ;
837
- DispatchToFormCore ( dispatchToForm ) ;
838
- }
839
-
840
810
[ Fact ]
841
811
public async Task CanPostFormsWithStreamingRenderingAsync ( )
842
812
{
@@ -972,6 +942,13 @@ private void DispatchToFormCore(DispatchToForm dispatch)
972
942
973
943
GoTo ( dispatch . Url ) ;
974
944
945
+ if ( ! dispatch . DispatchEvent && dispatch . ShouldCauseInternalServerError )
946
+ {
947
+ // Chrome's built-in error UI for a 500 response when there's no response content
948
+ Browser . Exists ( By . Id ( "main-frame-error" ) ) ;
949
+ return ;
950
+ }
951
+
975
952
Browser . Exists ( By . Id ( dispatch . Ready ) ) ;
976
953
var form = Browser . Exists ( By . CssSelector ( dispatch . FormCssSelector ) ) ;
977
954
var formTarget = form . GetAttribute ( "action" ) ;
0 commit comments