Skip to content

Conversation

@igormukhingmailcom
Copy link
Contributor

Fixes #9420

Short description of what this resolves:

Cleaner / less-nesting code

Changes proposed in this pull request:

Does your code include anything generated by an AI Engine? No

@codecov
Copy link

codecov bot commented Nov 13, 2025

❌ 20 Tests Failed:

Tests completed Failed Passed Skipped
1556 20 1536 55
View the top 1 failed test(s) by shortest run time
OpenEMR.Tests.E2e.JjEncounterContextMainMenuLinksTest::testEncounterOpen
Stack Traces | 32s run time
OpenEMR\Tests\E2e\JjEncounterContextMainMenuLinksTest::testEncounterOpen
Facebook\WebDriver\Exception\TimeoutException: Element "//*[@id='framesDisplay']//iframe[@name='fin']" not found within 30 seconds.

.../webdriver/lib/WebDriverWait.php:71
.../panther/src/Client.php:355
.../E2e/Patient/PatientOpenTrait.php:72
.../E2e/Encounter/EncounterOpenTrait.php:64
.../E2e/Encounter/EncounterOpenTrait.php:42
View the full list of 20 ❄️ flaky test(s)
OpenEMR.Tests.RestControllers.FHIR.FhirOrganizationRestControllerTest::testInvalidPost

Flake rate in main: 11.11% (Passed 8 times, Failed 1 times)

Stack Traces | 0.0417s run time
OpenEMR\Tests\RestControllers\FHIR\FhirOrganizationRestControllerTest::testInvalidPost
Failed asserting that 201 matches expected 400.

.../RestControllers/FHIR/FhirOrganizationRestControllerTest.php:71
OpenEMR.Tests.Services.FHIR.FhirMedicationDispenseUSCore8ComplianceTest::testAuthorizingPrescriptionReferenceCompliance

Flake rate in main: 16.67% (Passed 35 times, Failed 7 times)

Stack Traces | 0.0878s run time
OpenEMR\Tests\Services\FHIR\FhirMedicationDispenseUSCore8ComplianceTest::testAuthorizingPrescriptionReferenceCompliance
Exception: Failed to create test encounter

.../Tests/Fixtures/MedicationDispenseFixtureManager.php:323
.../Tests/Fixtures/MedicationDispenseFixtureManager.php:75
.../Services/FHIR/FhirMedicationDispenseUSCore8ComplianceTest.php:228
OpenEMR.Tests.Services.FHIR.FhirMedicationDispenseUSCore8ComplianceTest::testConstraintUSCore20

Flake rate in main: 3.57% (Passed 27 times, Failed 1 times)

Stack Traces | 0.0848s run time
OpenEMR\Tests\Services\FHIR\FhirMedicationDispenseUSCore8ComplianceTest::testConstraintUSCore20
Exception: Failed to create test encounter

.../Tests/Fixtures/MedicationDispenseFixtureManager.php:323
.../Tests/Fixtures/MedicationDispenseFixtureManager.php:75
.../Services/FHIR/FhirMedicationDispenseUSCore8ComplianceTest.php:431
OpenEMR.Tests.Services.FHIR.FhirMedicationDispenseUSCore8ComplianceTest::testContextReferenceCompliance

Flake rate in main: 3.70% (Passed 26 times, Failed 1 times)

Stack Traces | 0.0869s run time
OpenEMR\Tests\Services\FHIR\FhirMedicationDispenseUSCore8ComplianceTest::testContextReferenceCompliance
Exception: Failed to create test encounter

.../Tests/Fixtures/MedicationDispenseFixtureManager.php:323
.../Tests/Fixtures/MedicationDispenseFixtureManager.php:75
.../Services/FHIR/FhirMedicationDispenseUSCore8ComplianceTest.php:209
OpenEMR.Tests.Services.FHIR.FhirMedicationDispenseUSCore8ComplianceTest::testMedicationCodingSystemCompliance

Flake rate in main: 5.26% (Passed 18 times, Failed 1 times)

Stack Traces | 0.0805s run time
OpenEMR\Tests\Services\FHIR\FhirMedicationDispenseUSCore8ComplianceTest::testMedicationCodingSystemCompliance
Exception: Failed to create test encounter

