First, low-level testing of fields and actions should definitely be documented.
Second, I'm thinking that it'd be nice to have some automated tests. You'd specify user interactions, like:
Create Product, title: MacBook Pro 16", price: 1500, description: Foo. Assert no errors.
Create a child Variant, title: Color, values: Space Gray and Silver. Assert no errors.
Create a child Variant, title: Color, values whatever, Assert validation error variant title has to be unique
Create Order with address ABC. Assert no errors.
Create OrderProduct for order #1, linking to the MacBook Pro 16" product. Quantity: 2 Assert no errors
Assert total of OrderProduct
Create OrderProduct again for MacBook Pro 16", assert error - unique rule
Create Order with address DEF. Assert missing ZIP code
Edit order #1, change address to XYZ. Assert no errors.
Go to order index, assert order #1 total is a formatted string that looks like $11,120
This would test that your admin panel didn't start behaving in random ways when you made a minor change to some field definition (this was pretty common in Nova when I was using it) and it would make sure that no pages and actions show errors. This would be done on Livewire level, but we might have a version that does these things with Dusk too to make sure that everything works in the browser as well. That would of course be an optional extra feature.
I'm thinking of ways to make testing easier.
First, low-level testing of fields and actions should definitely be documented.
Second, I'm thinking that it'd be nice to have some automated tests. You'd specify user interactions, like:
MacBook Pro 16"
, price:1500
, description:Foo
. Assert no errors.Variant
, title:Color
, values:Space Gray
andSilver
. Assert no errors.Variant
, title:Color
, values whatever, Assert validation error varianttitle
has to be uniqueOrderProduct
for order #1, linking to theMacBook Pro 16"
product. Quantity: 2 Assert no errorsOrderProduct
OrderProduct
again forMacBook Pro 16"
, assert error - unique rule$11,120
This would test that your admin panel didn't start behaving in random ways when you made a minor change to some field definition (this was pretty common in Nova when I was using it) and it would make sure that no pages and actions show errors. This would be done on Livewire level, but we might have a version that does these things with Dusk too to make sure that everything works in the browser as well. That would of course be an optional extra feature.