Add unit tests for legacy schema compatibility, property gate commands, lane state transitions, and relay synchronization. Extend relay logic with demo relay handling, dynamic image updates, phone normalization, and machine relay hard set methods.

This commit is contained in:
Jeppe Bundgaard
2026-03-26 11:11:34 +01:00
parent 76729f1b99
commit f148b39a85
22 changed files with 891 additions and 149 deletions
@@ -78,6 +78,15 @@ it('wires machine relay status get and set endpoints', function (): void {
expect($moduleSelfServeRoute)->toContain('setMachineCleanerRelayStatusHard(true)');
});
it('wires allowed services route through machine relay visibility sync', function (): void {
$moduleSelfServeRoute = file_get_contents(app_path('routes/moduleSelfServeRoute.php'));
expect($moduleSelfServeRoute)->not->toBeFalse();
expect($moduleSelfServeRoute)->toContain('/modules/self-serve/lane/services/allowed');
expect($moduleSelfServeRoute)->toContain('syncMachineRelayFromVisibleServices($allowed_services, true)');
expect($moduleSelfServeRoute)->toContain("'relay_sync' => \$relay_sync");
});
it('wires self-serve lane gate open endpoint', function (): void {
$moduleSelfServeRoute = file_get_contents(app_path('routes/moduleSelfServeRoute.php'));
@@ -89,6 +98,16 @@ it('wires self-serve lane gate open endpoint', function (): void {
expect($moduleSelfServeRoute)->toContain('$lane->open($gate)');
});
it('wires self-serve property gate command permissions', function (): void {
$moduleSelfServeRoute = file_get_contents(app_path('routes/moduleSelfServeRoute.php'));
expect($moduleSelfServeRoute)->not->toBeFalse();
expect($moduleSelfServeRoute)->toContain('case selfserve_lane_command::OPEN_PROPERTY_ACCESS_GATE');
expect($moduleSelfServeRoute)->toContain('case selfserve_lane_command::OPEN_PROPERTY_EXIT_GATE');
expect($moduleSelfServeRoute)->toContain('modules_selfserve_lane_command_execute_open_property_access_gate');
expect($moduleSelfServeRoute)->toContain('modules_selfserve_lane_command_execute_open_property_exit_gate');
});
it('wires in-progress self-serve wash details endpoint', function (): void {
$moduleSelfServeRoute = file_get_contents(app_path('routes/moduleSelfServeRoute.php'));