.../Tests/Fixtures/MedicationDispenseFixtureManager.php:323
.../Tests/Fixtures/MedicationDispenseFixtureManager.php:75
.../Services/FHIR/FhirMedicationDispenseUSCore8ComplianceTest.php:141
OpenEMR.Tests.Services.FHIR.FhirMedicationDispenseUSCore8ComplianceTest::testMustSupportElementsDrugSales

Flake rate in main: 35.00% (Passed 13 times, Failed 7 times)

Stack Traces | 0.382s run time
OpenEMR\Tests\Services\FHIR\FhirMedicationDispenseUSCore8ComplianceTest::testMustSupportElementsDrugSales
Exception: Failed to create test encounter

.../Tests/Fixtures/MedicationDispenseFixtureManager.php:323
.../Tests/Fixtures/MedicationDispenseFixtureManager.php:75
.../Services/FHIR/FhirMedicationDispenseUSCore8ComplianceTest.php:65
OpenEMR.Tests.Services.FHIR.FhirMedicationDispenseUSCore8ComplianceTest::testQuantityUCUMCompliance

Flake rate in main: 12.96% (Passed 47 times, Failed 7 times)

Stack Traces | 0.08s run time
OpenEMR\Tests\Services\FHIR\FhirMedicationDispenseUSCore8ComplianceTest::testQuantityUCUMCompliance
Exception: Failed to create test encounter

.../Tests/Fixtures/MedicationDispenseFixtureManager.php:323
.../Tests/Fixtures/MedicationDispenseFixtureManager.php:75
.../Services/FHIR/FhirMedicationDispenseUSCore8ComplianceTest.php:269
OpenEMR.Tests.Services.FHIR.FhirMedicationDispenseUSCore8ComplianceTest::testResourceMetaProfile

Flake rate in main: 18.75% (Passed 26 times, Failed 6 times)

Stack Traces | 0.0765s run time
OpenEMR\Tests\Services\FHIR\FhirMedicationDispenseUSCore8ComplianceTest::testResourceMetaProfile
Exception: Failed to create test encounter

.../Tests/Fixtures/MedicationDispenseFixtureManager.php:323
.../Tests/Fixtures/MedicationDispenseFixtureManager.php:75
.../Services/FHIR/FhirMedicationDispenseUSCore8ComplianceTest.php:341
OpenEMR.Tests.Services.FHIR.FhirMedicationDispenseUSCore8ComplianceTest::testResourceValidationAgainstConstraints

Flake rate in main: 35.00% (Passed 13 times, Failed 7 times)

Stack Traces | 0.0868s run time
OpenEMR\Tests\Services\FHIR\FhirMedicationDispenseUSCore8ComplianceTest::testResourceValidationAgainstConstraints
Exception: Failed to create test encounter

.../Tests/Fixtures/MedicationDispenseFixtureManager.php:323
.../Tests/Fixtures/MedicationDispenseFixtureManager.php:75
.../Services/FHIR/FhirMedicationDispenseUSCore8ComplianceTest.php:449
OpenEMR.Tests.Services.FHIR.FhirMedicationDispenseUSCore8ComplianceTest::testStatusValueSet

Flake rate in main: 6.25% (Passed 15 times, Failed 1 times)

Stack Traces | 0.0778s run time
OpenEMR\Tests\Services\FHIR\FhirMedicationDispenseUSCore8ComplianceTest::testStatusValueSet
Exception: Failed to create test encounter

.../Tests/Fixtures/MedicationDispenseFixtureManager.php:323
.../Tests/Fixtures/MedicationDispenseFixtureManager.php:75
.../Services/FHIR/FhirMedicationDispenseUSCore8ComplianceTest.php:126
OpenEMR.Tests.Services.FHIR.FhirMedicationDispenseUSCore8ComplianceTest::testSubjectReferenceCompliance

Flake rate in main: 23.08% (Passed 20 times, Failed 6 times)

Stack Traces | 0.0855s run time
OpenEMR\Tests\Services\FHIR\FhirMedicationDispenseUSCore8ComplianceTest::testSubjectReferenceCompliance
Exception: Failed to create test encounter

.../Tests/Fixtures/MedicationDispenseFixtureManager.php:323
.../Tests/Fixtures/MedicationDispenseFixtureManager.php:75
.../Services/FHIR/FhirMedicationDispenseUSCore8ComplianceTest.php:194
OpenEMR.Tests.Services.FHIR.FhirMedicationDispenseUSCore8ComplianceTest::testTypeValueSetCompliance

