Skip to main content

Documentation Test Coverage

Every documented feature is backed by automated tests. This page maps docs to tests so you can verify everything works.

How to Run Tests​

# Run all tests
vendor/bin/pest

# Run only fast unit tests (class existence checks)
vendor/bin/pest tests/Unit/

# Run feature tests (need database)
vendor/bin/pest tests/Feature/

Test Coverage Map​

Unit Tests (fast, no database needed)​

These tests verify that every class, method, and feature mentioned in the docs actually exists in the source code. They run in ~1 second.

Documentation PageTest FileWhat's Verified
Form Fieldstests/Unit/ClassExistsTest.phpAll 50+ form field classes exist
Grid Filterstests/Unit/ClassExistsTest.phpEqual, Like, Between, In, Where, Scope filters
Grid Actionstests/Unit/ClassExistsTest.phpActions, DropdownActions displayers
Data Exporttests/Unit/ClassExistsTest.phpCsvExporter class
Permissionstests/Unit/ClassExistsTest.phpPermission check/allow/deny methods, all Auth models
Commandstests/Unit/ClassExistsTest.phpAll 9 console commands
Widgetstests/Unit/WidgetsTest.phpBox, Tab, Table, InfoBox, Collapse, Alert, Callout, Carousel, Form

Feature Tests (integration, needs database)​

These tests boot the full Laravel application and verify actual CRUD operations work end-to-end.

Documentation PageTest FileWhat's Verified
Installationtests/Feature/InstallTest.phpAdmin directory created
Installationtests/Feature/ConsoleCommandsTest.phpCommands, tables, seed data
Quick Starttests/Feature/LaravelTest.phpLaravel app boots
Commandstests/Feature/ConsoleCommandsTest.phpAll console commands registered
Configurationtests/Feature/ConfigurationTest.phpAll config options
Configurationtests/Feature/UserSettingTest.phpSettings page loads
Model Gridtests/Feature/UserGridTest.phpGrid renders with columns
Model Gridtests/Feature/GridDisplayTest.phpGrid construction, options
Grid Columntests/Feature/GridColumnTest.phpColumn displayers, actions
Grid Columntests/Feature/GridColumnConfigTest.phpColumn width, color, attributes
Column Displaytests/Feature/GridColumnDisplayMethodsTest.phpAll display methods
Grid Actionstests/Feature/GridActionsTest.phpRow/batch actions, displayers
Grid Filterstests/Feature/GridFilterTest.phpFilter types, conditions
Inline Editingtests/Feature/GridInlineEditTest.phpEditable, switch, select
Grid Exporttests/Feature/GridExportTest.phpCsvExporter, export options
Grid Toolstests/Feature/GridToolsTest.phpHeader, footer, quickSearch, selector
Model Formtests/Feature/UserFormTest.phpCreate form loads
Form Fieldstests/Feature/FormFieldsTest.phpBasic field types
Form Fieldstests/Feature/FormFieldTypesTest.phpAll 60+ field types
Form Validationtests/Feature/FormValidationTest.phpRules, creationRules, updateRules
Form Callbackstests/Feature/FormCallbacksTest.phpSaving, saved, deleting hooks
Form Layouttests/Feature/FormLayoutTest.phpTabs, columns, rows, fieldset
Form Uploadtests/Feature/FormUploadFieldsTest.phpImage, file, multipleImage
Form Uploadtests/Feature/FileUploadTest.phpFile upload form loads
Form Uploadtests/Feature/ImageUploadTest.phpImage upload form loads
Model Showtests/Feature/ShowBuilderTest.phpShow construction, fields
Model Showtests/Feature/ShowFieldsTest.phpField display methods, panel
Model Treetests/Feature/ModelTreeTest.phpTree selectOptions works
Model Treetests/Feature/TreeBuilderTest.phpTree construction, tools
Permissionstests/Feature/PermissionsTest.phpPermissions page loads
Permissionstests/Feature/RolesTest.phpRoles page loads
Permissionstests/Feature/UsersTest.phpUsers page loads
RBACtests/Feature/RbacTest.phpFull RBAC system tests
Extensionstests/Feature/ExtensionsTest.phpExtension registration
Frontendtests/Feature/FrontendAssetsTest.phpCSS, JS, script, style
Templatestests/Feature/FrontendAssetsTest.phpTemplate config
n/atests/Feature/AdminClassTest.phpAdmin facade methods
n/atests/Feature/AdminCrudTest.phpUser/Role/Permission CRUD
n/atests/Feature/AuthSettingsTest.phpAuth settings page
n/atests/Feature/AuthTest.phpLogin form, authentication
n/atests/Feature/ContentLayoutTest.phpContent layout builder
n/atests/Feature/IndexTest.phpDashboard loads
n/atests/Feature/MenuTest.phpMenu page loads
n/atests/Feature/MiddlewareTest.phpMiddleware classes
n/atests/Feature/OperationLogTest.phpOperation log page loads
n/atests/Feature/ServiceProviderTest.phpService provider, routes
n/atests/BasicAuthTest.phpFull login/logout flow

Adding a CI Badge​

To show test status publicly, add a GitHub Actions workflow:

# .github/workflows/tests.yml
name: Tests

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.2, 8.3, 8.4]
laravel: [10.*, 11.*, 12.*, 13.*]

steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}

- run: composer install --no-interaction
- run: vendor/bin/pest

Then add this badge to your README:

![Tests](https://github.com/super-admin-org/super-admin/actions/workflows/tests.yml/badge.svg)