Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
60de2bd
refactor: apply code review nitpick improvements
Nov 25, 2025
516a2a0
fix: remove ConfigurableTestAuthenticationHandler race condition
Nov 25, 2025
0e48824
docs: remove obsolete documentation files
Nov 25, 2025
e50f728
feat: add IDocumentsModuleApi for cross-module communication
Nov 25, 2025
e046895
wip: add comprehensive IBGE API stubs to WireMock + refactor IbgeApiI…
Nov 25, 2025
efdd1ef
feat: add IServiceCatalogsModuleApi for cross-module service validation
Nov 25, 2025
6302d16
fix: refactor IbgeApiIntegrationTests to use WireMock + fix stubs
Nov 25, 2025
916e4dd
test: remove Skip from 2 ServiceCatalogs integration tests after AUTH…
Nov 25, 2025
4940bc2
fix: enable IBGE fail-open with fallback to simple validation
Nov 25, 2025
97dc7ac
feat(providers): integrate IDocumentsModuleApi in provider activation
Nov 25, 2025
62e46fa
feat(providers): prepare ISearchModuleApi integration for provider in…
Nov 25, 2025
a6ad166
feat(search): implement IndexProviderAsync and RemoveProviderAsync in…
Nov 25, 2025
c63ad65
test: remove duplicate GeographicRestrictionFeatureFlagTests
Nov 25, 2025
65897e9
docs: update Sprint 1 progress and skipped tests analysis
Nov 25, 2025
8ca60ea
docs: comprehensive Module APIs documentation in architecture.md
Nov 25, 2025
234a20f
docs: Sprint 1 final summary and completion report
Nov 25, 2025
b77eb08
feat(providers): implement full provider data sync for search indexing
Nov 25, 2025
2cf5816
feat(providers): add ProviderServices many-to-many table
Nov 25, 2025
b355776
test(providers): add comprehensive unit tests for ProviderServices
Nov 25, 2025
bff2381
refactor: rename infrastructure/database/modules folders and update S…
Nov 25, 2025
3d8b469
fix: make SearchProviders schema migration conditional for TestContai…
Nov 25, 2025
4aa726a
fix: corrigir schema hardcoded 'search' para 'search_providers' em qu…
Nov 25, 2025
938c55d
fix: atualizar schema 'search' para 'search_providers' em SearchProvi…
Nov 25, 2025
b317f38
feat: implement cross-module event handlers and fix SearchProviders s…
Nov 26, 2025
ca4b2f9
test: skip CreateAndUpdateUser_ShouldMaintainConsistency in CI/CD
Nov 26, 2025
17b6e55
refactor: code review fixes - remove duplicates, fix schemas, regener…
Nov 26, 2025
5dad19a
chore: final code review fixes - documentation, security, domain events
Nov 26, 2025
ac601cb
fix: correct schema naming to meajudaai_* pattern across all modules
Nov 26, 2025
b98c132
refactor: code quality improvements from review feedback
Nov 26, 2025
59e6265
refactor: minor code quality improvements
Nov 26, 2025
025aee0
test: improve test quality with explicit assertions and Theory pattern
Nov 26, 2025
ee4d1b2
refactor: use IReadOnlyList in ModuleServiceValidationResultDto
Nov 26, 2025
3d7b31b
fix: resolve race condition in ConfigurableTestAuthenticationHandler
Nov 26, 2025
78e47cb
fix: consolidate schema naming to meajudaai_* convention across all m…
Nov 26, 2025
dfa7f10
perf: reduce WireMock timeout simulation from 30s to 5s
Nov 26, 2025
5221f44
refactor: implement code review feedback - Result Match pattern, repo…
Nov 26, 2025
51f7e0d
refactor: rename Mock* to LocalDevelopment* services and move to dedi…
Nov 26, 2025
512cd66
fix: allowUnauthenticated should return anonymous principal, not admin
Nov 26, 2025
780cae9
fix: address CodeRabbit review feedback
Nov 26, 2025
9bfff7c
refactor: implement CodeRabbit Round 2 feedback - null guards, XML do…
Nov 26, 2025
0be5389
refactor: apply minor CodeRabbit polish - constants and comments
Nov 26, 2025
c69c404
feat: implement remaining CodeRabbit suggestions - UUID v7, migration…
Nov 27, 2025
93592d7
refactor: implement CodeRabbit final round - schema standardization, …
Nov 27, 2025
e0b4db3
refactor: complete CodeRabbit final polish - ProductVersion stable, h…
Nov 27, 2025
63a4a2d
fix: resolve E2E test failures - authentication and category deactiva…
Nov 27, 2025
274b378
refactor: apply CodeRabbit feedback - schema naming, async cleanup, t…
Nov 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
refactor: apply code review nitpick improvements
- Centralize auth race condition skip messages using constants
- Add explicit GitHub issue #<TBD> placeholders for tracking
- Add field-level assertions (City, State) for consistency in CEP fallback test
- Update all TODO comments to reference specific GitHub issue

Changes:
1. ServiceCatalogsModuleIntegrationTests: Centralized AuthRaceConditionSkipReason constant
2. ServiceCatalogsAdvancedE2ETests: Consistent skip messages with GitHub issue refs
3. CepProvidersUnavailabilityTests:
   - Added City/State assertions to LookupCep_WhenViaCepReturnsMalformedJson_ShouldFallbackToBrasilApi
   - Added GitHub issue placeholder for cache infrastructure TODO
4. UsersModuleTests: Updated GitHub issue reference