Flake rate in main: 3.57% (Passed 27 times, Failed 1 times)

Stack Traces | 0.0821s run time
OpenEMR\Tests\Services\FHIR\FhirMedicationDispenseUSCore8ComplianceTest::testTypeValueSetCompliance
Exception: Failed to create test encounter

.../Tests/Fixtures/MedicationDispenseFixtureManager.php:323
.../Tests/Fixtures/MedicationDispenseFixtureManager.php:75
.../Services/FHIR/FhirMedicationDispenseUSCore8ComplianceTest.php:248
OpenEMR.Tests.Services.FHIR.FhirMedicationDispenseUSCore8ComplianceTest::testWhenHandedOverDateTimeCompliance

Flake rate in main: 5.26% (Passed 18 times, Failed 1 times)

Stack Traces | 0.077s run time
OpenEMR\Tests\Services\FHIR\FhirMedicationDispenseUSCore8ComplianceTest::testWhenHandedOverDateTimeCompliance
Exception: Failed to create test encounter

.../Tests/Fixtures/MedicationDispenseFixtureManager.php:323
.../Tests/Fixtures/MedicationDispenseFixtureManager.php:75
.../Services/FHIR/FhirMedicationDispenseUSCore8ComplianceTest.php:292
OpenEMR.Tests.Services.FacilityServiceTest::testInsertFailure

Flake rate in main: 100.00% (Passed 0 times, Failed 1 times)

Stack Traces | 0.0221s run time
OpenEMR\Tests\Services\FacilityServiceTest::testInsertFailure
Failed asserting that 3 matches expected 2.

.../Tests/Services/FacilityServiceTest.php:60
OpenEMR.Tests.Services.FacilityServiceTest::testInsertSuccess

Flake rate in main: 9.09% (Passed 10 times, Failed 1 times)

Stack Traces | 0.0191s run time
OpenEMR\Tests\Services\FacilityServiceTest::testInsertSuccess
Failed asserting that false is true.

.../Tests/Services/FacilityServiceTest.php:67
OpenEMR.Tests.Services.FacilityServiceTest::testUpdateSuccess

Flake rate in main: 10.53% (Passed 17 times, Failed 2 times)

Stack Traces | 0.022s run time
OpenEMR\Tests\Services\FacilityServiceTest::testUpdateSuccess
Failed asserting that false is true.

.../Tests/Services/FacilityServiceTest.php:102
OpenEMR.Tests.Services.PatientServiceTest::testInsertFailure

Flake rate in main: 7.14% (Passed 39 times, Failed 3 times)

Stack Traces | 0.0175s run time
OpenEMR\Tests\Services\PatientServiceTest::testInsertFailure
Failed asserting that an array has the key 'fname'.

.../Tests/Services/PatientServiceTest.php:64
OpenEMR.Tests.Services.PatientServiceTest::testUpdateFailure

Flake rate in main: 9.09% (Passed 20 times, Failed 2 times)

Stack Traces | 0.0362s run time
OpenEMR\Tests\Services\PatientServiceTest::testUpdateFailure
Failed asserting that an array has the key 'fname'.

.../Tests/Services/PatientServiceTest.php:100
OpenEMR.Tests.Validators.PatientValidatorTest::testValidationInsertFailure

Flake rate in main: 6.78% (Passed 55 times, Failed 4 times)

Stack Traces | 0.102s run time
OpenEMR\Tests\Validators\PatientValidatorTest::testValidationInsertFailure
Failed asserting that true is false.

.../Tests/Validators/PatientValidatorTest.php:41
OpenEMR.Tests.Validators.PatientValidatorTest::testValidationUpdateFailure

Flake rate in main: 8.33% (Passed 11 times, Failed 1 times)

Stack Traces | 0.0977s run time
OpenEMR\Tests\Validators\PatientValidatorTest::testValidationUpdateFailure
Failed asserting that an array has the key 'fname'.

.../Tests/Validators/PatientValidatorTest.php:64

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@igormukhingmailcom igormukhingmailcom force-pushed the 9420-validator-no-nesting-approach branch from fa01bc4 to 4599fc6 Compare November 13, 2025 17:53
@igormukhingmailcom igormukhingmailcom marked this pull request as draft November 13, 2025 19:07
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.

Validators - Not optimal deep nesting approach

1 participant