An open API service indexing awesome lists of open source software.

https://github.com/sakanjo/filament-easy-testings

Easily test your app.
https://github.com/sakanjo/filament-easy-testings

filament laravel testing

Last synced: 5 months ago
JSON representation

Easily test your app.

Awesome Lists containing this project

README

          

![Preview](./art/preview.png)


Workflow status
Laravel v11+
PHP 8.4+

A Filament plugin to make testing easier.

> ✨ Help support the maintenance of this package by [sponsoring me](https://github.com/sponsors/sakanjo).

Table of Contents
=================

- [Table of Contents](#table-of-contents)
- [Install](#-install)
- [Usage](#-usage)
- [Presets](#presets)
- [Default presets](#default-presets)
- [Creating custom preset](#creating-custom-preset)
- [Support the development](#-support-the-development)
- [Credits](#%EF%B8%8F-credits)
- [License](#-license)

## đŸ“Ļ Install

Install the package via composer:

```
composer require sakanjo/filament-easy-testings
```

## đŸĻ„ Usage

```php
plugin(
EasyTestingPlugin::make()
->preset(MyPreset::make())
);
}
```

## Presets

Presets are the core of the plugin, allows you to create different tests with no limit.

### Default presets

The package comes with a default preset that you can use out of the box.

- `DefaultPreset`
- `EnvPreset`
- `WebsocketPreset`

### Creating custom preset

You can create your own custom preset by extending the `SaKanjo\FilamentEasyTestings\Presets\Preset` class.

```php
persistCollapsed()
->icon('heroicon-m-bolt')
->components([
Forms\Components\TextInput::make('name')
->label('Name')
->required(),

Schemas\Components\Actions::make([
Actions\Action::make('submit')
->action(function (Forms\Get $get, TestingsPage $livewire): void {
$livewire->validateFields(['name']);
$name = $get('name');

Notification::make()
->title("Hello $name")
->send();
}),
]),
]),
];
}
}
```

## 💖 Support the development

**Do you like this project? Support it by donating**

Click the ["💖 Sponsor"](https://github.com/sponsors/sakanjo) at the top of this repo.

## ÂŠī¸ Credits

- [Salah Kanjo](https://github.com/sakanjo)
- [All Contributors](../../contributors)

## 📄 License

[MIT License](https://github.com/sakanjo/filament-easy-testings/blob/master/LICENSE) Š 2023-PRESENT [Salah Kanjo](https://github.com/sakanjo)