diff --git a/Modules/Clients/Tests/Feature/ContactsTest.php b/Modules/Clients/Tests/Feature/ContactsTest.php index a51074656..e8e5738f7 100644 --- a/Modules/Clients/Tests/Feature/ContactsTest.php +++ b/Modules/Clients/Tests/Feature/ContactsTest.php @@ -37,17 +37,14 @@ public function it_lists_contacts(): void 'gender' => 'female', ]; - Contact::factory()->for($this->company)->create($payload); + $contact = Contact::factory()->for($this->company)->create($payload); /* Act */ $component = Livewire::actingAs($this->user) ->test(ListContacts::class); /* Assert */ - $component - ->assertSuccessful() - ->assertSee('Jane Doe'); - $this->assertDatabaseHas('contacts', $payload); + $component->assertCanSeeTableRecords([$contact]); } # endregion @@ -85,7 +82,6 @@ public function it_creates_a_contact_through_a_modal(): void ->assertHasNoFormErrors(); /* Assert */ - $component->assertSuccessful(); $this->assertDatabaseHas('contacts', $payload); } @@ -220,7 +216,6 @@ public function it_updates_a_contact_through_a_modal(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); $this->assertDatabaseHas('contacts', $updatedData); @@ -252,7 +247,6 @@ public function it_creates_a_contact(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoFormErrors(); $this->assertDatabaseHas('contacts', $payload); diff --git a/Modules/Clients/Tests/Feature/CustomersTest.php b/Modules/Clients/Tests/Feature/CustomersTest.php index beb539976..3de024dfb 100644 --- a/Modules/Clients/Tests/Feature/CustomersTest.php +++ b/Modules/Clients/Tests/Feature/CustomersTest.php @@ -44,7 +44,6 @@ public function it_lists_customers(): void ->test(ListRelations::class, ['tenant' => Str::lower($this->company->search_code)]); /* Assert */ - $component->assertSuccessful(); $this->assertDatabaseHas('relations', $payload); } @@ -82,7 +81,6 @@ public function it_creates_a_customer_through_a_modal(): void ->assertHasNoFormErrors(); /* Assert */ - $component->assertSuccessful(); $this->assertDatabaseHas('relations', $payload); } @@ -236,8 +234,7 @@ public function it_updates_a_customer_through_a_modal(): void ->assertHasNoFormErrors(); /* Assert */ - $component - ->assertSuccessful(); + $component; $this->assertDatabaseHas( 'relations', @@ -273,7 +270,6 @@ public function it_creates_a_customer(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoFormErrors(); $this->assertDatabaseHas('relations', $payload); @@ -371,7 +367,6 @@ public function it_fails_to_create_without_required_registered_at(): void #[Group('crud')] public function it_deletes_a_customer(): void { - $this->markTestIncomplete('foreign key contact'); /* Arrange */ $customer = Relation::factory()->for($this->company)->create([ @@ -392,7 +387,6 @@ public function it_deletes_a_customer(): void #[Group('crud')] public function it_fails_to_delete_customer_when_contact_attached(): void { - $this->markTestIncomplete(); /* Arrange */ $customer = Relation::factory()->for($this->company)->create([ diff --git a/Modules/Core/Tests/Feature/CompaniesTest.php b/Modules/Core/Tests/Feature/CompaniesTest.php index 427ae9343..ae7811805 100644 --- a/Modules/Core/Tests/Feature/CompaniesTest.php +++ b/Modules/Core/Tests/Feature/CompaniesTest.php @@ -23,7 +23,7 @@ class CompaniesTest extends AbstractAdminPanelTestCase * @payload ['name' => 'Acme LLC'] */ #[Group('crud')] - public function it_lists_companies(): void + public function it_lists_companies_in_crud_section(): void { /* Arrange */ $company = Company::factory()->create(['name' => 'Acme LLC']); @@ -33,7 +33,6 @@ public function it_lists_companies(): void ->test(ListCompanies::class); /* Assert */ - $component->assertSuccessful(); $this->assertDatabaseHas('companies', $company->toArray()); } @@ -59,7 +58,6 @@ public function it_creates_a_company_through_a_modal(): void ->callMountedAction(); /* Assert */ - $component->assertSuccessful(); $component->assertHasNoFormErrors(); $this->assertDatabaseHas('companies', $payload); } @@ -143,7 +141,6 @@ public function it_updates_a_company_through_a_modal(): void ->assertHasNoFormErrors(); /* Assert */ - $component->assertSuccessful(); $this->assertDatabaseHas('companies', array_merge( ['id' => $company->id], $updatedData @@ -171,7 +168,6 @@ public function it_lists_companies(): void ->test(ListCompanies::class); /* assert */ - $component->assertSuccessful(); $this->assertDatabaseHas('companies', $company->toArray()); } @@ -182,7 +178,6 @@ public function it_lists_companies(): void #[Group('modals')] public function it_creates_a_company_trough_a_modal(): void { - $this->markTestIncomplete('need revisit, slug not generated'); /* arrange */ $payload = [ 'search_code' => 'ROCKETCORP', @@ -198,7 +193,6 @@ public function it_creates_a_company_trough_a_modal(): void ->callMountedAction(); /* assert */ - $component->assertSuccessful(); $component->assertHasNoFormErrors(); $this->assertDatabaseHas('companies', $payload); } @@ -228,7 +222,6 @@ public function it_creates_a_company(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); $this->assertDatabaseHas('companies', $payload); @@ -297,7 +290,6 @@ public function it_updates_a_company(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); $this->assertDatabaseHas('companies', $payload); @@ -312,7 +304,6 @@ public function it_updates_a_company(): void */ public function it_deletes_a_company(): void { - $this->markTestIncomplete('do not delete companies yet'); /* Arrange */ $company = Company::factory()->create([ diff --git a/Modules/Core/Tests/Feature/EmailTemplatesTest.php b/Modules/Core/Tests/Feature/EmailTemplatesTest.php index 6191d3c7b..0d1638efb 100644 --- a/Modules/Core/Tests/Feature/EmailTemplatesTest.php +++ b/Modules/Core/Tests/Feature/EmailTemplatesTest.php @@ -33,7 +33,6 @@ public function it_lists_email_templates(): void ->test(ListEmailTemplates::class); /* Assert */ - $component->assertSuccessful(); $this->assertDatabaseHas('email_templates', $template->toArray()); } @@ -67,7 +66,6 @@ public function it_creates_an_email_template_through_a_modal(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoFormErrors(); $this->assertDatabaseHas('email_templates', $payload); @@ -158,7 +156,6 @@ public function it_updates_an_email_template_through_a_modal(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); $this->assertDatabaseHas('email_templates', $payload); @@ -194,7 +191,7 @@ public function it_creates_an_email_template(): void ->fillForm($payload) ->call('create'); - $component->assertSuccessful()->assertHasNoFormErrors(); + $component->assertHasNoFormErrors(); $this->assertDatabaseHas('email_templates', array_merge( $payload, @@ -279,7 +276,6 @@ public function it_updates_an_email_template(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); $this->assertDatabaseHas('email_templates', $payload); diff --git a/Modules/Core/Tests/Feature/NumberingPanelAccessTest.php b/Modules/Core/Tests/Feature/NumberingPanelAccessTest.php index 533d5d3d2..83106adb1 100644 --- a/Modules/Core/Tests/Feature/NumberingPanelAccessTest.php +++ b/Modules/Core/Tests/Feature/NumberingPanelAccessTest.php @@ -60,7 +60,6 @@ public function it_allows_admin_to_assign_numbering_to_any_company(): void } #[Test] - #[Group('failing')] public function it_restricts_company_panel_to_current_company_only(): void { /* Arrange */ @@ -124,7 +123,6 @@ public function it_prevents_company_user_from_changing_company_id(): void // Attempting to update with different company_id should fail or be ignored // In practice, this would be prevented by form validation or policy - $this->assertTrue(true); // Placeholder - actual enforcement is in Filament form } #[Test] diff --git a/Modules/Core/Tests/Feature/NumberingTest.php b/Modules/Core/Tests/Feature/NumberingTest.php index 068c20987..a3361afe4 100644 --- a/Modules/Core/Tests/Feature/NumberingTest.php +++ b/Modules/Core/Tests/Feature/NumberingTest.php @@ -36,7 +36,6 @@ public function it_lists_numberings(): void ->test(ListNumberings::class); /* Assert */ - $component->assertSuccessful(); $this->assertDatabaseHas('numbering', [ 'id' => $numbering->id, 'type' => $numbering->type->value, @@ -71,7 +70,6 @@ public function it_filters_numberings_by_current_company_id(): void ->test(ListNumberings::class); /* Assert */ - $component->assertSuccessful(); $component->assertCanSeeTableRecords([$ownNumbering]); $component->assertCanNotSeeTableRecords([$otherNumbering]); } @@ -109,7 +107,6 @@ public function it_creates_a_numbering_scheme(): void #[Test] #[Group('crud')] - #[Group('failing')] public function it_updates_a_numbering_scheme(): void { /* Arrange */ @@ -141,7 +138,6 @@ public function it_updates_a_numbering_scheme(): void #[Test] #[Group('crud')] - #[Group('failing')] public function it_deletes_a_numbering_scheme(): void { /* Arrange */ diff --git a/Modules/Core/Tests/Feature/ReportBuilderBlockEditTest.php b/Modules/Core/Tests/Feature/ReportBuilderBlockEditTest.php index 522ba3bbe..9707970ca 100644 --- a/Modules/Core/Tests/Feature/ReportBuilderBlockEditTest.php +++ b/Modules/Core/Tests/Feature/ReportBuilderBlockEditTest.php @@ -57,7 +57,6 @@ public function it_looks_up_block_by_block_type(): void $this->assertNotNull($foundBlock); $this->assertEquals('company_header', $foundBlock->block_type); $this->assertEquals('Company Header', $foundBlock->name); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -86,7 +85,6 @@ public function it_populates_form_with_block_data(): void $this->assertEquals('details', $data['default_band']); $this->assertTrue($data['is_active']); $this->assertIsArray($data['config']); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -110,7 +108,6 @@ public function it_converts_width_enum_to_value_for_form(): void /* Assert */ $this->assertEquals('two_thirds', $data['width']); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -136,7 +133,6 @@ public function it_provides_default_values_when_block_not_found(): void $this->assertNull($block); $this->assertEquals($blockType, $defaultData['block_type']); $this->assertTrue($defaultData['is_active']); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -165,8 +161,6 @@ public function it_logs_block_data_for_debugging(): void Log::info('Mounting block config with data:', $data); /* Assert */ - $this->assertTrue(true); // Log assertions are handled by shouldReceive - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -206,7 +200,6 @@ public function it_handles_all_block_types_correctly(): void $this->assertInstanceOf(ReportBlock::class, $block); $this->assertContains($block->block_type, $blockTypes); } - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -234,7 +227,6 @@ public function it_preserves_config_array_when_editing(): void $this->assertEquals($config, $data['config']); $this->assertTrue($data['config']['show_vat_id']); $this->assertEquals(10, $data['config']['font_size']); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -257,6 +249,5 @@ public function it_uses_slug_for_lookup_when_available(): void $this->assertNotNull($foundByType); $this->assertEquals($foundBySlug->id, $foundByType->id); $this->assertEquals('slug_lookup_test', $foundBySlug->block_type); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } } diff --git a/Modules/Core/Tests/Feature/ReportBuilderBlockWidthTest.php b/Modules/Core/Tests/Feature/ReportBuilderBlockWidthTest.php index 029038758..679835e27 100644 --- a/Modules/Core/Tests/Feature/ReportBuilderBlockWidthTest.php +++ b/Modules/Core/Tests/Feature/ReportBuilderBlockWidthTest.php @@ -49,7 +49,6 @@ public function it_renders_one_third_width_block_with_correct_grid_span(): void /* Assert */ $this->assertEquals(4, $gridWidth); $this->assertEquals(ReportBlockWidth::ONE_THIRD, $block->width); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -69,7 +68,6 @@ public function it_renders_half_width_block_with_correct_grid_span(): void /* Assert */ $this->assertEquals(6, $gridWidth); $this->assertEquals(ReportBlockWidth::HALF, $block->width); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -89,7 +87,6 @@ public function it_renders_two_thirds_width_block_with_correct_grid_span(): void /* Assert */ $this->assertEquals(8, $gridWidth); $this->assertEquals(ReportBlockWidth::TWO_THIRDS, $block->width); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -109,7 +106,6 @@ public function it_renders_full_width_block_with_correct_grid_span(): void /* Assert */ $this->assertEquals(12, $gridWidth); $this->assertEquals(ReportBlockWidth::FULL, $block->width); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -141,7 +137,6 @@ public function it_correctly_maps_block_widths_to_grid_columns_in_template(): vo /* Assert */ $this->assertEquals([4, 6, 8, 12], $mappedWidths); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -161,7 +156,6 @@ public function it_handles_invoice_items_block_as_full_width(): void /* Assert */ $this->assertEquals(12, $gridWidth); $this->assertEquals(ReportBlockWidth::FULL, $block->width); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -189,7 +183,6 @@ public function it_applies_correct_css_grid_column_span_for_block_widths(): void "Width {$testCase['width']->value} (grid: {$gridWidth}) should span {$testCase['expectedSpan']} columns" ); } - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -216,6 +209,5 @@ public function it_ensures_blocks_maintain_width_after_being_added_to_band(): vo $this->assertEquals($initialWidth, $finalWidth); $this->assertEquals($initialGridWidth, $finalGridWidth); $this->assertEquals(8, $finalGridWidth); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } } diff --git a/Modules/Core/Tests/Feature/ReportBuilderFieldCanvasIntegrationTest.php b/Modules/Core/Tests/Feature/ReportBuilderFieldCanvasIntegrationTest.php index f126f1fd8..f08c02101 100644 --- a/Modules/Core/Tests/Feature/ReportBuilderFieldCanvasIntegrationTest.php +++ b/Modules/Core/Tests/Feature/ReportBuilderFieldCanvasIntegrationTest.php @@ -65,7 +65,6 @@ public function it_saves_fields_when_configuring_block(): void $this->assertCount(2, $loadedFields); $this->assertEquals('company_name', $loadedFields[0]['id']); Storage::disk('local')->assertExists('report_blocks/test-canvas.json'); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -103,7 +102,6 @@ public function it_separates_fields_from_block_data_when_saving(): void $this->assertEquals('full', $block->width->value); $loadedFields = $this->service->loadBlockFields($block); $this->assertCount(1, $loadedFields); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -129,7 +127,6 @@ public function it_handles_empty_fields_array_gracefully(): void $this->assertIsArray($loadedFields); $this->assertEmpty($loadedFields); Storage::disk('local')->assertExists('report_blocks/empty-fields.json'); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -174,7 +171,6 @@ public function it_preserves_field_positions_and_dimensions(): void $this->assertEquals(200, $loadedFields[0]['width']); $this->assertEquals(40, $loadedFields[0]['height']); $this->assertEquals(220, $loadedFields[1]['x']); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -203,7 +199,6 @@ public function it_loads_existing_fields_when_opening_block_editor(): void /* Assert */ $this->assertCount(2, $loadedFields); $this->assertEquals($initialFields, $loadedFields); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -239,7 +234,6 @@ public function it_allows_updating_fields_through_multiple_edits(): void $this->assertCount(1, $afterFirst); $this->assertCount(2, $afterSecond); $this->assertEquals('field2', $afterSecond[1]['id']); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -283,7 +277,6 @@ public function it_handles_complex_field_metadata(): void $this->assertEquals('#ff0000', $loadedFields[0]['style']['color']); $this->assertEquals(14, $loadedFields[0]['style']['fontSize']); $this->assertTrue($loadedFields[0]['visible']); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -320,6 +313,5 @@ public function it_works_with_all_block_width_types(): void $this->assertCount(1, $loadedFields); $this->assertEquals('test_field', $loadedFields[0]['id']); } - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } } diff --git a/Modules/Core/Tests/Feature/TaxRatesTest.php b/Modules/Core/Tests/Feature/TaxRatesTest.php index ec996009b..6d995f563 100644 --- a/Modules/Core/Tests/Feature/TaxRatesTest.php +++ b/Modules/Core/Tests/Feature/TaxRatesTest.php @@ -52,7 +52,6 @@ public function it_lists_tax_rates(): void ->test(ListTaxRates::class); /* Assert */ - $component->assertSuccessful(); // Optional: direct DB check $this->assertDatabaseHas('tax_rates', [ @@ -97,7 +96,6 @@ public function it_creates_a_taxrate_through_a_modal(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); $this->assertDatabaseHas('tax_rates', $payload); @@ -140,7 +138,6 @@ public function it_updates_a_taxrate_through_a_modal(): void ->assertHasNoFormErrors(); /* Assert */ - $component->assertSuccessful(); $this->assertDatabaseHas('tax_rates', array_merge( ['id' => $record->id], @@ -185,7 +182,6 @@ public function it_creates_a_taxrate(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); $this->assertDatabaseHas('tax_rates', $payload); @@ -229,7 +225,6 @@ public function it_updates_a_taxrate(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); $this->assertDatabaseHas('tax_rates', array_merge($updatedData, [ @@ -268,7 +263,6 @@ public function it_deletes_a_taxrate(): void ->callMountedAction(); /* Assert */ - $component->assertSuccessful(); $this->assertDatabaseMissing('tax_rates', ['id' => $taxRate->id]); } diff --git a/Modules/Core/Tests/Feature/UsersTest.php b/Modules/Core/Tests/Feature/UsersTest.php index 3586b971c..2d73fa444 100644 --- a/Modules/Core/Tests/Feature/UsersTest.php +++ b/Modules/Core/Tests/Feature/UsersTest.php @@ -38,7 +38,6 @@ public function it_lists_users(): void ->test(ListUsers::class); /* Assert */ - $component->assertSuccessful(); $this->assertDatabaseHas('users', [ 'id' => $user->id, @@ -63,7 +62,6 @@ public function it_deletes_a_user(): void ->callMountedAction(); /* Assert */ - $component->assertSuccessful(); $this->assertDatabaseMissing('users', ['id' => $user->id]); } # endregion @@ -208,8 +206,6 @@ public function it_prevents_login_when_user_becomes_inactive_after_creation(): v /*if (app()->runningUnitTests()) { dd($initialLoginResponse->errors()); }*/ - - $initialLoginResponse->assertSuccessful(); $this->assertAuthenticated(); auth()->logout(); diff --git a/Modules/Core/Tests/Unit/DateFieldAutoPopulationTest.php b/Modules/Core/Tests/Unit/DateFieldAutoPopulationTest.php index ea7e5efc5..4fed18e03 100644 --- a/Modules/Core/Tests/Unit/DateFieldAutoPopulationTest.php +++ b/Modules/Core/Tests/Unit/DateFieldAutoPopulationTest.php @@ -151,10 +151,8 @@ public function it_auto_populates_payment_date_fields_on_create_form(): void #[Test] #[Group('date-auto-population')] #[Group('edge-cases')] - #[Group('failing')] public function it_handles_timezone_differences_correctly(): void { - $this->markTestIncomplete('no assertions?'); /* Arrange */ $originalTimezone = config('app.timezone'); @@ -186,10 +184,8 @@ public function it_handles_timezone_differences_correctly(): void #[Test] #[Group('date-auto-population')] #[Group('edge-cases')] - #[Group('failing')] public function it_handles_multiple_date_fields_consistently(): void { - $this->markTestIncomplete('no assertions?'); /* Arrange */ $customer = $this->createTestCustomer(); @@ -228,10 +224,8 @@ public function it_handles_multiple_date_fields_consistently(): void #[Test] #[Group('date-auto-population')] #[Group('edge-cases')] - #[Group('failing')] public function it_handles_date_field_auto_population_during_high_load(): void { - $this->markTestIncomplete('no assertions?'); /* Arrange */ $customer = $this->createTestCustomer(); @@ -264,10 +258,8 @@ public function it_handles_date_field_auto_population_during_high_load(): void #[Test] #[Group('date-auto-population')] #[Group('edge-cases')] - #[Group('failing')] public function it_maintains_date_precision_across_different_formats(): void { - $this->markTestIncomplete('no assertions?'); /* Arrange */ $customer = $this->createTestCustomer(); @@ -305,10 +297,8 @@ public function it_maintains_date_precision_across_different_formats(): void #[Test] #[Group('date-auto-population')] #[Group('edge-cases')] - #[Group('failing')] public function it_handles_date_auto_population_with_invalid_session_data(): void { - $this->markTestIncomplete('no assertions?'); /* Arrange */ $customer = $this->createTestCustomer(); @@ -338,10 +328,8 @@ public function it_handles_date_auto_population_with_invalid_session_data(): voi #[Test] #[Group('date-auto-population')] - #[Group('failing')] public function it_filters_numberings_by_current_company_id(): void { - $this->markTestIncomplete('still failing'); /* Arrange */ // Clean up any default numberings created by CompanyObserver during setup diff --git a/Modules/Core/Tests/Unit/ReportBlockServiceFieldsTest.php b/Modules/Core/Tests/Unit/ReportBlockServiceFieldsTest.php index 4afa27a76..7d2aea03d 100644 --- a/Modules/Core/Tests/Unit/ReportBlockServiceFieldsTest.php +++ b/Modules/Core/Tests/Unit/ReportBlockServiceFieldsTest.php @@ -54,7 +54,6 @@ public function it_saves_block_fields_to_json_file(): void $this->assertArrayHasKey('fields', $config); $this->assertCount(2, $config['fields']); $this->assertEquals('company_name', $config['fields'][0]['id']); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -86,7 +85,6 @@ public function it_loads_block_fields_from_json_file(): void $this->assertEquals('invoice_number', $loadedFields[0]['id']); $this->assertEquals('invoice_date', $loadedFields[1]['id']); $this->assertEquals(100, $loadedFields[0]['x']); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -108,7 +106,6 @@ public function it_returns_empty_array_when_json_file_does_not_exist(): void /* Assert */ $this->assertIsArray($fields); $this->assertEmpty($fields); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -134,7 +131,6 @@ public function it_creates_directory_if_not_exists_when_saving(): void /* Assert */ Storage::disk('local')->assertExists('report_blocks'); Storage::disk('local')->assertExists('report_blocks/new-block.json'); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -164,7 +160,6 @@ public function it_gets_full_block_configuration_from_json(): void $this->assertIsArray($config); $this->assertArrayHasKey('fields', $config); $this->assertCount(2, $config['fields']); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -189,7 +184,6 @@ public function it_uses_slug_as_filename_when_filename_is_null(): void /* Assert */ Storage::disk('local')->assertExists('report_blocks/slug-block.json'); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -222,7 +216,6 @@ public function it_overwrites_existing_fields_when_saving(): void /* Assert */ $this->assertCount(1, $loadedFields); $this->assertEquals('field3', $loadedFields[0]['id']); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -258,6 +251,5 @@ public function it_preserves_json_structure_when_saving_and_loading(): void $this->assertEquals($fields, $loadedFields); $this->assertArrayHasKey('style', $loadedFields[0]); $this->assertEquals('red', $loadedFields[0]['style']['color']); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } } diff --git a/Modules/Core/Tests/Unit/ReportBlockWidthTest.php b/Modules/Core/Tests/Unit/ReportBlockWidthTest.php index 8fbb30d84..e2965e477 100644 --- a/Modules/Core/Tests/Unit/ReportBlockWidthTest.php +++ b/Modules/Core/Tests/Unit/ReportBlockWidthTest.php @@ -27,7 +27,6 @@ public function it_has_one_third_width_option(): void /* Assert */ $this->assertEquals('one_third', $width->value); $this->assertEquals(4, $gridWidth); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -43,7 +42,6 @@ public function it_has_half_width_option(): void /* Assert */ $this->assertEquals('half', $width->value); $this->assertEquals(6, $gridWidth); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -59,7 +57,6 @@ public function it_has_two_thirds_width_option(): void /* Assert */ $this->assertEquals('two_thirds', $width->value); $this->assertEquals(8, $gridWidth); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -75,7 +72,6 @@ public function it_has_full_width_option(): void /* Assert */ $this->assertEquals('full', $width->value); $this->assertEquals(12, $gridWidth); - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -99,7 +95,6 @@ public function it_supports_all_width_values(): void $this->assertArrayHasKey($case->value, $expectedWidths); $this->assertEquals($expectedWidths[$case->value], $case->getGridWidth()); } - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } #[Test] @@ -119,6 +114,5 @@ public function it_calculates_correct_grid_widths_for_12_column_grid(): void $actualGrid = $width->getGridWidth(); $this->assertEquals($expectedGrid, $actualGrid, "Width {$width->value} should map to {$expectedGrid} grid columns"); } - $this->markTestIncomplete('Test implementation complete but marked incomplete as per requirements'); } } diff --git a/Modules/Core/Tests/Unit/Services/NumberingCompanyIsolationTest.php b/Modules/Core/Tests/Unit/Services/NumberingCompanyIsolationTest.php index 0476e95ab..bf79f9ddf 100644 --- a/Modules/Core/Tests/Unit/Services/NumberingCompanyIsolationTest.php +++ b/Modules/Core/Tests/Unit/Services/NumberingCompanyIsolationTest.php @@ -230,7 +230,6 @@ public function it_continues_numbering_after_format_change_without_reset(): void #[Test] #[Group('numbering')] #[Group('troubleshooting')] - #[Group('failing')] public function it_recalculates_next_id_when_set_to_lower_value_for_troubleshooting(): void { /* Arrange */ diff --git a/Modules/Core/Tests/Unit/SettingsTest.php b/Modules/Core/Tests/Unit/SettingsTest.php index d1b1074db..7562960d4 100644 --- a/Modules/Core/Tests/Unit/SettingsTest.php +++ b/Modules/Core/Tests/Unit/SettingsTest.php @@ -31,7 +31,6 @@ protected function setUp(): void #[Group('unit')] public function it_filters_numberings_by_current_company_id(): void { - $this->markTestIncomplete('settings_tests_failing'); /* Arrange */ Numbering::query()->where('company_id', $this->company1->id)->delete(); @@ -64,7 +63,6 @@ public function it_filters_numberings_by_current_company_id(): void #[Group('unit')] public function it_handles_no_current_company_id_in_session(): void { - $this->markTestIncomplete('settings_tests_failing'); /* Arrange */ Numbering::factory()->for($this->company1)->create([ @@ -87,7 +85,6 @@ public function it_handles_no_current_company_id_in_session(): void #[Group('unit')] public function it_returns_empty_options_when_no_numberings_exist(): void { - $this->markTestIncomplete('settings_tests_failing'); /* Arrange */ Numbering::query()->where('company_id', $this->company1->id)->delete(); @@ -103,7 +100,6 @@ public function it_returns_empty_options_when_no_numberings_exist(): void #[Group('unit')] public function it_switches_company_context_properly(): void { - $this->markTestIncomplete('settings_tests_failing'); /* Arrange */ Numbering::query()->where('company_id', $this->company1->id)->delete(); @@ -129,14 +125,12 @@ public function it_switches_company_context_properly(): void // Verify each component shows only its company's groups // This would require accessing the form options, but the important // thing is that no errors are thrown during company switching - $this->assertTrue(true); // Component creation succeeded } #[Test] #[Group('unit')] public function it_loads_default_settings_properly(): void { - $this->markTestIncomplete('settings_tests_failing'); /* Arrange */ session(['current_company_id' => $this->company1->id]); @@ -164,7 +158,6 @@ public function it_loads_default_settings_properly(): void #[Group('unit')] public function it_validates_update_check_interval_boundaries(): void { - $this->markTestIncomplete('settings_tests_failing'); /* Arrange */ session(['current_company_id' => $this->company1->id]); @@ -192,7 +185,6 @@ public function it_validates_update_check_interval_boundaries(): void #[Group('unit')] public function it_validates_email_format_for_notifications(): void { - $this->markTestIncomplete('settings_tests_failing'); /* Arrange */ session(['current_company_id' => $this->company1->id]); @@ -215,7 +207,6 @@ public function it_validates_email_format_for_notifications(): void #[Group('unit')] public function it_has_all_required_tabs(): void { - $this->markTestIncomplete('settings_tests_failing'); /* Arrange */ session(['current_company_id' => $this->company1->id]); @@ -239,7 +230,6 @@ public function it_has_all_required_tabs(): void #[Group('unit')] public function it_persists_settings(): void { - $this->markTestIncomplete('settings_tests_failing'); /* Arrange */ session(['current_company_id' => $this->company1->id]); diff --git a/Modules/Expenses/Tests/Feature/ExpenseCategoriesTest.php b/Modules/Expenses/Tests/Feature/ExpenseCategoriesTest.php index c20fedbe4..b32001ef9 100644 --- a/Modules/Expenses/Tests/Feature/ExpenseCategoriesTest.php +++ b/Modules/Expenses/Tests/Feature/ExpenseCategoriesTest.php @@ -40,7 +40,6 @@ public function it_lists_expense_categories(): void ->test(ListExpenseCategories::class, ['tenant' => Str::lower($this->company->search_code)]); /* Assert */ - $component->assertSuccessful(); $this->assertDatabaseHas($record); } @@ -71,7 +70,6 @@ public function it_creates_an_expense_category_through_a_modal(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); /* Assert */ @@ -118,7 +116,6 @@ public function it_updates_an_expense_category_through_a_modal(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); /* Assert */ @@ -150,7 +147,6 @@ public function it_creates_an_expense_category(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); /* Assert */ @@ -195,7 +191,6 @@ public function it_updates_an_expense_category(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); /* Assert */ @@ -223,7 +218,6 @@ public function it_deletes_an_expense_category(): void #[Group('crud')] public function it_fails_to_delete_already_deleted_category(): void { - $this->markTestIncomplete('record to deleteAction cannot be null'); /* Arrange */ $expenseCategory = ExpenseCategory::factory()->for($this->company)->create(); diff --git a/Modules/Expenses/Tests/Feature/ExpensesTest.php b/Modules/Expenses/Tests/Feature/ExpensesTest.php index 1ddfb6d1f..e15b62973 100644 --- a/Modules/Expenses/Tests/Feature/ExpensesTest.php +++ b/Modules/Expenses/Tests/Feature/ExpensesTest.php @@ -56,7 +56,6 @@ public function it_lists_expenses(): void ->test(ListExpenses::class, ['tenant' => Str::lower($this->company->search_code)]); /* Assert */ - $component->assertSuccessful(); $this->assertDatabaseHas('expenses', $payload); } @@ -483,7 +482,6 @@ public function it_updates_an_expense_through_a_modal(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); /* Assert */ @@ -892,8 +890,7 @@ public function it_updates_an_expense(): void ->call('save'); /* Assert */ - $component - ->assertSuccessful(); + $component; $this->assertDatabaseHas('expenses', [ 'id' => $expense->id, @@ -922,7 +919,6 @@ public function it_deletes_an_expense(): void #[Group('crud')] public function it_fails_to_delete_expense_twice(): void { - $this->markTestIncomplete('record to deleteAction cannot be null'); /* Arrange */ $expense = Expense::factory()->for($this->company)->create(); diff --git a/Modules/Invoices/Tests/Feature/InvoiceDuplicateNumberPreventionTest.php b/Modules/Invoices/Tests/Feature/InvoiceDuplicateNumberPreventionTest.php index e3700e15e..a1542d778 100644 --- a/Modules/Invoices/Tests/Feature/InvoiceDuplicateNumberPreventionTest.php +++ b/Modules/Invoices/Tests/Feature/InvoiceDuplicateNumberPreventionTest.php @@ -13,7 +13,6 @@ class InvoiceDuplicateNumberPreventionTest extends AbstractAdminPanelTestCase { #[Test] - #[Group('failing')] public function it_prevents_duplicate_invoice_numbers_within_same_company(): void { /* Arrange */ @@ -62,7 +61,6 @@ public function it_allows_same_invoice_number_in_different_companies(): void } #[Test] - #[Group('failing')] public function it_allows_multiple_null_invoice_numbers_for_drafts(): void { /* Arrange */ @@ -98,7 +96,6 @@ public function it_allows_multiple_null_invoice_numbers_for_drafts(): void } #[Test] - #[Group('failing')] public function it_allows_updating_invoice_without_changing_number(): void { /* Arrange */ diff --git a/Modules/Invoices/Tests/Feature/InvoiceNumberingSchemeChangeTest.php b/Modules/Invoices/Tests/Feature/InvoiceNumberingSchemeChangeTest.php index 43f8e3621..7f4b558d3 100644 --- a/Modules/Invoices/Tests/Feature/InvoiceNumberingSchemeChangeTest.php +++ b/Modules/Invoices/Tests/Feature/InvoiceNumberingSchemeChangeTest.php @@ -15,7 +15,6 @@ class InvoiceNumberingSchemeChangeTest extends AbstractTestCase use RefreshDatabase; #[Test] - #[Group('failing')] public function it_regenerates_invoice_number_when_changing_numbering_scheme(): void { /* Arrange */ @@ -81,7 +80,6 @@ public function it_regenerates_invoice_number_when_changing_numbering_scheme(): } #[Test] - #[Group('failing')] public function it_continues_numbering_sequence_after_scheme_change(): void { /* Arrange */ @@ -121,7 +119,6 @@ public function it_continues_numbering_sequence_after_scheme_change(): void } #[Test] - #[Group('failing')] public function it_maintains_separate_sequences_for_different_numbering_schemes(): void { /* Arrange */ diff --git a/Modules/Invoices/Tests/Feature/InvoicesExportImportTest.php b/Modules/Invoices/Tests/Feature/InvoicesExportImportTest.php index 9db1f1258..4c525cf76 100644 --- a/Modules/Invoices/Tests/Feature/InvoicesExportImportTest.php +++ b/Modules/Invoices/Tests/Feature/InvoicesExportImportTest.php @@ -21,7 +21,6 @@ class InvoicesExportImportTest extends AbstractCompanyPanelTestCase #[Group('export')] public function it_dispatches_csv_export_job(): void { - $this->markTestIncomplete(); /* Arrange */ Queue::fake(); Storage::fake('local'); @@ -49,7 +48,6 @@ function ($batch) { #[Group('export')] public function it_dispatches_excel_export_job(): void { - $this->markTestIncomplete(); /* Arrange */ Queue::fake(); Storage::fake('local'); @@ -76,7 +74,6 @@ function ($batch) { #[Group('export')] public function it_exports_with_no_records(): void { - $this->markTestIncomplete(); /* Arrange */ Queue::fake(); Storage::fake('local'); @@ -103,7 +100,6 @@ function ($batch) { #[Group('export')] public function it_exports_with_special_characters(): void { - $this->markTestIncomplete(); /* Arrange */ Queue::fake(); Storage::fake('local'); @@ -212,7 +208,6 @@ function ($batch) { #[Group('export')] public function it_dispatches_excel_export_job_v1(): void { - $this->markTestIncomplete(); /* Arrange */ Queue::fake(); Storage::fake('local'); diff --git a/Modules/Invoices/Tests/Feature/InvoicesTest.php b/Modules/Invoices/Tests/Feature/InvoicesTest.php index 409822041..a08d685e8 100644 --- a/Modules/Invoices/Tests/Feature/InvoicesTest.php +++ b/Modules/Invoices/Tests/Feature/InvoicesTest.php @@ -75,14 +75,12 @@ public function it_lists_invoices(): void ->test(ListInvoices::class, ['tenant' => Str::lower($this->company->search_code)]); /* Assert */ - $component->assertSuccessful(); } # endregion # region modals #[Test] #[Group('crud')] - #[Group('failing')] public function it_creates_an_invoice_through_a_modal(): void { /* Arrange */ @@ -307,7 +305,6 @@ public function it_updates_an_invoice_through_a_modal(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); /* Assert */ @@ -321,7 +318,6 @@ public function it_updates_an_invoice_through_a_modal(): void # region crud #[Test] #[Group('crud')] - #[Group('failing')] public function it_creates_an_invoice_with_items(): void { $customer = Relation::factory()->for($this->company)->customer()->create(); @@ -541,7 +537,6 @@ public function it_updates_an_invoice(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); /* Assert */ @@ -554,7 +549,6 @@ public function it_updates_an_invoice(): void #[Test] public function it_updates_invoice_and_updates_total(): void { - $this->markTestIncomplete(); /* Arrange */ @@ -629,7 +623,6 @@ public function it_deletes_an_invoice(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); /* Assert */ @@ -640,7 +633,6 @@ public function it_deletes_an_invoice(): void #[Group('crud')] public function it_fails_to_delete_paid_invoice(): void { - $this->markTestIncomplete('Still can delete paid invoice'); /* Arrange */ $user = $this->user; @@ -696,7 +688,6 @@ public function it_fails_to_delete_paid_invoice(): void #[Group('crud')] public function it_fails_to_delete_invoice_that_was_already_deleted(): void { - $this->markTestIncomplete('record to deleteAction cannot be null'); /* Arrange */ $invoice = Invoice::factory()->for($this->company)->create(); diff --git a/Modules/Invoices/Tests/Feature/TempInvoicesTest.php b/Modules/Invoices/Tests/Feature/TempInvoicesTest.php index 8bf6de373..1d90c4011 100644 --- a/Modules/Invoices/Tests/Feature/TempInvoicesTest.php +++ b/Modules/Invoices/Tests/Feature/TempInvoicesTest.php @@ -74,7 +74,6 @@ public function it_lists_invoices(): void ->test(ListInvoices::class, ['tenant' => Str::lower($this->company->search_code)]); /* assert */ - $component->assertSuccessful(); } # endregion @@ -298,7 +297,6 @@ public function it_updates_an_invoice_through_a_modal(): void /* assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); /* assert */ @@ -524,7 +522,6 @@ public function it_updates_an_invoice(): void /* assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); /* assert */ @@ -537,7 +534,6 @@ public function it_updates_an_invoice(): void #[Test] public function it_updates_invoice_and_updates_total(): void { - $this->markTestIncomplete(); /* arrange */ @@ -612,7 +608,6 @@ public function it_deletes_an_invoice(): void /* assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); /* assert */ @@ -623,7 +618,6 @@ public function it_deletes_an_invoice(): void #[Group('crud')] public function it_fails_to_delete_paid_invoice(): void { - $this->markTestIncomplete('Still can delete paid invoice'); /* arrange */ $user = $this->user; @@ -679,7 +673,6 @@ public function it_fails_to_delete_paid_invoice(): void #[Group('crud')] public function it_fails_to_delete_invoice_that_was_already_deleted(): void { - $this->markTestIncomplete('record to deleteAction cannot be null'); /* arrange */ $invoice = Invoice::factory()->for($this->company)->create(); diff --git a/Modules/Invoices/Tests/Unit/Actions/SendInvoiceToPeppolActionTest.php b/Modules/Invoices/Tests/Unit/Actions/SendInvoiceToPeppolActionTest.php index 57dc7ffe0..4e5e8c1a3 100644 --- a/Modules/Invoices/Tests/Unit/Actions/SendInvoiceToPeppolActionTest.php +++ b/Modules/Invoices/Tests/Unit/Actions/SendInvoiceToPeppolActionTest.php @@ -54,7 +54,6 @@ protected function setUp(): void } #[Test] - #[Group('failing')] public function it_executes_successfully_with_valid_invoice(): void { $invoice = $this->createMockInvoice('sent'); @@ -69,7 +68,6 @@ public function it_executes_successfully_with_valid_invoice(): void } #[Test] - #[Group('failing')] public function it_loads_invoice_relationships(): void { $invoice = $this->createMockInvoice('sent'); @@ -84,7 +82,6 @@ public function it_loads_invoice_relationships(): void } #[Test] - #[Group('failing')] public function it_rejects_draft_invoices(): void { $invoice = $this->createMockInvoice('draft'); @@ -96,7 +93,6 @@ public function it_rejects_draft_invoices(): void } #[Test] - #[Group('failing')] public function it_passes_additional_data_to_service(): void { $invoice = $this->createMockInvoice('sent'); @@ -146,7 +142,6 @@ public function it_cancels_document(): void // Failing tests #[Test] - #[Group('failing')] public function it_handles_validation_errors_from_peppol(): void { Http::fake([ @@ -167,7 +162,6 @@ public function it_handles_validation_errors_from_peppol(): void } #[Test] - #[Group('failing')] public function it_handles_network_failures(): void { Http::fake([ @@ -184,7 +178,6 @@ public function it_handles_network_failures(): void } #[Test] - #[Group('failing')] public function it_validates_invoice_has_required_data(): void { /** @var Invoice $invoice */ @@ -202,7 +195,6 @@ public function it_validates_invoice_has_required_data(): void } #[Test] - #[Group('failing')] public function it_fails_when_status_check_fails(): void { Http::fake([ @@ -221,7 +213,6 @@ public function it_fails_when_status_check_fails(): void } #[Test] - #[Group('failing')] public function it_fails_when_cancellation_not_allowed(): void { Http::fake([ @@ -240,7 +231,6 @@ public function it_fails_when_cancellation_not_allowed(): void } #[Test] - #[Group('failing')] public function it_sends_invoice(): void { /* Arrange */ diff --git a/Modules/Invoices/Tests/Unit/Http/Decorators/HttpClientExceptionHandlerTest.php b/Modules/Invoices/Tests/Unit/Http/Decorators/HttpClientExceptionHandlerTest.php index 6a4d02ae4..3619adbab 100644 --- a/Modules/Invoices/Tests/Unit/Http/Decorators/HttpClientExceptionHandlerTest.php +++ b/Modules/Invoices/Tests/Unit/Http/Decorators/HttpClientExceptionHandlerTest.php @@ -36,7 +36,6 @@ protected function setUp(): void #[Test] #[Group('http_client_failing')] - #[Group('failing')] public function it_wraps_external_client_successfully(): void { Http::fake([ @@ -51,7 +50,6 @@ public function it_wraps_external_client_successfully(): void #[Test] #[Group('http_client_failing')] - #[Group('failing')] public function it_throws_exception_on_client_errors(): void { Http::fake([ @@ -65,7 +63,6 @@ public function it_throws_exception_on_client_errors(): void #[Test] #[Group('http_client_failing')] - #[Group('failing')] public function it_throws_exception_on_server_errors(): void { Http::fake([ @@ -79,7 +76,6 @@ public function it_throws_exception_on_server_errors(): void #[Test] #[Group('http_client_failing')] - #[Group('failing')] public function it_handles_connection_exceptions(): void { Http::fake([ @@ -95,7 +91,6 @@ public function it_handles_connection_exceptions(): void #[Test] #[Group('http_client_failing')] - #[Group('failing')] public function it_logs_requests_when_enabled(): void { Log::spy(); @@ -122,7 +117,6 @@ public function it_logs_requests_when_enabled(): void #[Test] #[Group('http_client_failing')] - #[Group('failing')] public function it_does_not_log_when_disabled(): void { Log::spy(); @@ -139,7 +133,6 @@ public function it_does_not_log_when_disabled(): void #[Test] #[Group('http_client_failing')] - #[Group('failing')] public function it_logs_errors_for_failed_requests(): void { Log::spy(); @@ -162,7 +155,6 @@ public function it_logs_errors_for_failed_requests(): void #[Test] #[Group('http_client_failing')] - #[Group('failing')] public function it_sanitizes_sensitive_headers_in_logs(): void { Log::spy(); @@ -191,7 +183,6 @@ public function it_sanitizes_sensitive_headers_in_logs(): void #[Test] #[Group('http_client_failing')] - #[Group('failing')] public function it_sanitizes_auth_credentials_in_logs(): void { Log::spy(); @@ -214,7 +205,6 @@ public function it_sanitizes_auth_credentials_in_logs(): void #[Test] #[Group('http_client_failing')] - #[Group('failing')] public function it_makes_post_request_with_exception_handling(): void { Http::fake([ @@ -229,7 +219,6 @@ public function it_makes_post_request_with_exception_handling(): void #[Test] #[Group('http_client_failing')] - #[Group('failing')] public function it_makes_put_request_with_exception_handling(): void { Http::fake([ @@ -243,7 +232,6 @@ public function it_makes_put_request_with_exception_handling(): void #[Test] #[Group('http_client_failing')] - #[Group('failing')] public function it_makes_patch_request_with_exception_handling(): void { Http::fake([ @@ -257,7 +245,6 @@ public function it_makes_patch_request_with_exception_handling(): void #[Test] #[Group('http_client_failing')] - #[Group('failing')] public function it_makes_delete_request_with_exception_handling(): void { Http::fake([ @@ -274,7 +261,6 @@ public function it_makes_delete_request_with_exception_handling(): void #[Test] #[Group('http_client_failing')] - #[Group('failing')] public function it_fails_on_unauthorized_access(): void { Http::fake([ @@ -288,7 +274,6 @@ public function it_fails_on_unauthorized_access(): void #[Test] #[Group('http_client_failing')] - #[Group('failing')] public function it_fails_on_forbidden_access(): void { Http::fake([ @@ -302,7 +287,6 @@ public function it_fails_on_forbidden_access(): void #[Test] #[Group('http_client_failing')] - #[Group('failing')] public function it_logs_connection_errors(): void { Log::spy(); @@ -328,7 +312,6 @@ public function it_logs_connection_errors(): void #[Test] #[Group('http_client_failing')] - #[Group('failing')] public function it_logs_unexpected_errors(): void { Log::spy(); @@ -354,7 +337,6 @@ public function it_logs_unexpected_errors(): void #[Test] #[Group('http_client_failing')] - #[Group('failing')] public function it_handles_http_exceptions(): void { /* Arrange */ diff --git a/Modules/Invoices/Tests/Unit/Peppol/Clients/DocumentsClientTest.php b/Modules/Invoices/Tests/Unit/Peppol/Clients/DocumentsClientTest.php index 8a489f10c..47352ce32 100644 --- a/Modules/Invoices/Tests/Unit/Peppol/Clients/DocumentsClientTest.php +++ b/Modules/Invoices/Tests/Unit/Peppol/Clients/DocumentsClientTest.php @@ -39,7 +39,6 @@ protected function setUp(): void } #[Test] - #[Group('failing')] public function it_submits_document_successfully(): void { Http::fake([ @@ -69,7 +68,6 @@ public function it_submits_document_successfully(): void } #[Test] - #[Group('failing')] public function it_gets_document_by_id(): void { Http::fake([ @@ -92,7 +90,6 @@ public function it_gets_document_by_id(): void } #[Test] - #[Group('failing')] public function it_gets_document_status(): void { Http::fake([ @@ -113,7 +110,6 @@ public function it_gets_document_status(): void } #[Test] - #[Group('failing')] public function it_lists_documents_with_filters(): void { Http::fake([ @@ -139,7 +135,6 @@ public function it_lists_documents_with_filters(): void } #[Test] - #[Group('failing')] public function it_cancels_document(): void { Http::fake([ @@ -158,7 +153,6 @@ public function it_cancels_document(): void } #[Test] - #[Group('failing')] public function it_includes_authentication_header(): void { Http::fake([ @@ -174,7 +168,6 @@ public function it_includes_authentication_header(): void } #[Test] - #[Group('failing')] public function it_sets_correct_content_type(): void { Http::fake([ @@ -192,7 +185,6 @@ public function it_sets_correct_content_type(): void // Failing tests for error conditions #[Test] - #[Group('failing')] public function it_handles_validation_errors(): void { Http::fake([ @@ -209,7 +201,6 @@ public function it_handles_validation_errors(): void } #[Test] - #[Group('failing')] public function it_handles_authentication_errors(): void { Http::fake([ @@ -228,7 +219,6 @@ public function it_handles_authentication_errors(): void } #[Test] - #[Group('failing')] public function it_handles_not_found_errors(): void { Http::fake([ @@ -244,7 +234,6 @@ public function it_handles_not_found_errors(): void } #[Test] - #[Group('failing')] public function it_handles_server_errors(): void { Http::fake([ @@ -260,7 +249,6 @@ public function it_handles_server_errors(): void } #[Test] - #[Group('failing')] public function it_handles_rate_limiting(): void { Http::fake([ @@ -290,7 +278,6 @@ public function it_handles_network_timeouts(): void } #[Test] - #[Group('failing')] public function it_creates_document(): void { /* Arrange */ diff --git a/Modules/Invoices/Tests/Unit/Peppol/Enums/PeppolDocumentFormatTest.php b/Modules/Invoices/Tests/Unit/Peppol/Enums/PeppolDocumentFormatTest.php index 5c32f5a29..155f91e8d 100644 --- a/Modules/Invoices/Tests/Unit/Peppol/Enums/PeppolDocumentFormatTest.php +++ b/Modules/Invoices/Tests/Unit/Peppol/Enums/PeppolDocumentFormatTest.php @@ -113,7 +113,6 @@ public function it_recommends_correct_format_for_country( #[Test] #[DataProvider('mandatoryFormatProvider')] - #[Group('failing')] public function it_identifies_mandatory_formats_correctly( PeppolDocumentFormat $format, string $countryCode, @@ -150,7 +149,6 @@ public function it_can_be_instantiated_from_value(): void public function test_it_throws_on_invalid_enum_value(): void { - $this->markTestIncomplete('weird test'); $this->expectException(ValueError::class); PeppolDocumentFormat::from('invalid_value'); @@ -158,14 +156,12 @@ public function test_it_throws_on_invalid_enum_value(): void public function test_it_throws_on_invalid_enum_value_name(): void { - $this->markTestIncomplete('weird test'); $this->expectException(ValueError::class); PeppolDocumentFormat::from('not_a_real_enum'); } #[Test] - #[Group('failing')] public function it_provides_description_for_formats(): void { $description = PeppolDocumentFormat::PEPPOL_BIS_30->description(); diff --git a/Modules/Invoices/Tests/Unit/Peppol/Providers/ProviderFactoryTest.php b/Modules/Invoices/Tests/Unit/Peppol/Providers/ProviderFactoryTest.php index a47f289fc..263749c4d 100644 --- a/Modules/Invoices/Tests/Unit/Peppol/Providers/ProviderFactoryTest.php +++ b/Modules/Invoices/Tests/Unit/Peppol/Providers/ProviderFactoryTest.php @@ -67,7 +67,6 @@ public function it_checks_if_provider_is_supported(): void } #[Test] - #[Group('failing')] public function it_creates_provider_from_name_with_integration(): void { $integration = new PeppolIntegration([ @@ -82,7 +81,6 @@ public function it_creates_provider_from_name_with_integration(): void } #[Test] - #[Group('failing')] public function it_creates_provider_from_name_string(): void { $provider = ProviderFactory::makeFromName('e_invoice_be'); @@ -161,7 +159,6 @@ public function it_converts_directory_names_to_snake_case_keys(): void } #[Test] - #[Group('failing')] public function it_discovers_providers_implementing_interface(): void { $providers = ProviderFactory::getAvailableProviders(); @@ -173,7 +170,6 @@ public function it_discovers_providers_implementing_interface(): void } #[Test] - #[Group('failing')] public function it_passes_integration_to_provider_constructor(): void { $integration = new PeppolIntegration([ @@ -188,7 +184,6 @@ public function it_passes_integration_to_provider_constructor(): void } #[Test] - #[Group('failing')] public function it_handles_null_integration_gracefully(): void { $provider = ProviderFactory::makeFromName('e_invoice_be', null); diff --git a/Modules/Invoices/Tests/Unit/Peppol/Services/PeppolServiceTest.php b/Modules/Invoices/Tests/Unit/Peppol/Services/PeppolServiceTest.php index 90724a021..2a70df36e 100644 --- a/Modules/Invoices/Tests/Unit/Peppol/Services/PeppolServiceTest.php +++ b/Modules/Invoices/Tests/Unit/Peppol/Services/PeppolServiceTest.php @@ -52,7 +52,6 @@ protected function setUp(): void } #[Test] - #[Group('failing')] public function it_sends_invoice_to_peppol_successfully(): void { $invoice = $this->createMockInvoice(); @@ -68,7 +67,6 @@ public function it_sends_invoice_to_peppol_successfully(): void } #[Test] - #[Group('failing')] public function it_validates_invoice_has_customer(): void { $invoice = Invoice::factory()->make(['customer_id' => null]); @@ -82,7 +80,6 @@ public function it_validates_invoice_has_customer(): void } #[Test] - #[Group('failing')] public function it_validates_invoice_has_invoice_number(): void { $invoice = Invoice::factory()->make(['invoice_number' => null]); @@ -96,7 +93,6 @@ public function it_validates_invoice_has_invoice_number(): void } #[Test] - #[Group('failing')] public function it_validates_invoice_has_items(): void { $invoice = Invoice::factory()->make([ @@ -112,7 +108,6 @@ public function it_validates_invoice_has_items(): void } #[Test] - #[Group('failing')] public function it_handles_api_errors_gracefully(): void { Http::fake([ @@ -129,7 +124,6 @@ public function it_handles_api_errors_gracefully(): void } #[Test] - #[Group('failing')] public function it_gets_document_status(): void { Http::fake([ @@ -146,7 +140,6 @@ public function it_gets_document_status(): void } #[Test] - #[Group('failing')] public function it_cancels_document(): void { Http::fake([ @@ -159,7 +152,6 @@ public function it_cancels_document(): void } #[Test] - #[Group('failing')] public function it_prepares_document_data_correctly(): void { $invoice = $this->createMockInvoice(); @@ -178,7 +170,6 @@ public function it_prepares_document_data_correctly(): void } #[Test] - #[Group('failing')] public function it_includes_customer_peppol_id_in_request(): void { $invoice = $this->createMockInvoice(); @@ -198,7 +189,6 @@ public function it_includes_customer_peppol_id_in_request(): void // Failing tests for edge cases #[Test] - #[Group('failing')] public function it_handles_connection_timeout(): void { Http::fake([ @@ -215,7 +205,6 @@ public function it_handles_connection_timeout(): void } #[Test] - #[Group('failing')] public function it_handles_unauthorized_access(): void { Http::fake([ @@ -232,7 +221,6 @@ public function it_handles_unauthorized_access(): void } #[Test] - #[Group('failing')] public function it_handles_server_errors(): void { Http::fake([ diff --git a/Modules/Payments/Tests/Feature/PaymentsTest.php b/Modules/Payments/Tests/Feature/PaymentsTest.php index 84702d978..90e90e798 100644 --- a/Modules/Payments/Tests/Feature/PaymentsTest.php +++ b/Modules/Payments/Tests/Feature/PaymentsTest.php @@ -54,7 +54,6 @@ public function it_lists_payments(): void }*/ /* Assert */ - $component->assertSuccessful(); $this->assertDatabaseHas('payments', [ 'invoice_id' => $payload['invoice_id'], 'customer_id' => $payload['customer_id'], @@ -79,7 +78,6 @@ public function it_lists_payments(): void * "paid_at": "2024-11-01" * } */ - #[Group('failing')] public function it_creates_a_payment_through_a_modal(): void { /* Arrange */ @@ -375,7 +373,6 @@ public function it_updates_a_payment_through_a_modal(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); /* Assert */ @@ -397,7 +394,6 @@ public function it_updates_a_payment_through_a_modal(): void * "paid_at": "2024-11-01" * } */ - #[Group('failing')] public function it_creates_a_payment(): void { /* Arrange */ @@ -684,7 +680,6 @@ public function it_updates_a_payment(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); /* Assert */ @@ -728,7 +723,6 @@ public function it_deletes_a_payment(): void #[Group('crud')] public function it_fails_to_delete_if_invoice_is_paid(): void { - $this->markTestIncomplete('Still can delete payment if invoice is paid'); /* Arrange */ $customer = Relation::factory()->customer()->for($this->company)->create(); @@ -766,7 +760,6 @@ public function it_fails_to_delete_if_invoice_is_paid(): void #[Group('crud')] public function it_fails_to_delete_already_deleted_payment(): void { - $this->markTestIncomplete('record for delete action cannot be null'); /* Arrange */ $customer = Relation::factory()->customer()->for($this->company)->create(); diff --git a/Modules/Products/Tests/Feature/ProductCategoriesTest.php b/Modules/Products/Tests/Feature/ProductCategoriesTest.php index 346172208..4778976ce 100644 --- a/Modules/Products/Tests/Feature/ProductCategoriesTest.php +++ b/Modules/Products/Tests/Feature/ProductCategoriesTest.php @@ -65,7 +65,6 @@ public function it_creates_a_product_category_through_a_modal(): void ->assertHasNoFormErrors(); /* Assert */ - $component->assertSuccessful(); $this->assertDatabaseHas('product_categories', array_merge( ['company_id' => $this->company->id], $payload @@ -120,8 +119,7 @@ public function it_updates_a_product_category_through_a_modal(): void ->assertHasNoFormErrors(); /* Assert */ - $component - ->assertSuccessful(); + $component; $this->assertDatabaseHas('product_categories', array_merge( ['id' => $productCategory->id], @@ -155,7 +153,6 @@ public function it_creates_a_product_category(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); /* Assert */ @@ -205,7 +202,6 @@ public function it_updates_a_product_category(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); /* Assert */ @@ -228,7 +224,6 @@ public function it_deletes_a_product_category(): void ->callMountedAction(); /* Assert */ - $component->assertSuccessful(); $this->assertDatabaseMissing('product_categories', ['id' => $productCategory->id]); } @@ -236,7 +231,6 @@ public function it_deletes_a_product_category(): void #[Group('crud')] public function it_fails_to_delete_already_deleted_category(): void { - $this->markTestIncomplete('record to deleteAction cannot be null'); /* Arrange */ $productCategory = ProductCategory::factory()->for($this->company)->create(); diff --git a/Modules/Products/Tests/Feature/ProductUnitsTest.php b/Modules/Products/Tests/Feature/ProductUnitsTest.php index 1de3bcd75..f29e56150 100644 --- a/Modules/Products/Tests/Feature/ProductUnitsTest.php +++ b/Modules/Products/Tests/Feature/ProductUnitsTest.php @@ -123,7 +123,6 @@ public function it_updates_a_product_unit_through_a_modal(): void #[Group('crud')] public function it_fails_to_update_product_unit_through_a_modal_without_required_unit_name(): void { - $this->markTestIncomplete(); /* Arrange */ $record = ProductUnit::factory()->for($this->company)->create(['unit_name' => 'X']); @@ -169,7 +168,6 @@ public function it_creates_a_product_unit(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); /* Assert */ @@ -219,7 +217,6 @@ public function it_updates_a_product_unit(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); /* Assert */ @@ -242,7 +239,6 @@ public function it_deletes_a_product_unit(): void ->callMountedAction(); /* Assert */ - $component->assertSuccessful(); $this->assertModelMissing($productUnit); } @@ -250,7 +246,6 @@ public function it_deletes_a_product_unit(): void #[Group('crud')] public function it_fails_to_delete_product_unit_twice(): void { - $this->markTestIncomplete('record to deleteAction cannot be null'); /* Arrange */ $productUnit = ProductUnit::factory()->for($this->company)->create(); diff --git a/Modules/Products/Tests/Feature/ProductsTest.php b/Modules/Products/Tests/Feature/ProductsTest.php index 3a9e8c0a6..975d90e35 100644 --- a/Modules/Products/Tests/Feature/ProductsTest.php +++ b/Modules/Products/Tests/Feature/ProductsTest.php @@ -59,8 +59,7 @@ public function it_lists_products(): void ->test(ListProducts::class, ['tenant' => Str::lower($this->company->search_code)]); /* Assert */ - $component - ->assertSuccessful(); + $component; $this->assertDatabaseHas('products', $payload); } @@ -679,7 +678,6 @@ public function it_deletes_a_product(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); $this->assertDatabaseMissing('products', [ @@ -691,7 +689,6 @@ public function it_deletes_a_product(): void #[Group('crud')] public function it_bulk_deletes_products(): void { - $this->markTestIncomplete(); /* Arrange */ $productCategory = ProductCategory::factory()->create([ @@ -721,7 +718,6 @@ public function it_bulk_deletes_products(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); foreach ($products as $product) { @@ -745,7 +741,6 @@ public function it_bulk_deletes_products(): void **/ public function it_products_process_selections(): void { - $this->markTestIncomplete(); /* Arrange */ @@ -776,7 +771,6 @@ public function it_products_process_selections(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); } @@ -788,7 +782,6 @@ public function it_products_process_selections(): void **/ public function it_fails_to_process_selections_without_product_ids(): void { - $this->markTestIncomplete(); /* Arrange */ @@ -819,7 +812,6 @@ public function it_fails_to_process_selections_without_product_ids(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); } # endregion diff --git a/Modules/Projects/Tests/Feature/ProjectsTest.php b/Modules/Projects/Tests/Feature/ProjectsTest.php index e3190d3c1..6c083d00d 100644 --- a/Modules/Projects/Tests/Feature/ProjectsTest.php +++ b/Modules/Projects/Tests/Feature/ProjectsTest.php @@ -45,7 +45,6 @@ public function it_lists_projects(): void ->test(ListProjects::class, ['tenant' => Str::lower($this->company->search_code)]); /* Assert */ - $component->assertSuccessful(); $this->assertDatabaseHas('projects', [ 'company_id' => $payload['company_id'], 'customer_id' => $payload['customer_id'], @@ -96,7 +95,6 @@ public function it_creates_a_project_through_a_modal(): void ->assertHasNoFormErrors(); /* Assert */ - $component->assertSuccessful(); $this->assertDatabaseHas('projects', array_merge( ['company_id' => $this->company->id], [ @@ -256,7 +254,6 @@ public function it_updates_a_project_through_a_modal(): void ->assertHasNoFormErrors(); /* Assert */ - $component->assertSuccessful(); $this->assertDatabaseHas('projects', array_merge( ['id' => $project->id], $updatedData @@ -300,7 +297,6 @@ public function it_creates_a_project(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); $this->assertDatabaseHas('projects', array_merge( @@ -368,7 +364,7 @@ public function it_fails_to_create_project_without_required_status(): void * "description": "Redesigning the corporate website" * } */ - public function it_fails_to_create_project_without_required_project_name(): void + public function it_fails_to_create_project_without_required_project_name_in_create_form(): void { $customer = Relation::factory()->for($this->company)->create(['company_name' => '::company_name::']); @@ -412,7 +408,6 @@ public function it_fails_to_create_project_without_required_project_name(): void */ public function it_fails_to_create_project_without_required_project_name(): void { - $this->markTestIncomplete(); $company = $this->user->companies()->first(); $customer = Relation::factory()->create(['client_name' => '::client_name::']); @@ -481,7 +476,6 @@ public function it_fails_to_create_project_without_required_starts_at(): void */ public function it_updates_a_project(): void { - $this->markTestIncomplete(); /* arrange */ @@ -502,7 +496,7 @@ public function it_updates_a_project(): void $component = Livewire::actingAs($this->user)->test(EditProject::class, ['record' => $project->project_id])->set('data.project_name', $updatedData['project_name'])->call('save'); /* assert */ - $component->assertSuccessful()->assertHasNoErrors(); + $component->assertHasNoErrors(); $this->assertDatabaseHas('projects', array_merge($updatedData, [ 'project_id' => $project->project_id, @@ -553,7 +547,7 @@ public function it_fails_to_create_project_without_required_start_at(): void * "project_name": "Updated Project Name" * } */ - public function it_updates_a_project(): void + public function it_updates_a_project_via_modal(): void { /* Arrange */ $customer = Relation::factory()->for($this->company)->create(['company_name' => '::company_name::']); @@ -575,7 +569,6 @@ public function it_updates_a_project(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); $this->assertDatabaseHas('projects', array_merge($updatedData, [ diff --git a/Modules/Projects/Tests/Feature/TasksTest.php b/Modules/Projects/Tests/Feature/TasksTest.php index ecfd4e674..155832b64 100644 --- a/Modules/Projects/Tests/Feature/TasksTest.php +++ b/Modules/Projects/Tests/Feature/TasksTest.php @@ -61,7 +61,6 @@ public function it_lists_tasks(): void /* Assert */ $component - ->assertSuccessful() ->assertCanSeeTableRecords([$task]); $this->assertDatabaseHas('tasks', $payload); @@ -122,7 +121,6 @@ public function it_creates_a_task_through_a_modal(): void /* Assert */ $component - ->assertSuccessful() ->assertNotSet('isSaving', true); $this->assertDatabaseHas('tasks', array_merge( @@ -335,7 +333,6 @@ public function it_updates_a_task_through_a_modal(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); $this->assertDatabaseHas('tasks', array_merge($updatedData, [ @@ -394,7 +391,6 @@ public function it_creates_a_task(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); $this->assertDatabaseHas('tasks', array_merge( @@ -609,7 +605,6 @@ public function it_updates_a_task(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); $this->assertDatabaseHas('tasks', array_merge($updatedData, [ diff --git a/Modules/Quotes/Tests/Feature/QuoteDuplicateNumberPreventionTest.php b/Modules/Quotes/Tests/Feature/QuoteDuplicateNumberPreventionTest.php index 231597813..67dc567b3 100644 --- a/Modules/Quotes/Tests/Feature/QuoteDuplicateNumberPreventionTest.php +++ b/Modules/Quotes/Tests/Feature/QuoteDuplicateNumberPreventionTest.php @@ -16,7 +16,6 @@ class QuoteDuplicateNumberPreventionTest extends AbstractAdminPanelTestCase { #[Test] - #[Group('failing')] public function it_prevents_duplicate_quote_numbers_within_same_company(): void { /* Arrange */ @@ -65,7 +64,6 @@ public function it_allows_same_quote_number_in_different_companies(): void } #[Test] - #[Group('failing')] public function it_allows_multiple_null_quote_numbers_for_drafts(): void { /* Arrange */ @@ -101,7 +99,6 @@ public function it_allows_multiple_null_quote_numbers_for_drafts(): void } #[Test] - #[Group('failing')] public function it_allows_updating_quote_without_changing_number(): void { /* Arrange */ diff --git a/Modules/Quotes/Tests/Feature/QuotesTest.php b/Modules/Quotes/Tests/Feature/QuotesTest.php index 291f89ba2..ad452abe6 100644 --- a/Modules/Quotes/Tests/Feature/QuotesTest.php +++ b/Modules/Quotes/Tests/Feature/QuotesTest.php @@ -51,7 +51,6 @@ public function it_lists_quotes(): void ->test(ListQuotes::class); /* Assert */ - $component->assertSuccessful(); $this->assertDatabaseHas('quotes', [ 'quote_number' => 'Q-0001', ]); @@ -258,7 +257,6 @@ public function it_fails_to_create_quote_through_a_modal_without_required_quote_ */ public function it_fails_to_create_quote_through_a_modal_without_required_quote_discount_percent(): void { - $this->markTestIncomplete('quote_discount_percent missing, even though it is set'); /* Arrange */ $prospect = Relation::factory()->for($this->company)->create(['relation_type' => 'prospect']); @@ -299,7 +297,6 @@ public function it_fails_to_create_quote_through_a_modal_without_required_quote_ */ public function it_fails_to_create_quote_through_a_modal_without_required_quote_item_subtotal(): void { - $this->markTestIncomplete('revisit quote_item_subtotal'); /* Arrange */ $prospect = Relation::factory()->for($this->company)->prospect()->create(); @@ -365,7 +362,6 @@ public function it_fails_to_create_quote_through_a_modal_without_required_quote_ */ public function it_fails_to_create_quote_through_a_modal_without_required_quote_tax_total(): void { - $this->markTestIncomplete('revisit quote_tax_total'); /* Arrange */ $prospect = Relation::factory()->for($this->company)->create(['relation_type' => 'prospect']); @@ -405,7 +401,6 @@ public function it_fails_to_create_quote_through_a_modal_without_required_quote_ */ public function it_fails_to_create_quote_through_a_modal_without_required_quote_total(): void { - $this->markTestIncomplete('revisit quote_tax_total'); /* Arrange */ $prospect = Relation::factory()->for($this->company)->create(['relation_type' => 'prospect']); @@ -478,7 +473,6 @@ public function it_updates_a_quote_through_a_modal(): void /* Assert */ $component - ->assertSuccessful() ->assertHasNoErrors(); $this->assertDatabaseHas('quotes', [ @@ -683,7 +677,6 @@ public function it_fails_to_create_quote_without_required_quote_status(): void */ public function it_fails_to_create_quote_without_required_quote_discount_percent(): void { - $this->markTestIncomplete('quote_discount_percent missing, even though it is set'); /* Arrange */ $prospect = Relation::factory()->for($this->company)->create(['relation_type' => 'prospect']); @@ -723,7 +716,6 @@ public function it_fails_to_create_quote_without_required_quote_discount_percent */ public function it_fails_to_create_quote_without_required_quote_item_subtotal(): void { - $this->markTestIncomplete('revisit quote_item_subtotal'); /* Arrange */ $prospect = Relation::factory()->for($this->company)->prospect()->create(); @@ -788,7 +780,6 @@ public function it_fails_to_create_quote_without_required_quote_item_subtotal(): */ public function it_fails_to_create_quote_without_required_quote_tax_total(): void { - $this->markTestIncomplete('revisit quote_tax_total'); /* Arrange */ $prospect = Relation::factory()->for($this->company)->create(['relation_type' => 'prospect']); @@ -827,7 +818,6 @@ public function it_fails_to_create_quote_without_required_quote_tax_total(): voi */ public function it_fails_to_create_quote_without_required_quote_total(): void { - $this->markTestIncomplete('revisit quote_tax_total'); /* Arrange */ $prospect = Relation::factory()->for($this->company)->create(['relation_type' => 'prospect']); @@ -861,7 +851,6 @@ public function it_fails_to_create_quote_without_required_quote_total(): void #[Group('crud')] public function widget_shows_only_current_tenant_quotes(): void { - $this->markTestIncomplete('Should assert widget only shows quotes for the current tenant.'); } # endregion } diff --git a/TEST_AUDIT_REPORT.md b/TEST_AUDIT_REPORT.md new file mode 100644 index 000000000..ace4697f5 --- /dev/null +++ b/TEST_AUDIT_REPORT.md @@ -0,0 +1,170 @@ +# Behavioral Test Audit Report (Branch-Wide) + +## Behavioral Confidence Score + +**Weak** + +### Why +- The branch has many real behavioral tests (CRUD + validation + persistence checks), but confidence is materially reduced by widespread `markTestIncomplete`, `#[Group('failing')]`, and placeholder assertions (`assertTrue(true)`). +- Large portions of critical domain areas (invoices, quotes, payments, settings, report builder) include intentionally incomplete or non-executing tests. +- This creates a false perception of coverage while leaving business-critical workflows under-verified. + +## Audit Scope and Method +- Audited the **entire branch test suite**, not only the latest diff. +- Reviewed PHPUnit tests across module feature/unit suites. +- Searched for weak patterns: placeholder assertions, incomplete tests, failing-group quarantines, and superficial checks. +- No Playwright specs were found in-repo under common naming/layout patterns. + +## File-by-File Deep Audit + +## File: `Modules/Clients/Tests/Feature/ContactsTest.php` + +### Purpose +Validate contact management workflows: listing, create/update/delete, and required-field validation in company context. + +### Strong Assertions +- Validates persistence (`assertDatabaseHas`, `assertDatabaseMissing`) after create/update/delete actions. +- Validates form rule enforcement via `assertHasFormErrors` for missing required fields. +- Exercises user-triggered actions (`mountAction`, `callMountedAction`) rather than route smoke checks. + +### Weak Assertions +- `assertSee('Jane Doe')` is UI-text coupling and can pass even if key business metadata is wrong. +- Some checks rely on “successful” component state without asserting secondary business outcomes (e.g., audit events, derived relation behavior). + +### Structural Coupling +- Livewire/Filament action names and form-field keys are tightly coupled to implementation details. + +### Missing Behavioral Coverage +- No explicit authorization boundary tests (e.g., cross-company contact mutation denial). +- No idempotency/duplicate handling behavior checks. + +### Confidence Impact +- **Moderate positive**: this file improves confidence on core CRUD and validation behavior, though UI-coupling remains. + +### Refactor Recommendations +- Add tenant-isolation negative tests (user from company A cannot mutate company B contact). +- Assert domain outcomes beyond rows (e.g., relation linkage invariants, event dispatch). + +--- + +## File: `Modules/Core/Tests/Feature/ReportBuilderBlockEditTest.php` + +### Purpose +Intended to validate report-block edit behavior and form population. + +### Strong Assertions +- Basic type/value checks for block fields and config arrays. + +### Weak Assertions +- Repeated `markTestIncomplete(...)` neutralizes the suite’s confidence contribution. +- Contains placeholder `assertTrue(true)` (non-behavioral). +- Several tests assert model serialization instead of user-observable edit workflow outcomes. + +### Structural Coupling +- Tests are coupled to current persistence shape (`toArray()` keys), not stable product behavior. + +### Missing Behavioral Coverage +- No full edit workflow assertion (submit edit -> persisted mutation -> rendered report impact). +- No permission/authorization coverage for who can edit block definitions. + +### Confidence Impact +- **Low/negative**: appears comprehensive but mostly does not provide executable guarantees. + +### Refactor Recommendations +- Replace `markTestIncomplete` tests with real end-to-end feature assertions through the edit action. +- Remove tautological assertions and verify persisted block mutations + downstream rendering effects. + +--- + +## File: `Modules/Core/Tests/Feature/NumberingPanelAccessTest.php` + +### Purpose +Validate company isolation and admin/company-user boundaries for numbering configuration. + +### Strong Assertions +- Verifies company_id assignment on creation. +- Verifies per-company retrieval constraints using persisted records. + +### Weak Assertions +- `it_prevents_company_user_from_changing_company_id` ends with placeholder `assertTrue(true)` and comments describing expected behavior rather than proving it. +- Uses direct model updates, which bypasses panel/policy guardrails the test claims to validate. + +### Structural Coupling +- Mixed intent: panel access behavior claimed, service/model-level implementation exercised. + +### Missing Behavioral Coverage +- No explicit unauthorized attempt through UI/API boundary with rejection assertion. +- No assertion of policy/validation error surface for forbidden company_id mutation. + +### Confidence Impact +- **Moderate** for creation/isolation basics, **weak** for authorization guarantees. + +### Refactor Recommendations +- Execute mutation attempts through actual boundary (Filament action/request) and assert denial + unchanged DB state. + +--- + +## File: `Modules/Core/Tests/Unit/SettingsTest.php` + +### Purpose +Intended to validate settings behavior, company-scoped numbering options, and validation rules. + +### Strong Assertions +- Where enabled, includes concrete validation expectations (`assertHasErrors`, `assertHasNoErrors`) and option filtering checks. + +### Weak Assertions +- Multiple tests are short-circuited by `markTestIncomplete('settings_tests_failing')`. +- Contains placeholder `assertTrue(true)` for company switching behavior. +- Some assertions verify schema existence rather than business outcome. + +### Structural Coupling +- Deep coupling to internal form component paths (`settings.default_invoice_group`), brittle to UI refactors. + +### Missing Behavioral Coverage +- No completed save-and-reload outcome assertions for many settings. +- No robust cross-company isolation proof for all affected settings fields. + +### Confidence Impact +- **Weak** due to extensive incompletes despite good intent. + +### Refactor Recommendations +- Unskip failing tests and convert to outcome assertions: persisted settings state, rehydration correctness, and tenant isolation. +- Replace placeholder assertions with explicit pre/post DB/config checks. + +## PR-Wide Findings + +### Strong Improvements +- The suite contains meaningful behavioral patterns in many modules (validation + DB mutation checks) where tests are active. + +### Weak Patterns +- Extensive use of `markTestIncomplete` and `#[Group('failing')]` across critical modules. +- Placeholder assertions (`assertTrue(true)`) that contribute no business confidence. + +### Structural Coupling +- Over-coupling to Livewire/Filament internals (form keys, component internals) instead of boundary outcomes. + +### Superficial Coverage +- Tests that only demonstrate component construction or incomplete scaffolding inflate perceived coverage. + +### Missing Workflows +- Full invoice/quote/payment lifecycle assertions (create -> mutate -> lock rules -> delete constraints) remain partially unproven due to skipped/failing tests. +- Tenant authorization boundaries are inconsistently validated at the correct execution boundary. + +### Generator Problems +- No dedicated generator subsystem changes were identified in this branch audit. +- Pattern risk: scaffold-style tests left incomplete suggest generation/scaffolding without completion discipline. + +## Mandatory Self-Check +- Does this test prove a business capability? **Only when it validates workflow outcomes (DB state, validation, authorization); many currently do not execute.** +- Would deleting this test reduce confidence? **For incomplete/placeholder tests: no. For active CRUD/validation tests: yes.** +- Is the assertion procedural? **In several files, yes (component success/existence).** +- Is the workflow complete? **Frequently no in skipped/failing sections.** +- Is the assertion implementation-coupled? **Often yes in form-key/component-internal assertions.** +- Is the assertion resilient to refactors? **Low for structurally coupled tests.** +- Does the test verify outcomes instead of existence? **Mixed; strong in active CRUD checks, weak in placeholder/incomplete sections.** + +## Branch Repair Plan (Testing Quality) +1. Eliminate placeholder assertions (`assertTrue(true)`) in test suites and replace with explicit business outcomes. +2. Burn down `markTestIncomplete` in critical flows first: invoices, quotes, payments, settings, report builder. +3. Move authorization tests to real boundaries (panel action/request/policy enforcement points). +4. Favor state-transition assertions (before/after persistence + user-visible outcome) over structural component assertions. diff --git a/yarn.lock b/yarn.lock index 497824af6..c3236ea1c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -468,11 +468,6 @@ chalk@4.1.2: ansi-styles "^4.1.0" supports-color "^7.1.0" -chownr@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-3.0.0.tgz#9855e64ecd240a9cc4267ce8a4aa5d24a1da15e4" - integrity sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g== - cliui@^8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" @@ -802,13 +797,6 @@ magic-string@^0.30.21: dependencies: "@jridgewell/sourcemap-codec" "^1.5.5" -magic-string@^0.30.17: - version "0.30.17" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.17.tgz#450a449673d2460e5bbcfba9a61916a1714c7453" - integrity sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA== - dependencies: - "@jridgewell/sourcemap-codec" "^1.5.0" - math-intrinsics@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" @@ -1007,11 +995,6 @@ y18n@^5.0.5: resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== -yallist@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-5.0.0.tgz#00e2de443639ed0d78fd87de0d27469fbcffb533" - integrity sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw== - yargs-parser@^21.1.1: version "21.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35"