These changes make it easier to:
- Track all affected tests when auth infrastructure is fixed
- Find and update skip messages in a single location
- Link to concrete tracking issues once created
  • Loading branch information
Filipe Frigini committed Nov 25, 2025
commit 60de2bd48cbf189f4b0265aadb1e43b2715a7128
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ namespace MeAjudaAi.E2E.Tests.Integration;
/// </summary>
public class ServiceCatalogsModuleIntegrationTests : TestContainerTestBase
{
// TODO: Create GitHub issue to track E2E authentication infrastructure refactor.
// TODO: Link to GitHub issue #<TBD> tracking E2E authentication infrastructure refactor.
// 14+ E2E tests affected by ConfigurableTestAuthenticationHandler race condition.
[Fact(Skip = "AUTH: Returns 403 instead of expected success. ConfigurableTestAuthenticationHandler race condition - see issue tracking comment above.")]
private const string AuthRaceConditionSkipReason =
"AUTH: Returns 403 instead of expected success due to ConfigurableTestAuthenticationHandler race condition. See GitHub issue #<TBD>.";

[Fact(Skip = AuthRaceConditionSkipReason)]
public async Task ServicesModule_Can_Validate_Services_From_Catalogs()
{
// Arrange - Create test service categories and services
Expand Down Expand Up @@ -42,7 +45,7 @@ public async Task ServicesModule_Can_Validate_Services_From_Catalogs()
id2.GetGuid().Should().Be(service2.Id);
}

[Fact(Skip = "AUTH: Returns 403 instead of expected success. ConfigurableTestAuthenticationHandler race condition - see issue tracking comment above.")]
[Fact(Skip = AuthRaceConditionSkipReason)]
public async Task ProvidersModule_Can_Query_Active_Services_Only()
{
// Arrange - Create services with different states
Expand Down
2 changes: 1 addition & 1 deletion tests/MeAjudaAi.E2E.Tests/Integration/UsersModuleTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public async Task CreateUser_WithValidData_ShouldReturnCreatedOrConflict()
}
}

// TODO: Create GitHub issue to track E2E authentication infrastructure refactor.
// TODO: Create GitHub issue #<TBD> to track E2E authentication infrastructure refactor.
// 13+ E2E tests affected by ConfigurableTestAuthenticationHandler race condition.
[Fact(Skip = "AUTH: Returns 403 Forbidden instead of expected 400 BadRequest. Same authentication issue as other E2E tests - ConfigurableTestAuthenticationHandler with SetAllowUnauthenticated(true) causing race condition where admin config isn't applied before authorization check. Requires refactor to use proper test authentication setup.")]
public async Task CreateUser_WithInvalidData_ShouldReturnBadRequest()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ namespace MeAjudaAi.E2E.Tests.Modules;
[Trait("Module", "ServiceCatalogs")]
public class ServiceCatalogsAdvancedE2ETests : TestContainerTestBase
{
// TODO: Create GitHub issue to track E2E authentication infrastructure refactor.
// TODO: Link to GitHub issue #<TBD> tracking E2E authentication infrastructure refactor.
// 13+ E2E tests affected by ConfigurableTestAuthenticationHandler race condition.
// TODO: Fix test auth setup and unskip once auth refactor lands.
[Fact(Skip = "AUTH: Returns 403 instead of expected 200/204. ConfigurableTestAuthenticationHandler race condition - see issue tracking comment above.")]
private const string AuthRaceConditionSkipReason =
"AUTH: Returns 403 instead of expected {{0}} due to ConfigurableTestAuthenticationHandler race condition. See GitHub issue #<TBD>.";

[Fact(Skip = "AUTH: Returns 403 instead of expected 200/204 due to ConfigurableTestAuthenticationHandler race condition. See GitHub issue #<TBD>.")]
public async Task ValidateService_WithBusinessRules_Should_Succeed()
{
// Arrange
Expand Down Expand Up @@ -77,7 +79,7 @@ public async Task ValidateService_WithBusinessRules_Should_Succeed()
HttpStatusCode.NoContent);
}

[Fact(Skip = "AUTH: Returns 403 instead of expected 400/404/200. ConfigurableTestAuthenticationHandler race condition - see issue tracking comment above.")]
[Fact(Skip = "AUTH: Returns 403 instead of expected 400/404/200 due to ConfigurableTestAuthenticationHandler race condition. See GitHub issue #<TBD>.")]
public async Task ValidateService_WithInvalidRules_Should_Return_BadRequest()
{
// Arrange
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ public async Task LookupCep_WhenViaCepReturnsMalformedJson_ShouldFallbackToBrasi
// Assert - Should fallback to BrasilAPI
result.IsSuccess.Should().BeTrue();
result.Value.Should().NotBeNull();
result.Value!.City.Should().Be("São Paulo");
result.Value.State.Should().Be("SP");
}

[Fact]
Expand Down Expand Up @@ -257,7 +259,7 @@ public async Task LookupCep_WhenViaCepReturnsErrorTrueAndOthersFail_ShouldReturn
result.IsSuccess.Should().BeFalse();
}

// TODO: Create GitHub issue to track enabling caching infrastructure for integration tests.
// TODO: Create GitHub issue #<TBD> to track enabling caching infrastructure for integration tests.
// This would allow validation of cache behavior, including TTL, eviction, and hit/miss scenarios.
[Fact(Skip = "Caching is disabled in integration tests (Caching:Enabled = false). This test cannot validate cache behavior without enabling caching infrastructure.")]
public async Task LookupCep_WhenBrasilApiSucceedsButViaCepDown_ShouldUseCache()
Expand Down