Skip to content

Add textarea model binding integration tests#442

Merged
gunndabad merged 2 commits intomodelbindingtestsfrom
copilot/sub-pr-439
Feb 1, 2026
Merged

Add textarea model binding integration tests#442
gunndabad merged 2 commits intomodelbindingtestsfrom
copilot/sub-pr-439

Conversation

Copy link
Contributor

Copilot AI commented Feb 1, 2026

Adds integration tests for textarea tag helper model binding to TagHelperModelBindingTests, following the pattern established by existing text input and password input tests.

Changes:

  • Textarea_RendersCorrectly - validates model binding for name, id, value, label, hint, and error message
  • TextareaOverridden_RendersCorrectly - validates explicit property overrides
  • TextareaTestsModel with Display attributes for metadata binding
  • Supporting views and controller actions

Key differences from input tests:

  • Uses InputValueAsync() to retrieve textarea values (correct Playwright API for form inputs)
  • Overridden content set via <govuk-textarea-value> child element, not a value attribute
// Textarea.cshtml - basic usage
<govuk-textarea for="Text" />

// TextareaOverridden.cshtml - with overrides
<govuk-textarea for="Text" name="OverriddenName" id="OverriddenId">
    <govuk-textarea-value>Overridden value</govuk-textarea-value>
</govuk-textarea>

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: gunndabad <2041280+gunndabad@users.noreply.github.com>
Copilot AI changed the title [WIP] Add tag helper model binding integration tests Add textarea model binding integration tests Feb 1, 2026
Copilot AI requested a review from gunndabad February 1, 2026 14:39
@gunndabad gunndabad marked this pull request as ready for review February 1, 2026 14:41
@gunndabad gunndabad merged commit 2fdc3c6 into modelbindingtests Feb 1, 2026
4 checks passed
@gunndabad gunndabad deleted the copilot/sub-pr-439 branch February 1, 2026 14:42
gunndabad added a commit that referenced this pull request Feb 7, 2026
* Add tag helper model binding integration tests for text input

* Add password input tests to TagHelperModelBindingTests (#440)

* Initial plan

* Add password input tests to TagHelperModelBindingTests

Co-authored-by: gunndabad <2041280+gunndabad@users.noreply.github.com>

* Remove PauseAsync debug statement

Co-authored-by: gunndabad <2041280+gunndabad@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: gunndabad <2041280+gunndabad@users.noreply.github.com>

* Add date input tests to TagHelperModelBindingTests (#441)

* Initial plan

* Add date input tests to TagHelperModelBindingTests

Co-authored-by: gunndabad <2041280+gunndabad@users.noreply.github.com>

* Add separate test for overriden item names and IDs

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: gunndabad <2041280+gunndabad@users.noreply.github.com>
Co-authored-by: James Gunn <james@gunn.io>

* Add textarea model binding integration tests (#442)

* Initial plan

* Add textarea tests to TagHelperModelBindingTests

Co-authored-by: gunndabad <2041280+gunndabad@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: gunndabad <2041280+gunndabad@users.noreply.github.com>

* Add character count model binding integration tests (#443)

* Initial plan

* Add character count model binding integration tests

Co-authored-by: gunndabad <2041280+gunndabad@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: gunndabad <2041280+gunndabad@users.noreply.github.com>

* Add file upload model binding integration tests (#444)

* Initial plan

* Add file upload model binding integration tests

Co-authored-by: gunndabad <2041280+gunndabad@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: gunndabad <2041280+gunndabad@users.noreply.github.com>

* Add select tag helper model binding integration tests (#445)

* Initial plan

* Add select model binding integration tests

Co-authored-by: gunndabad <2041280+gunndabad@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: gunndabad <2041280+gunndabad@users.noreply.github.com>

* Add checkbox model binding integration tests (#446)

* Initial plan

* Add checkbox model binding integration test

Co-authored-by: gunndabad <2041280+gunndabad@users.noreply.github.com>

* Add test for overridden attributes

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: gunndabad <2041280+gunndabad@users.noreply.github.com>
Co-authored-by: James Gunn <james@gunn.io>

* Add radios model binding integration tests (#447)

* Initial plan

* Add radios model binding integration tests

Co-authored-by: gunndabad <2041280+gunndabad@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: gunndabad <2041280+gunndabad@users.noreply.github.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: gunndabad <2041280+gunndabad@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants