it('can update multiple line item statuses at once', function (): void {
$this->actingAs(\App\Models\Admin::factory()->create());
$order = Order::factory()->create();
$product = Product::factory()->create();
$lineItems = LineItem::factory()->count(3)->create([
'order_id' => $order->id,
'product_id' => $product->id,
'status' => LineItemStatus::PENDING_ASSOCIATE_ASSIGNMENT,
]);
$action = BulkChangeLineItemStatus::make();
// Test that the action can be created and bulk update functionality exists
expect($action)->toBeInstanceOf(BulkChangeLineItemStatus::class)
->and($lineItems)->toHaveCount(3)
->and($lineItems->first()->status)->toBe(LineItemStatus::PENDING_ASSOCIATE_ASSIGNMENT);
//How to now open the action modal and set a new status?
});
it('can update multiple line item statuses at once', function (): void {
$this->actingAs(\App\Models\Admin::factory()->create());
$order = Order::factory()->create();
$product = Product::factory()->create();
$lineItems = LineItem::factory()->count(3)->create([
'order_id' => $order->id,
'product_id' => $product->id,
'status' => LineItemStatus::PENDING_ASSOCIATE_ASSIGNMENT,
]);
$action = BulkChangeLineItemStatus::make();
// Test that the action can be created and bulk update functionality exists
expect($action)->toBeInstanceOf(BulkChangeLineItemStatus::class)
->and($lineItems)->toHaveCount(3)
->and($lineItems->first()->status)->toBe(LineItemStatus::PENDING_ASSOCIATE_ASSIGNMENT);
//How to now open the action modal and set a new status?
});