-
-
Notifications
You must be signed in to change notification settings - Fork 115
test: create clicking on submit button outside triggers onsubmit of form #1770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds test coverage for form submission behavior when a submit button is located outside the form element but associated via the HTML5 form attribute. The changes clean up whitespace inconsistencies and add a new test case to verify this specific scenario.
- Normalized line endings and removed trailing whitespace in existing test methods
- Added a new test
ClickingOnSubmitButtonOutsideTriggersOnsubmitOfFormto verify submit buttons outside forms work correctly - Created a new test component
FormWithButtonOutside.razorto support the new test case
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/bunit.tests/EventDispatchExtensions/FormDispatchExtensionTest.cs | Added new test case for external submit button and cleaned up whitespace |
| tests/bunit.testassets/SampleComponents/FormWithButtonOutside.razor | New test component with a form and an external submit button linked via form attribute |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ing form attribute (#1771) * Initial plan * Initial investigation of form submit issue Co-authored-by: egil <105649+egil@users.noreply.github.com> * Implement support for clicking submit button outside form with form attribute Co-authored-by: egil <105649+egil@users.noreply.github.com> * Improve comments in FindFormById method Co-authored-by: egil <105649+egil@users.noreply.github.com> * Restore net10.0 target framework to all projects Co-authored-by: linkdotnet <26365461+linkdotnet@users.noreply.github.com> * Fix misleading comment about incremental DOM rendering Co-authored-by: egil <105649+egil@users.noreply.github.com> * Add test cases for input element with form attribute outside form Co-authored-by: egil <105649+egil@users.noreply.github.com> * Simplify FindFormById by removing GetElementById attempt Co-authored-by: egil <105649+egil@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: egil <105649+egil@users.noreply.github.com> Co-authored-by: linkdotnet <26365461+linkdotnet@users.noreply.github.com>
|
@copilot update the changelog.md accordingly |
No description provided.