Pass the choice to the Kanban column menus (they called the action without it)
Collection::join() plucks from objects, so joining the Js arguments gave an empty string and the sort and urgent threshold menus called setColumnSort() / setUrgentThreshold() with no arguments (500). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -43,7 +43,7 @@
|
|||||||
type="button"
|
type="button"
|
||||||
role="menuitemradio"
|
role="menuitemradio"
|
||||||
aria-checked="{{ $value === $current ? 'true' : 'false' }}"
|
aria-checked="{{ $value === $current ? 'true' : 'false' }}"
|
||||||
wire:click="{{ $method }}({{ collect([...$args, $value])->map(fn ($arg) => Js::from($arg))->join(', ') }})"
|
wire:click="{{ $method }}({{ collect([...$args, $value])->map(fn ($arg): string => Js::from($arg)->toHtml())->implode(', ') }})"
|
||||||
x-on:click="open = false; $refs.button.focus()"
|
x-on:click="open = false; $refs.button.focus()"
|
||||||
x-on:keydown.arrow-down.prevent="$el.nextElementSibling?.focus()"
|
x-on:keydown.arrow-down.prevent="$el.nextElementSibling?.focus()"
|
||||||
x-on:keydown.arrow-up.prevent="$el.previousElementSibling?.matches('button') && $el.previousElementSibling.focus()"
|
x-on:keydown.arrow-up.prevent="$el.previousElementSibling?.matches('button') && $el.previousElementSibling.focus()"
|
||||||
|
|||||||
@@ -212,6 +212,19 @@ it('keeps the task list of a card open when the board is opened again', function
|
|||||||
->assertNoAccessibilityIssues(level: 2);
|
->assertNoAccessibilityIssues(level: 2);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('changes the order of a column and the urgent threshold from the column menus', function () {
|
||||||
|
visit(route('jobs.board'))
|
||||||
|
->on()->desktop()
|
||||||
|
->click('[aria-controls="sort-menu-order"]')
|
||||||
|
->click('#sort-menu-order [aria-checked="false"]')
|
||||||
|
->assertSee('Listan Jonossa järjestys: Eräpäivän mukaan.')
|
||||||
|
->click('[aria-controls="threshold-menu"]')
|
||||||
|
->click('#threshold-menu button:first-of-type')
|
||||||
|
->assertSee('Kiire-listaan nousevat nyt: Vain Heti.')
|
||||||
|
->assertNoJavaScriptErrors()
|
||||||
|
->assertNoAccessibilityIssues(level: 2);
|
||||||
|
});
|
||||||
|
|
||||||
it('marks a task done from the task panel of a card', function () {
|
it('marks a task done from the task panel of a card', function () {
|
||||||
$this->job->update(['status' => 'in_production']);
|
$this->job->update(['status' => 'in_production']);
|
||||||
$task = TaskModel::factory()->create(['customer_job_id' => $this->job->id, 'title' => 'Leikkaus', 'status' => 'in_progress']);
|
$task = TaskModel::factory()->create(['customer_job_id' => $this->job->id, 'title' => 'Leikkaus', 'status' => 'in_progress']);
|
||||||
|
|||||||
@@ -286,3 +286,9 @@ it('remembers for each user which cards have their tasks open', function () {
|
|||||||
$this->actingAs($colleague);
|
$this->actingAs($colleague);
|
||||||
Livewire::test('jobs::board')->assertDontSeeHtml('aria-expanded="true"');
|
Livewire::test('jobs::board')->assertDontSeeHtml('aria-expanded="true"');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('passes the column and choice to the order and urgent threshold menus', function () {
|
||||||
|
Livewire::test('jobs::board')
|
||||||
|
->assertSeeHtml('wire:click="setColumnSort('order', 'due_date')"')
|
||||||
|
->assertSeeHtml('wire:click="setUrgentThreshold('immediate')"');
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user