Add the touch-screen machine console
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
@@ -84,3 +84,30 @@ it('records maintenance done with the keyboard', function () {
|
||||
->assertSee('Kunnossa')
|
||||
->assertNoAccessibilityIssues(level: 2);
|
||||
});
|
||||
|
||||
it('has no accessibility issues on the machine console', function (string $device, string $colorScheme) {
|
||||
$visit = visit(route('machines.console', $this->machine->id));
|
||||
$visit = $device === 'mobile' ? $visit->on()->mobile() : $visit->on()->desktop();
|
||||
$visit = $colorScheme === 'dark' ? $visit->inDarkMode() : $visit->inLightMode();
|
||||
|
||||
$visit->assertSee('Banderolli')
|
||||
->assertSee(__('machines.console.maintenance_late', ['name' => 'Pään puhdistus']))
|
||||
->assertNoJavaScriptErrors()
|
||||
->assertNoAccessibilityIssues(level: 2);
|
||||
})->with([
|
||||
'desktop, light' => ['desktop', 'light'],
|
||||
'desktop, dark' => ['desktop', 'dark'],
|
||||
'mobile, light' => ['mobile', 'light'],
|
||||
'mobile, dark' => ['mobile', 'dark'],
|
||||
]);
|
||||
|
||||
it('refreshes the console on a tablet and keeps focus on the button', function () {
|
||||
visit(route('machines.console', $this->machine->id))
|
||||
->resize(1024, 768)
|
||||
->click('#console-refresh')
|
||||
->assertSee('Päivitetty klo')
|
||||
->assertScript('document.activeElement.id', 'console-refresh')
|
||||
->click('[aria-label="'.__('machines.console.select_named', ['title' => 'Banderolli']).'"]')
|
||||
->assertSee(__('machines.console.selected', ['title' => 'Banderolli']))
|
||||
->assertNoAccessibilityIssues(level: 2);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user