sharp icon indicating copy to clipboard operation
sharp copied to clipboard

[console] global generator

Open smknstd opened this issue 2 years ago • 3 comments

todo:

  • [ ] fixer les tests (modif de config/sharp.php pas prise en compte en live)

Completed

  • [x] Wizard to create a command entity/instance.
  • [x] Wizard to create a filter.
  • [x] Rename to generator.
  • [x] Be exhaustive (only show, etc).
  • [x] Entity state.
  • [x] Reorder.
  • [x] Search for the model or path of the entity with a select-type prompt (a list) rather than an input.
  • [x] If possible, add the new entity to the configuration.
  • [x] If possible, add commands (entity list, show).
  • [x] For a new entity, add a URL link to the Sharp page for live testing.
  • [x] Test the generators.

How to use :

php artisan sharp:generator

Screenshot from 2023-10-17 18-54-41

smknstd avatar Oct 17 '23 16:10 smknstd

First idea for the generator tests was to implement a "feature" test: use the wizard to create a new entity and check for 200 ok when visiting the endpoints (list, form, show, etc). But working with orchestra seems to prevent this approach: https://packages.tools/testbench/troubleshooting.html#why-testbench-doesn-t-include-any-of-the-app-classes

smknstd avatar Nov 08 '23 15:11 smknstd

https://github.com/orchestral/testbench/issues/184#issuecomment-508964712 https://github.com/livewire/livewire/blob/main/composer.json#L39

smknstd avatar Nov 09 '23 15:11 smknstd

Screenshot from 2023-11-09 16-51-50

smknstd avatar Nov 09 '23 15:11 smknstd