it('allows moves sort order up on assicated children', function () {
$continent = Continent::factory()
->hasCountries(2)
->create();
livewire(CountriesRelationManager::class, [
'pageClass' => EditContinent::class,
'ownerRecord' => $continent,
])
->callTableColumnAction('moveUp', $continent->countries->last()->id);
expect($continent->countries->first()->fresh()->sort_order)->toBe(2);
expect($continent->countries->last()->fresh()->sort_order)->toBe(1);
});
it('allows moves sort order up on assicated children', function () {
$continent = Continent::factory()
->hasCountries(2)
->create();
livewire(CountriesRelationManager::class, [
'pageClass' => EditContinent::class,
'ownerRecord' => $continent,
])
->callTableColumnAction('moveUp', $continent->countries->last()->id);
expect($continent->countries->first()->fresh()->sort_order)->toBe(2);
expect($continent->countries->last()->fresh()->sort_order)->toBe(1);
});