dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.59k stars 10.06k forks source link

Automate all E2E tests on WebView #45157

Open SteveSandersonMS opened 3 years ago

SteveSandersonMS commented 3 years ago

We now have test apps that can run the Blazor E2E tests from BasicTestApp within a WinForms or WPF BlazorWebView (see https://github.com/dotnet/aspnetcore/pull/31021). This represents the majority of Blazor's E2E test cases. Most already pass without trouble, some fail for expected reasons (they aren't applicable scenarios, or can't work until SWA is added), and a few fail unexpectedly and probably indicate a missing piece of implementation or an actual bug. This issue is to track getting them all to work or at least explaining why they aren't applicable.

Note that I've only checked the following within WinForms hosting, just because I got to it first. There's no reason to think that WPF or MAUI hosting would behave differently (except if MAUI is on Mono, in which case certain dependency edge cases could vary).

Test cases

javiercn commented 3 years ago
  • This one looks like a genuine bug in WebForms hosting. If we want the sync context semantics to be the same across all hosting models, looks like more work is needed.

We want the semantics to be the same, otherwise libraries won't work properly.

captainsafia commented 3 years ago

Lazy loading isn't really applicable on WebView, but we should consider whether we want it to work anyway so that the same components would work across WebAssembly and WebView

Yeah, lazy-loading won't practically work in WebView the same way it does on WASM. We can probably have an implementation of WebViewLazyAssemblyLoader that virtually no-ops when invoked so that components are cross-compat.

Eilon commented 3 years ago

Looking pretty good in Android so far...

image

Eilon commented 3 years ago
❓ = unknown / not tested ❌ = doesn't work ✔ = works
Scenario WPF WinForms MAUI WinUI MAUI MacCat MAUI iOS MAUI Droid Comments
1. AddRemoveChildComponents
(Add/remove child components)
2. AfterRenderInteropComponent
(After-render interop component)
3. AsyncEventHandlerComponent
(Async event handlers)
4. AuthTest.AuthRouter
(Auth cases)
5. AuthTest.CascadingAuthenticationStateParent
(Cascading authentication state)
6. BindCasesComponent
(bind cases)
7. CascadingValueTest.CascadingValueSupplier
(Cascading values)
8. ComponentRefComponent
(Component ref component)
9. ConcurrentRenderParent
(Concurrent rendering)
10. ConfigurationComponent
(Configuration)
11. ContentEditable
(Content-editable)
12. CounterComponent
(Counter)
13. CounterComponentUsingChild
(Counter using child component)
14. CounterComponentWrapper
(Counter wrapped in parent)
15. CulturePicker
(Culture Picker)
16. DataDashComponent
(data-* attribute rendering)
17. DispatchingComponent
(Dispatching to sync context)
18. DuplicateAttributesComponent
(Duplicate attributes)
19. DynamicComponentRendering
(DynamicComponent rendering)
20. ElementFocusComponent
(Element focus component)
21. ElementRefComponent
(Element ref component)
22. ErrorComponent
(Error throwing)
23. ErrorBoundaryTest.ErrorBoundaryContainer
(Error boundary cases)
24. EventBubblingComponent
(Event bubbling)
25. EventCallbackTest.EventCallbackCases
(EventCallback)
26. EventCustomArgsComponent
(Event custom arguments)
27. EventDisablingComponent
(Event disabling)
28. EventDuringBatchRendering
(Event during batch rendering)
29. EventPreventDefaultComponent
(Event preventDefault)
30. ExternalContentPackage
(External content package)
31. FocusEventComponent
(Focus events)
32. Forms.InputFocusComponent
(Input Focus)
33. Forms.NotifyPropertyChangedValidationComponent
(INotifyPropertyChanged validation)
34. Forms.SimpleValidationComponent
(Simple validation)
35. Forms.SimpleValidationComponentUsingExperimentalValidator
(Simple validation using experimental validator)
36. Forms.TypicalValidationComponent
(Typical validation)
37. Forms.TypicalValidationComponentUsingExperimentalValidator
(Typical validation using experimental validator)
38. Forms.InputFileComponent
(Input file)
39. NavigateOnSubmit
(Navigate to submit)
40. GlobalizationBindCases
(Globalization Bind Cases)
41. GracefulTermination
(Graceful Termination)
42. HierarchicalImportsTest.Subdir.ComponentUsingImports
(Imports statement)
43. HtmlBlockChildContent
(ChildContent HTML Block)
44. HtmlEncodedChildContent
(ChildContent HTML Encoded Block)
45. HtmlMixedChildContent
(ChildContent Mixed Block)
46. HttpClientTest.BinaryHttpRequestsComponent
(Binary HttpClient tester)
47. HttpClientTest.CookieCounterComponent
(HttpClient cookies)
48. HttpClientTest.HttpRequestsComponent
(HttpClient tester)
49. InputEventComponent
(Input events)
50. InteropComponent
(Interop component)
51. InteropOnInitializationComponent
(Interop on initialization)
52. JsonSerializationCases
(JSON serialization)
53. KeyCasesComponent
(Key cases)
54. KeyPressEventComponent
(Key press event)
55. LaggyTypingComponent
(Laggy typing)
56. LimitCounterComponent
(Limit counter component)
57. LocalizedText
(Localized Text)
58. LogicalElementInsertionCases
(Logical element insertion cases)
59. LoggingComponent
(Logging)
60. LongRunningInterop
(Long running interop)
61. MarkupBlockComponent
(Markup blocks)
62. MouseEventComponent
(Mouse events)
63. MovingCheckboxesComponent
(Moving checkboxes diff case)
64. MultipleChildContent
(Multiple child content)
65. NavigationFailureComponent
(Navigation failure)
66. ParentChildComponent
(Parent component with child)
67. PropertiesChangedHandlerParent
(Parent component that changes parameters on child)
68. RazorTemplates
(Razor Templates)
69. Reconnection.ReconnectionComponent
(Reconnection server-side blazor)
70. RedTextComponent
(Red text)
71. ReliabilityComponent
(Server reliability component)
72. RenderFragmentToggler
(Render fragment renderer)
73. RenderAttributesBeforeConnectedCallback
(Render attributes before ConnectedCallback)
74. ReorderingFocusComponent
(Reordering focus retention)
75. RouterTest.NavigationManagerComponent
(NavigationManager Test)
76. RouterTest.TestRouter
(Router)
77. RouterTest.TestRouterWithOnNavigate
(Router with OnNavigate)
78. RouterTest.TestRouterWithLazyAssembly
(Router with dynamic assembly)
79. RouterTest.TestRouterWithAdditionalAssembly
(Router with additional assembly)
80. SelectVariantsComponent
(Select with component options)
81. SignalRClientComponent
(SignalR client)
82. StringComparisonComponent
(StringComparison)
83. SvgComponent
(SVG)
84. TextOnlyComponent
(Plain text)
85. ToggleEventComponent
(Toggle Event)
86. TouchEventComponent
(Touch events)
87. VirtualizationComponent
(Virtualization)
88. VirtualizationDataChanges
(Virtualization data changes)
89. HotReload.RenderOnHotReload
(Render on hot reload)
mkArtakMSFT commented 2 years ago

The pending work here is to automate using Photino in the dotnet/aspnetcore repo.

ghost commented 1 year ago

Thanks for contacting us.

We're moving this issue to the .NET 9 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s). If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

ghost commented 11 months ago

Thanks for contacting us.

We're moving this issue to the .NET 9 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s). If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.