Add new API tests for order item note requirements, subuser route updates, and department lane status management
- Introduced tests for validating note requirements on order items. - Updated subuser route management contract tests with new route coverage. - Added endpoints to manage department lane and self-serve lane statuses, with associated tests.
This commit is contained in:
@@ -169,6 +169,32 @@ it('wires machine relay status get and set endpoints', function (): void {
|
||||
expect($moduleSelfServeRoute)->toContain('buildRelayStatusResponse');
|
||||
});
|
||||
|
||||
it('wires dashboard lane machine status and Dognvask toggle endpoints', function (): void {
|
||||
$lanesRoute = file_get_contents(app_path('routes/departmentLanesRoute.php'));
|
||||
$laneObject = file_get_contents(app_path('objects/department_lanes_o.php'));
|
||||
$moduleSelfServeRoute = file_get_contents(app_path('routes/moduleSelfServeRoute.php'));
|
||||
|
||||
expect($lanesRoute)->not->toBeFalse()
|
||||
->and($lanesRoute)->toContain('/department/lanes/status-toggles')
|
||||
->and($lanesRoute)->toContain('LIST_DEPARTMENT_LANE_STATUS_TOGGLES')
|
||||
->and($lanesRoute)->toContain('getDepartmentLanes($department_id)');
|
||||
|
||||
expect($laneObject)->not->toBeFalse()
|
||||
->and($laneObject)->toContain("'machine_status_enabled' => self::isOperationalStatusName(\$status)")
|
||||
->and($laneObject)->toContain("'dognvask_configured' => \$selfserve_configuration_warnings === []")
|
||||
->and($laneObject)->toContain("'dognvask_configuration_warnings' => \$selfserve_configuration_warnings")
|
||||
->and($laneObject)->toContain('public function getSelfServeConfigurationWarnings(): array')
|
||||
->and($laneObject)->toContain('relay_machine_program_picker_id')
|
||||
->and($laneObject)->toContain('machine_type_id');
|
||||
|
||||
expect($moduleSelfServeRoute)->not->toBeFalse()
|
||||
->and($moduleSelfServeRoute)->toContain("\$this->put('/modules/self-serve/lane/status'")
|
||||
->and($moduleSelfServeRoute)->toContain('modules_selfserve_lane_status_set')
|
||||
->and($moduleSelfServeRoute)->toContain('setLaneStatus($target_status)')
|
||||
->and($moduleSelfServeRoute)->toContain('selfserve_lane_status::MAINTENANCE')
|
||||
->and($moduleSelfServeRoute)->toContain('machine_status_enabled');
|
||||
});
|
||||
|
||||
it('applies Shelly transport overrides across self-serve relay side-effect routes', function (): void {
|
||||
$moduleSelfServeRoute = file_get_contents(app_path('routes/moduleSelfServeRoute.php'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user