From d223513ffeb6aa3c88bdacecbcb3e2b3309084e7 Mon Sep 17 00:00:00 2001 From: jckand-amzn <82226555+jckand-amzn@users.noreply.github.com> Date: Wed, 19 Jan 2022 15:01:20 -0600 Subject: [PATCH] Updating query areas for instance count validation Signed-off-by: jckand-amzn <82226555+jckand-amzn@users.noreply.github.com> --- .../ShapeIntersectionFilter_FilterStageToggle.py | 13 +++++++------ .../largeworlds/dyn_veg/TestSuite_Main_Optimized.py | 1 - 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/ShapeIntersectionFilter_FilterStageToggle.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/ShapeIntersectionFilter_FilterStageToggle.py index 8f179f7f50..b5c00a53b7 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/ShapeIntersectionFilter_FilterStageToggle.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/ShapeIntersectionFilter_FilterStageToggle.py @@ -68,7 +68,7 @@ def ShapeIntersectionFilter_FilterStageToggle(): # Create a new entity as a child of the vegetation area entity with Box Shape box = hydra.Entity("box") box.create_entity(position, ["Box Shape"]) - box.get_set_test(0, "Box Shape|Box Configuration|Dimensions", math.Vector3(8.0, 8.0, 1.0)) + box.get_set_test(0, "Box Shape|Box Configuration|Dimensions", math.Vector3(5.0, 5.0, 1.0)) # Create a new entity as a child of the vegetation area entity with Cylinder Shape. cylinder = hydra.Entity("cylinder") @@ -80,10 +80,10 @@ def ShapeIntersectionFilter_FilterStageToggle(): # On the Shape Intersection Filter component, click the crosshair button, and add child entities one by one vegetation.get_set_test(3, "Configuration|Shape Entity Id", box.id) - result = helper.wait_for_condition(lambda: dynveg.validate_instance_count(position, 8.0, 100), 2.0) + result = helper.wait_for_condition(lambda: dynveg.validate_instance_count(position, 5.0, 49), 2.0) Report.result(Tests.instance_count_in_box_shape, result) vegetation.get_set_test(3, "Configuration|Shape Entity Id", cylinder.id) - result = helper.wait_for_condition(lambda: dynveg.validate_instance_count(position, 5.0, 100), 2.0) + result = helper.wait_for_condition(lambda: dynveg.validate_instance_count(position, 5.0, 121), 2.0) Report.result(Tests.instance_count_in_cylinder_shape, result) # Create a new entity as a child of the area entity with Random Noise Gradient, Gradient Transform Modifier, @@ -98,12 +98,13 @@ def ShapeIntersectionFilter_FilterStageToggle(): # Pin the Random Noise entity to the Gradient Entity Id field of the Position Modifier's Gradient X vegetation.get_set_test(4, "Configuration|Position X|Gradient|Gradient Entity Id", random_noise.id) - # Toggle between PreProcess and PostProcess + # Toggle between PreProcess and PostProcess and validate instances. Validate in a 0.3m wider radius due to position + # offsets vegetation.get_set_test(3, "Configuration|Filter Stage", 1) - result = helper.wait_for_condition(lambda: dynveg.validate_instance_count(position, 5.0, 117), 2.0) + result = helper.wait_for_condition(lambda: dynveg.validate_instance_count(position, 5.3, 121), 2.0) Report.result(Tests.preprocess_instance_count, result) vegetation.get_set_test(3, "Configuration|Filter Stage", 2) - result = helper.wait_for_condition(lambda: dynveg.validate_instance_count(position, 5.0, 122), 2.0) + result = helper.wait_for_condition(lambda: dynveg.validate_instance_count(position, 5.3, 122), 2.0) Report.result(Tests.postprocess_instance_count, result) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main_Optimized.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main_Optimized.py index af1c187817..5b1e504442 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main_Optimized.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main_Optimized.py @@ -131,7 +131,6 @@ class TestAutomation_PrefabNotEnabled(EditorTestSuite): class test_ShapeIntersectionFilter_InstancesPlantInAssignedShape(EditorParallelTest): from .EditorScripts import ShapeIntersectionFilter_InstancesPlantInAssignedShape as test_module - @pytest.mark.skip("https://github.com/o3de/o3de/issues/6973") class test_ShapeIntersectionFilter_FilterStageToggle(EditorParallelTest): from .EditorScripts import ShapeIntersectionFilter_FilterStageToggle as test_module