actingAs(User::factory()->create()); }); it('renders the documentation page', function () { Livewire::test(Documentation::class) ->assertSuccessful() ->assertSee('Documentation API Logistics'); }); it('converts markdown to HTML content', function () { $component = Livewire::test(Documentation::class); expect($component->get('htmlContent')) ->toBeString() ->not->toBeEmpty() ->toContain('

') ->toContain(''); }); it('displays the main documentation sections', function () { Livewire::test(Documentation::class) ->assertSee('Pré-requis') ->assertSee('Comment effectuer des requêtes') ->assertSee('Structure de réponse') ->assertSee('Tables et colonnes disponibles') ->assertSee('Récupération de données') ->assertSee('Envoi de données'); }); it('downloads the documentation as PDF', function () { $response = $this->get(route('documentation.download-pdf')); $response->assertSuccessful() ->assertHeader('content-type', 'application/pdf'); }); it('documents all service endpoints', function () { Livewire::test(Documentation::class) ->assertSee('tables_list') ->assertSee('column_list') ->assertSee('art_list') ->assertSee('art_getstk') ->assertSee('jnl_list') ->assertSee('document_list') ->assertSee('document_detail') ->assertSee('document_add') ->assertSee('document_mod') ->assertSee('Document_GetStatusList') ->assertSee('Document_GetUnitPriceAndVat') ->assertSee('Document_GetDueDate') ->assertSee('Document_GetAttachListThumbnail') ->assertSee('third_list') ->assertSee('third_GetArtHistory') ->assertSee('getserialnumber') ->assertSee('codes_list'); });