Skip to content

Add password input tests to TagHelperModelBindingTests#440

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

Add password input tests to TagHelperModelBindingTests#440
gunndabad merged 3 commits intomodelbindingtestsfrom
copilot/sub-pr-439

Conversation

Copy link
Contributor

Copilot AI commented Feb 1, 2026

Adds integration tests for password input tag helper model binding, mirroring the existing text input test coverage.

Changes

  • Test methods: PasswordInput_RendersCorrectly and PasswordInputOverridden_RendersCorrectly validate model binding, metadata display (name, description), error messages, and property overrides
  • Views: PasswordInput.cshtml and PasswordInputOverridden.cshtml demonstrating basic and overridden usage of <govuk-password-input>
  • Model & controller: PasswordInputTestsModel record and corresponding action methods
[Fact]
public async Task PasswordInput_RendersCorrectly()
{
    var page = await fixture.Browser!.NewPageAsync();
    await page.GotoAsync($"{ServerFixture.BaseUrl}/ModelBindingTests/PasswordInput");

    var input = page.Locator("input[type='password']").First;
    Assert.Equal("Password", await input.GetAttributeAsync("name"));
    Assert.Equal("Model value", await input.GetAttributeAsync("value"));
    // ... validates label, hint, and error message from model metadata
}

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

Copilot AI and others added 2 commits February 1, 2026 13:23
Co-authored-by: gunndabad <2041280+gunndabad@users.noreply.github.com>
Co-authored-by: gunndabad <2041280+gunndabad@users.noreply.github.com>
Copilot AI changed the title [WIP] Add integration tests for TagHelper model binding with password input Add password input tests to TagHelperModelBindingTests Feb 1, 2026
Copilot AI requested a review from gunndabad February 1, 2026 13:28
@gunndabad gunndabad marked this pull request as ready for review February 1, 2026 13:39
@gunndabad gunndabad merged commit ad297d2 into modelbindingtests Feb 1, 2026
6 checks passed
@gunndabad gunndabad deleted the copilot/sub-pr-439 branch February 1, 2026 13:54
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