diff --git a/tests/api/scenarios/scene_api.json b/tests/api/scenarios/scene_api.json index 83fbbc439..af341af70 100644 --- a/tests/api/scenarios/scene_api.json +++ b/tests/api/scenarios/scene_api.json @@ -19,6 +19,78 @@ "save": { "SCENE_UID": "uid" } + }, + { + "step_name": "Create Scene A", + "api": "scene", + "method": "createScene", + "request": { + "body": { + "name": "Circular_Dep_Scene_A", + "use_tracker": true, + "output_lla": false + } + }, + "expected_status": { + "status_code": 201 + }, + "save": { + "CIRC_SCENE_A_UID": "uid" + } + }, + { + "step_name": "Create Scene B", + "api": "scene", + "method": "createScene", + "request": { + "body": { + "name": "Circular_Dep_Scene_B", + "use_tracker": true, + "output_lla": false + } + }, + "expected_status": { + "status_code": 201 + }, + "save": { + "CIRC_SCENE_B_UID": "uid" + } + }, + { + "step_name": "Create Scene C", + "api": "scene", + "method": "createScene", + "request": { + "body": { + "name": "Circular_Dep_Scene_C", + "use_tracker": true, + "output_lla": false + } + }, + "expected_status": { + "status_code": 201 + }, + "save": { + "CIRC_SCENE_C_UID": "uid" + } + }, + { + "step_name": "Create Scene D", + "api": "scene", + "method": "createScene", + "request": { + "body": { + "name": "Circular_Dep_Scene_D", + "use_tracker": true, + "output_lla": false + } + }, + "expected_status": { + "status_code": 201 + }, + "save": { + "CIRC_SCENE_D_UID": "uid" + } } ] }, @@ -172,7 +244,7 @@ } }, { - "step_name": "Verify resource was updated", + "step_name": "Verify scene was updated", "api": "scene", "method": "getScene", "request": { @@ -234,7 +306,7 @@ } }, { - "step_name": "Verify resource was updated", + "step_name": "Verify scene was updated", "api": "scene", "method": "getScene", "request": { @@ -274,7 +346,7 @@ ] }, { - "test_name": "Vision_AI/SSCAPE/API/SCENE/10: Update scene with missing required body", + "test_name": "Vision_AI/SSCAPE/API/SCENE/10: Update scene with empty required body", "test_steps": [ { "step_name": "Update Scene", @@ -289,7 +361,7 @@ } }, { - "step_name": "Verify resource was updated", + "step_name": "Verify scene was updated", "api": "scene", "method": "getScene", "request": { @@ -325,7 +397,7 @@ } }, { - "step_name": "Verify resource was updated", + "step_name": "Verify scene was updated", "api": "scene", "method": "getScene", "request": { @@ -361,7 +433,7 @@ } }, { - "step_name": "Verify resource was updated", + "step_name": "Verify scene was updated", "api": "scene", "method": "getScene", "request": { @@ -397,7 +469,7 @@ } }, { - "step_name": "Verify resource was updated", + "step_name": "Verify scene was updated", "api": "scene", "method": "getScene", "request": { @@ -433,7 +505,7 @@ } }, { - "step_name": "Verify resource was updated", + "step_name": "Verify scene was updated", "api": "scene", "method": "getScene", "request": { @@ -540,239 +612,83 @@ "expected_status": { "status_code": 200 }, + "validate": { + "count": 8 + } + } + ] + }, + { + "test_name": "Vision_AI/SSCAPE/API/SCENE/19: Create valid local child scene link", + "test_steps": [ + { + "step_name": "Create child link A -> B", + "api": "child", + "method": "createChildScene", + "request": { + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_A_UID}", + "child": "${CIRC_SCENE_B_UID}" + } + }, + "expected_status": { + "status_code": 201 + }, + "save": { + "CHILD_LINK_UID": "uid" + } + } + ] + }, + { + "test_name": "Vision_AI/SSCAPE/API/SCENE/20: Get child scenes", + "test_steps": [ + { + "step_name": "Get child scenes and verify link exists", + "api": "child", + "method": "getChildScene", + "request": {}, + "expected_status": { + "status_code": 200 + }, + "validate": { + "count": 1 + }, "expected_body": { - "count": 3, + "count": 1, "next": null, "previous": null, "results": [ { - "uid": "3bc091c7-e449-46a0-9540-29c499bca18c", - "name": "Retail", - "map_type": "map_upload", - "use_tracker": true, - "output_lla": false, - "map": "https://localhost/media/HazardZoneSceneLarge.png", - "cameras": [ - { - "uid": "camera1", - "name": "camera1", - "intrinsics": { - "fx": 571.2592026968458, - "fy": 571.2592026968458, - "cx": 320.0, - "cy": 240.0 - }, - "transform_type": "3d-2d point correspondence", - "transforms": [ - 278.0, 61.0, 621.0, 132.0, 559.0, 460.0, 66.0, 289.0, 0.1, - 5.38, 3.04, 5.35, 3.05, 2.42, 0.1, 2.45 - ], - "distortion": { - "k1": 0.0, - "k2": 0.0, - "p1": 0.0, - "p2": 0.0, - "k3": 0.0 - }, - "translation": [ - 2.6651330996559883, 1.0075648853123316, 2.603863333755973 - ], - "rotation": [ - -137.85924651441334, -19.441505783168942, - -15.384890268257454 - ], - "scale": [1.0000000000000007, 1.0, 1.0], - "resolution": [640, 480], - "scene": "3bc091c7-e449-46a0-9540-29c499bca18c" - }, - { - "uid": "camera2", - "name": "camera2", - "intrinsics": { - "fx": 571.2592026968458, - "fy": 571.2592026968458, - "cx": 320.0, - "cy": 240.0 - }, - "transform_type": "3d-2d point correspondence", - "transforms": [ - 31.0, 228.0, 423.0, 266.0, 537.0, 385.0, 79.0, 343.0, 1.06, - 5.34, 4.0, 5.38, 4.98, 4.39, 2.04, 4.38 - ], - "distortion": { - "k1": 0.0, - "k2": 0.0, - "p1": 0.0, - "p2": 0.0, - "k3": 0.0 - }, - "translation": [ - 4.034863921795162, 2.277766310708989, 2.955114373391866 - ], - "rotation": [ - -132.15360745910087, -8.172752500708558, -5.298590495090165 - ], - "scale": [1.0, 1.0, 1.0], - "resolution": [640, 480], - "scene": "3bc091c7-e449-46a0-9540-29c499bca18c" - } - ], - "mesh_translation": [0, 0, 0], - "mesh_rotation": [0, 0, 0], - "mesh_scale": [1.0, 1.0, 1.0], - "scale": 100.0, - "regulated_rate": 30.0, - "external_update_rate": 30.0, - "camera_calibration": "AprilTag", - "apriltag_size": 0.147, - "map_processed": "2023-06-08T13:53:58.767000Z", - "number_of_localizations": 50, - "global_feature": "netvlad", - "local_feature": { - "sift": {} - }, - "matcher": { - "NN-ratio": {} - }, - "minimum_number_of_matches": 20, - "inlier_threshold": 0.5, - "geospatial_provider": "google", - "map_zoom": 15.0, - "map_bearing": 0.0 - }, - { - "uid": "302cf49a-97ec-402d-a324-c5077b280b7b", - "name": "Queuing", - "map_type": "map_upload", - "use_tracker": true, - "output_lla": false, - "map": "https://localhost/media/scene.png", - "cameras": [ - { - "uid": "atag-qcam1", - "name": "atag-qcam1", - "intrinsics": { - "fx": 905.0, - "fy": 905.0, - "cx": 640.0, - "cy": 360.0 - }, - "transform_type": "3d-2d point correspondence", - "transforms": [ - 119.0, 622.0, 257.0, 561.0, 978.0, 580.0, 628.0, 312.0, - 1.685, 2.533, 2.188, 2.578, 4.449, 1.412, 3.94, 3.228 - ], - "distortion": { - "k1": 0.0, - "k2": 0.0, - "p1": 0.0, - "p2": 0.0, - "k3": 0.0 - }, - "translation": [ - 2.985857104493509, 0.20540788984425282, 2.7150546825598902 - ], - "rotation": [ - -135.08718965001765, 12.682032394455133, 19.24508172546946 - ], - "scale": [0.9999999999999999, 1.0, 1.0], - "resolution": [1280, 720], - "scene": "302cf49a-97ec-402d-a324-c5077b280b7b" - }, - { - "uid": "atag-qcam2", - "name": "atag-qcam2", - "intrinsics": { - "fx": 905.0, - "fy": 905.0, - "cx": 640.0, - "cy": 360.0 - }, - "transform_type": "3d-2d point correspondence", - "transforms": [ - 1012.0, 307.0, 956.0, 613.0, 1121.0, 505.0, 585.0, 316.0, - 3.596, 2.96, 1.583, 2.794, 2.36, 2.266, 2.577, 4.903 - ], - "distortion": { - "k1": 0.0, - "k2": 0.0, - "p1": 0.0, - "p2": 0.0, - "k3": 0.0 - }, - "translation": [ - -0.6544951215349523, 2.8628274940885503, 2.894955006060443 - ], - "rotation": [ - -150.5988934259539, 42.35138027480063, 52.29263795544898 - ], - "scale": [1.0, 1.0000000000000002, 1.0], - "resolution": [1280, 720], - "scene": "302cf49a-97ec-402d-a324-c5077b280b7b" - } - ], - "sensors": [ - { - "uid": "sensor_full", - "scene": "302cf49a-97ec-402d-a324-c5077b280b7b", - "sensor_id": "sensor_full", - "name": "sensor_full", - "area": "circle", - "radius": 2.5, - "center": [3.81, 4.59], - "translation": [3.81, 4.59, 0.0], - "singleton_type": "attribute" - } - ], - "mesh_translation": [0, 0, 0], - "mesh_rotation": [0, 0, 0], - "mesh_scale": [1.0, 1.0, 1.0], - "scale": 157.0, - "regulated_rate": 30.0, - "external_update_rate": 30.0, - "camera_calibration": "AprilTag", - "apriltag_size": 0.318471338, - "map_processed": "2023-06-08T13:54:27.922000Z", - "number_of_localizations": 50, - "global_feature": "netvlad", - "local_feature": { - "sift": {} - }, - "matcher": { - "NN-ratio": {} - }, - "minimum_number_of_matches": 20, - "inlier_threshold": 0.5, - "geospatial_provider": "google", - "map_zoom": 15.0, - "map_bearing": 0.0 - }, - { - "uid": "${SCENE_UID}", - "name": "Scene1_Updated_Full", - "map_type": "map_upload", - "use_tracker": true, - "output_lla": true, - "mesh_translation": [12.2, 248.0, 12.0], - "mesh_rotation": [12.2, 248.0, 12.0], - "mesh_scale": [2.0, 2.0, 2.0], - "regulated_rate": 30.0, - "external_update_rate": 30.0, - "camera_calibration": "Manual", - "apriltag_size": 0.162, - "number_of_localizations": 50, - "global_feature": "netvlad", - "local_feature": { - "sift": {} + "uid": "${CHILD_LINK_UID}", + "child_type": "local", + "transform": { + "translation": [0.0, 0.0, 0.0], + "rotation": [-0.0, 0.0, 0.0], + "scale": [1.0, 1.0, 1.0] }, - "matcher": { - "NN-ratio": {} - }, - "minimum_number_of_matches": 20, - "inlier_threshold": 0.5, - "geospatial_provider": "google", - "map_zoom": 15.0, - "map_bearing": 0.0 + "name": "Circular_Dep_Scene_B", + "child": "${CIRC_SCENE_B_UID}", + "parent": "${CIRC_SCENE_A_UID}", + "retrack": true, + "transform_type": "matrix", + "transform1": 1.0, + "transform2": 0.0, + "transform3": 0.0, + "transform4": 0.0, + "transform5": 0.0, + "transform6": 1.0, + "transform7": 0.0, + "transform8": 0.0, + "transform9": 0.0, + "transform10": 0.0, + "transform11": 1.0, + "transform12": 0.0, + "transform13": 0.0, + "transform14": 0.0, + "transform15": 0.0, + "transform16": 1.0 } ] } @@ -780,54 +696,733 @@ ] }, { - "test_name": "Vision_AI/SSCAPE/API/SCENE/19: Get child scenes", + "test_name": "Vision_AI/SSCAPE/API/SCENE/21: Delete valid local child scene link", "test_steps": [ { - "step_name": "Get Scene", + "step_name": "Delete child link A -> B", "api": "child", - "method": "getChildScene", - "request": {}, + "method": "deleteChildSceneLink", + "request": { + "uid": "${CIRC_SCENE_B_UID}" + }, "expected_status": { "status_code": 200 + } + } + ] + }, + { + "test_name": "Vision_AI/SSCAPE/API/SCENE/22: Prevent self reference child scene link", + "test_steps": [ + { + "step_name": "Attempt to link scene A as its own child", + "api": "child", + "method": "createChildScene", + "request": { + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_A_UID}", + "child": "${CIRC_SCENE_A_UID}" + } }, - "expected_body": { - "count": 0, - "next": null, - "previous": null, - "results": [] + "expected_status": { + "status_code": 400 } } ] }, { - "test_name": "Vision_AI/SSCAPE/API/SCENE/20: Delete scene by uid", + "test_name": "Vision_AI/SSCAPE/API/SCENE/23: Prevent direct two nodes circular dependency", "test_steps": [ { - "step_name": "Delete Scene", - "api": "scene", - "method": "deleteScene", + "step_name": "Create child link A -> B", + "api": "child", + "method": "createChildScene", "request": { - "uid": "${SCENE_UID}" + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_A_UID}", + "child": "${CIRC_SCENE_B_UID}" + } + }, + "expected_status": { + "status_code": 201 + } + }, + { + "step_name": "Attempt to create reverse link B -> A (direct cycle)", + "api": "child", + "method": "createChildScene", + "request": { + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_B_UID}", + "child": "${CIRC_SCENE_A_UID}" + } + }, + "expected_status": { + "status_code": 400 + } + }, + { + "step_name": "Delete child link A -> B", + "api": "child", + "method": "deleteChildSceneLink", + "request": { + "uid": "${CIRC_SCENE_B_UID}" }, "expected_status": { "status_code": 200 } + } + ] + }, + { + "test_name": "Vision_AI/SSCAPE/API/SCENE/24: Prevent three nodes transitive circular dependency via root", + "test_steps": [ + { + "step_name": "Create child link A -> B", + "api": "child", + "method": "createChildScene", + "request": { + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_A_UID}", + "child": "${CIRC_SCENE_B_UID}" + } + }, + "expected_status": { + "status_code": 201 + } }, { - "step_name": "Verify resource is deleted", - "api": "scene", - "method": "getScene", + "step_name": "Create child link B -> C", + "api": "child", + "method": "createChildScene", "request": { - "uid": "${SCENE_UID}" + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_B_UID}", + "child": "${CIRC_SCENE_C_UID}" + } }, "expected_status": { - "status_code": 404 + "status_code": 201 + } + }, + { + "step_name": "Attempt to create link C -> A (transitive cycle back to root)", + "api": "child", + "method": "createChildScene", + "request": { + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_C_UID}", + "child": "${CIRC_SCENE_A_UID}" + } + }, + "expected_status": { + "status_code": 400 + } + }, + { + "step_name": "Delete child link B -> C", + "api": "child", + "method": "deleteChildSceneLink", + "request": { + "uid": "${CIRC_SCENE_C_UID}" + }, + "expected_status": { + "status_code": 200 + } + }, + { + "step_name": "Delete child link A -> B", + "api": "child", + "method": "deleteChildSceneLink", + "request": { + "uid": "${CIRC_SCENE_B_UID}" + }, + "expected_status": { + "status_code": 200 + } + } + ] + }, + { + "test_name": "Vision_AI/SSCAPE/API/SCENE/25: Prevent three nodes transitive circular dependency via mid-node", + "test_steps": [ + { + "step_name": "Create child link A -> B", + "api": "child", + "method": "createChildScene", + "request": { + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_A_UID}", + "child": "${CIRC_SCENE_B_UID}" + } + }, + "expected_status": { + "status_code": 201 + } + }, + { + "step_name": "Create child link B -> C", + "api": "child", + "method": "createChildScene", + "request": { + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_B_UID}", + "child": "${CIRC_SCENE_C_UID}" + } + }, + "expected_status": { + "status_code": 201 + } + }, + { + "step_name": "Attempt to create link C -> B (transitive cycle back to mid-node)", + "api": "child", + "method": "createChildScene", + "request": { + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_C_UID}", + "child": "${CIRC_SCENE_B_UID}" + } + }, + "expected_status": { + "status_code": 400 + } + }, + { + "step_name": "Delete child link B -> C", + "api": "child", + "method": "deleteChildSceneLink", + "request": { + "uid": "${CIRC_SCENE_C_UID}" + }, + "expected_status": { + "status_code": 200 + } + }, + { + "step_name": "Delete child link A -> B", + "api": "child", + "method": "deleteChildSceneLink", + "request": { + "uid": "${CIRC_SCENE_B_UID}" + }, + "expected_status": { + "status_code": 200 + } + } + ] + }, + { + "test_name": "Vision_AI/SSCAPE/API/SCENE/26: Prevent four nodes deep transitive circular dependency via root", + "test_steps": [ + { + "step_name": "Create child link A -> B", + "api": "child", + "method": "createChildScene", + "request": { + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_A_UID}", + "child": "${CIRC_SCENE_B_UID}" + } + }, + "expected_status": { + "status_code": 201 + } + }, + { + "step_name": "Create child link B -> C", + "api": "child", + "method": "createChildScene", + "request": { + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_B_UID}", + "child": "${CIRC_SCENE_C_UID}" + } + }, + "expected_status": { + "status_code": 201 + } + }, + { + "step_name": "Create child link C -> D", + "api": "child", + "method": "createChildScene", + "request": { + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_C_UID}", + "child": "${CIRC_SCENE_D_UID}" + } + }, + "expected_status": { + "status_code": 201 + } + }, + { + "step_name": "Attempt to create link D -> A (deep transitive cycle back to root)", + "api": "child", + "method": "createChildScene", + "request": { + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_D_UID}", + "child": "${CIRC_SCENE_A_UID}" + } + }, + "expected_status": { + "status_code": 400 + } + }, + { + "step_name": "Delete child link C -> D", + "api": "child", + "method": "deleteChildSceneLink", + "request": { + "uid": "${CIRC_SCENE_D_UID}" + }, + "expected_status": { + "status_code": 200 + } + }, + { + "step_name": "Delete child link B -> C", + "api": "child", + "method": "deleteChildSceneLink", + "request": { + "uid": "${CIRC_SCENE_C_UID}" + }, + "expected_status": { + "status_code": 200 + } + }, + { + "step_name": "Delete child link A -> B", + "api": "child", + "method": "deleteChildSceneLink", + "request": { + "uid": "${CIRC_SCENE_B_UID}" + }, + "expected_status": { + "status_code": 200 + } + } + ] + }, + { + "test_name": "Vision_AI/SSCAPE/API/SCENE/27: Prevent four nodes deep transitive circular dependency via mid-node", + "test_steps": [ + { + "step_name": "Create child link A -> B", + "api": "child", + "method": "createChildScene", + "request": { + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_A_UID}", + "child": "${CIRC_SCENE_B_UID}" + } + }, + "expected_status": { + "status_code": 201 + } + }, + { + "step_name": "Create child link B -> C", + "api": "child", + "method": "createChildScene", + "request": { + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_B_UID}", + "child": "${CIRC_SCENE_C_UID}" + } + }, + "expected_status": { + "status_code": 201 + } + }, + { + "step_name": "Create child link C -> D", + "api": "child", + "method": "createChildScene", + "request": { + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_C_UID}", + "child": "${CIRC_SCENE_D_UID}" + } + }, + "expected_status": { + "status_code": 201 + } + }, + { + "step_name": "Attempt to create link D -> B (deep transitive cycle back to mid-node)", + "api": "child", + "method": "createChildScene", + "request": { + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_D_UID}", + "child": "${CIRC_SCENE_B_UID}" + } + }, + "expected_status": { + "status_code": 400 + } + }, + { + "step_name": "Delete child link C -> D", + "api": "child", + "method": "deleteChildSceneLink", + "request": { + "uid": "${CIRC_SCENE_D_UID}" + }, + "expected_status": { + "status_code": 200 + } + }, + { + "step_name": "Delete child link B -> C", + "api": "child", + "method": "deleteChildSceneLink", + "request": { + "uid": "${CIRC_SCENE_C_UID}" + }, + "expected_status": { + "status_code": 200 + } + }, + { + "step_name": "Delete child link A -> B", + "api": "child", + "method": "deleteChildSceneLink", + "request": { + "uid": "${CIRC_SCENE_B_UID}" + }, + "expected_status": { + "status_code": 200 + } + } + ] + }, + { + "test_name": "Vision_AI/SSCAPE/API/SCENE/28: Prevent duplicate child scene link", + "test_steps": [ + { + "step_name": "Create child link A -> B", + "api": "child", + "method": "createChildScene", + "request": { + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_A_UID}", + "child": "${CIRC_SCENE_B_UID}" + } + }, + "expected_status": { + "status_code": 201 + } + }, + { + "step_name": "Attempt to create same link A -> B again", + "api": "child", + "method": "createChildScene", + "request": { + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_A_UID}", + "child": "${CIRC_SCENE_B_UID}" + } + }, + "expected_status": { + "status_code": 400 + } + }, + { + "step_name": "Delete child link A -> B", + "api": "child", + "method": "deleteChildSceneLink", + "request": { + "uid": "${CIRC_SCENE_B_UID}" + }, + "expected_status": { + "status_code": 200 + } + } + ] + }, + { + "test_name": "Vision_AI/SSCAPE/API/SCENE/29: Create valid linear chain of child scenes", + "test_steps": [ + { + "step_name": "Create child link A -> B", + "api": "child", + "method": "createChildScene", + "request": { + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_A_UID}", + "child": "${CIRC_SCENE_B_UID}" + } + }, + "expected_status": { + "status_code": 201 + } + }, + { + "step_name": "Create child link B -> C", + "api": "child", + "method": "createChildScene", + "request": { + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_B_UID}", + "child": "${CIRC_SCENE_C_UID}" + } + }, + "expected_status": { + "status_code": 201 + } + }, + { + "step_name": "Delete child link B -> C", + "api": "child", + "method": "deleteChildSceneLink", + "request": { + "uid": "${CIRC_SCENE_C_UID}" + }, + "expected_status": { + "status_code": 200 + } + }, + { + "step_name": "Delete child link A -> B", + "api": "child", + "method": "deleteChildSceneLink", + "request": { + "uid": "${CIRC_SCENE_B_UID}" + }, + "expected_status": { + "status_code": 200 + } + } + ] + }, + { + "test_name": "Vision_AI/SSCAPE/API/SCENE/30: Create valid tree with multiple children from same parent", + "test_steps": [ + { + "step_name": "Create child link A -> B", + "api": "child", + "method": "createChildScene", + "request": { + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_A_UID}", + "child": "${CIRC_SCENE_B_UID}" + } + }, + "expected_status": { + "status_code": 201 + } + }, + { + "step_name": "Create child link A -> C (same parent, different child)", + "api": "child", + "method": "createChildScene", + "request": { + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_A_UID}", + "child": "${CIRC_SCENE_C_UID}" + } + }, + "expected_status": { + "status_code": 201 + } + }, + { + "step_name": "Delete child link A -> C", + "api": "child", + "method": "deleteChildSceneLink", + "request": { + "uid": "${CIRC_SCENE_C_UID}" + }, + "expected_status": { + "status_code": 200 + } + }, + { + "step_name": "Delete child link A -> B", + "api": "child", + "method": "deleteChildSceneLink", + "request": { + "uid": "${CIRC_SCENE_B_UID}" + }, + "expected_status": { + "status_code": 200 + } + } + ] + }, + { + "test_name": "Vision_AI/SSCAPE/API/SCENE/31: Prevent circular dependency via update of existing child link", + "test_steps": [ + { + "step_name": "Create child link A -> B", + "api": "child", + "method": "createChildScene", + "request": { + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_A_UID}", + "child": "${CIRC_SCENE_B_UID}" + } + }, + "expected_status": { + "status_code": 201 + } + }, + { + "step_name": "Create child link B -> C", + "api": "child", + "method": "createChildScene", + "request": { + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_B_UID}", + "child": "${CIRC_SCENE_C_UID}" + } + }, + "expected_status": { + "status_code": 201 + } + }, + { + "step_name": "Attempt to update link A -> B to C -> B (creates cycle with B -> C)", + "api": "child", + "method": "updateChildScene", + "request": { + "uid": "${CIRC_SCENE_B_UID}", + "body": { + "child_type": "local", + "parent": "${CIRC_SCENE_C_UID}", + "child": "${CIRC_SCENE_B_UID}" + } + }, + "expected_status": { + "status_code": 400 + } + }, + { + "step_name": "Delete child link B -> C", + "api": "child", + "method": "deleteChildSceneLink", + "request": { + "uid": "${CIRC_SCENE_C_UID}" + }, + "expected_status": { + "status_code": 200 + } + }, + { + "step_name": "Delete child link A -> B", + "api": "child", + "method": "deleteChildSceneLink", + "request": { + "uid": "${CIRC_SCENE_B_UID}" + }, + "expected_status": { + "status_code": 200 + } + } + ] + }, + { + "test_name": "Vision_AI/SSCAPE/API/SCENE/32: Delete scenes by uid", + "test_steps": [ + { + "step_name": "Delete Scene", + "api": "scene", + "method": "deleteScene", + "request": { + "uid": "${SCENE_UID}" + }, + "expected_status": { + "status_code": 200 + } + }, + { + "step_name": "Verify scene is deleted", + "api": "scene", + "method": "getScene", + "request": { + "uid": "${SCENE_UID}" + }, + "expected_status": { + "status_code": 404 + } + }, + { + "step_name": "Delete Scene A", + "api": "scene", + "method": "deleteScene", + "request": { + "uid": "${CIRC_SCENE_A_UID}" + }, + "expected_status": { + "status_code": 200 + } + }, + { + "step_name": "Delete Scene B", + "api": "scene", + "method": "deleteScene", + "request": { + "uid": "${CIRC_SCENE_B_UID}" + }, + "expected_status": { + "status_code": 200 + } + }, + { + "step_name": "Delete Scene C", + "api": "scene", + "method": "deleteScene", + "request": { + "uid": "${CIRC_SCENE_C_UID}" + }, + "expected_status": { + "status_code": 200 + } + }, + { + "step_name": "Delete Scene D", + "api": "scene", + "method": "deleteScene", + "request": { + "uid": "${CIRC_SCENE_D_UID}" + }, + "expected_status": { + "status_code": 200 } } ] }, { - "test_name": "Vision_AI/SSCAPE/API/SCENE/21: Delete non existent scene", + "test_name": "Vision_AI/SSCAPE/API/SCENE/33: Delete non existent scene", "test_steps": [ { "step_name": "Delete Scene",