Fix InputDateInteractsWithEditContext_NonNullableDateTime and InputDateInteractsWithEditContext_NullableDateTimeOffset - #68107
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates two flaky WebAssembly-only Blazor E2E tests that drive native <input type="date"> controls via Selenium. It introduces small helper methods to consistently position the caret before typing and to clear the input, aiming to reduce dropped/reordered keystrokes that previously led to modified invalid vs modified valid mismatches.
Changes:
- Replaced ad-hoc
SendKeyssequences in two tests withSetDate(...)to click, move the caret left, and then type. - Replaced repeated backspace/tab clearing sequences with
ClearDate(...)to click, select-all, delete, and tab out. - Added
SetDate/ClearDateprivate helpers to centralize and standardize date-input interactions.
|
/backport to release/9.0 |
|
/backport to release/8.0 |
|
Started backporting to |
|
Started backporting to |
|
@ilonatommy backporting to |
|
@ilonatommy backporting to |
Youssef1313
left a comment
There was a problem hiding this comment.
LGTM as long as it's green :)
|
/backport to release/9.0 |
|
/backport to release/8.0 |
|
Started backporting to |
|
@ilonatommy backporting to git am output$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Position the caret explicitly.
Using index info to reconstruct a base tree...
M src/Components/test/E2ETest/Tests/FormsInputDateTest.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Components/test/E2ETest/Tests/FormsInputDateTest.cs
CONFLICT (content): Merge conflict in src/Components/test/E2ETest/Tests/FormsInputDateTest.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Position the caret explicitly.
Error: The process '/usr/bin/git' failed with exit code 128 |
|
Started backporting to |
|
@ilonatommy backporting to git am output$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Position the caret explicitly.
Using index info to reconstruct a base tree...
M src/Components/test/E2ETest/Tests/FormsInputDateTest.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Components/test/E2ETest/Tests/FormsInputDateTest.cs
CONFLICT (content): Merge conflict in src/Components/test/E2ETest/Tests/FormsInputDateTest.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Position the caret explicitly.
Error: The process '/usr/bin/git' failed with exit code 128 |
Contributes to #31734 and #67243.
See: #31734 (comment)
Locally both tests fail deterministically on both main and previous releases. This fix adds caret positioning so that at least local runs pass. I don't have hard evidence it will fix the CI version but it's worth a try.