[test-quarantine] Fix Flaky test: FormsInputDateTest.InputDateInteractsWithEditContext_NullableDateTimeOffset - #67513
Conversation
… into flakytest-67243
… into flakytest-67243
… into flakytest-67243
There was a problem hiding this comment.
Pull request overview
This PR addresses intermittent flakiness in the FormsInputDateTest.InputDateInteractsWithEditContext_NullableDateTimeOffset E2E test by avoiding locale- and timing-sensitive SendKeys interactions with native date/time inputs, and improves the WASM test host configuration so the app is served correctly behind the Blazor Gateway.
Changes:
- Replace
SendKeys-driven interactions with a JS helper that sets native date/time input values directly (ISO-formatted) and dispatches achangeevent. - Enable SPA fallback static web asset generation for
BasicTestAppto support correct fallback routing when served via static web assets. - Update the WASM test app fixture to configure path base using the
Gateway:PathBaseconfiguration key.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Components/test/testassets/BasicTestApp/BasicTestApp.csproj | Enables static web asset SPA fallback generation for the test app. |
| src/Components/test/E2ETest/Tests/FormsInputDateTest.cs | Switches date/time input interactions to deterministic JS value setting + change dispatch to reduce flakiness. |
| src/Components/test/E2ETest/Infrastructure/ServerFixtures/BlazorWasmTestAppFixture.cs | Passes path base via Gateway:PathBase so the Blazor Gateway applies it correctly. |
| // Can become invalid | ||
| // Stricly speaking the following is equivalent to the empty state, because that's how incomplete input is represented | ||
| // We don't know of any way to produce a different (non-empty-equivalent) state using UI gestures, so there's nothing else to test | ||
| departureTimeInput.SendKeys($"20{Keys.Backspace}\t"); | ||
| SetDateInputValue(departureTimeInput, ""); |
… into flakytest-67243
|
Per #35018 (comment), the issue for this test should be only affecting the 8 and 9 release branches, and the test is expected to already be stable on main. Were you able to reproduce a test failure on main? @ilonatommy if you can look at this community PR. |
Exactly, I think this PR is trying to address to many issues at the same time, without a clear explanation how did they reproduce the failure, what was the hit rate, with unrelated changes already merged in #67903. The mentioned tests are not even quarantined, it's most probably mis-targetted. |
|
Closing in favor of #68107. We don't want to change the nature of the tests, executing JS script is not same as invoking |
Bug Description
Description of code changes
Fixes #67243,
Fixes #31734,
Fixes #35018
Output
Before

After
