Summary
Five tests in MerchantsNewPageTests.cs have been temporarily skipped due to challenges with testing form submission that requires interaction with the custom CountrySelector component.
Skipped Tests
MerchantsNew_SuccessfulCreation_ShowsSuccessMessage
MerchantsNew_SuccessfulCreation_NavigatesToMerchantsList
MerchantsNew_FailedCreation_ShowsErrorMessage
MerchantsNew_FailedCreation_DoesNotNavigate
MerchantsNew_SavingState_ShowsLoadingIndicator
Problem
The form uses OnValidSubmit requiring all validation to pass. The Country field uses a custom CountrySelector component (button-based dropdown) that's difficult to interact with in Bunit tests.
Proposed Solutions
- Mock/Stub the CountrySelector component
- Add data-testid attributes for testing
- Move to integration tests
- Make Country optional for test scenarios
- Improve CountrySelector testability
Related PR
#755
Summary
Five tests in
MerchantsNewPageTests.cshave been temporarily skipped due to challenges with testing form submission that requires interaction with the customCountrySelectorcomponent.Skipped Tests
MerchantsNew_SuccessfulCreation_ShowsSuccessMessageMerchantsNew_SuccessfulCreation_NavigatesToMerchantsListMerchantsNew_FailedCreation_ShowsErrorMessageMerchantsNew_FailedCreation_DoesNotNavigateMerchantsNew_SavingState_ShowsLoadingIndicatorProblem
The form uses
OnValidSubmitrequiring all validation to pass. The Country field uses a custom CountrySelector component (button-based dropdown) that's difficult to interact with in Bunit tests.Proposed Solutions
Related PR
#755