Making minor fixes, and cycling through light types

Signed-off-by: Neil Widmaier <nwidmaie@amazon.com>
monroegm-disable-blank-issue-2
Neil Widmaier 4 years ago
parent 342b1ee47c
commit 4aa5ba4eca

@ -63,13 +63,13 @@ def AtomEditorComponents_Grid_AddedToEntity():
3) UNDO the entity creation and component addition. 3) UNDO the entity creation and component addition.
4) REDO the entity creation and component addition. 4) REDO the entity creation and component addition.
5) Grid Size changed. 5) Grid Size changed.
5) Enter/Exit game mode. 6) Enter/Exit game mode.
6) Test IsHidden. 7) Test IsHidden.
7) Test IsVisible. 8) Test IsVisible.
8) Delete Grid entity. 9) Delete Grid entity.
9) UNDO deletion. 10) UNDO deletion.
10) REDO deletion. 11) REDO deletion.
11) Look for errors. 12) Look for errors.
:return: None :return: None
""" """
@ -123,7 +123,7 @@ def AtomEditorComponents_Grid_AddedToEntity():
general.idle_wait_frames(1) general.idle_wait_frames(1)
Report.result(Tests.creation_redo, grid_entity.exists()) Report.result(Tests.creation_redo, grid_entity.exists())
# 5. Grid Size changed (default is 32, changed to 64) # 5. Grid Size changed
grid_component.set_component_property_value( grid_component.set_component_property_value(
AtomComponentProperties.grid('Grid Size'), value=64) AtomComponentProperties.grid('Grid Size'), value=64)
current_grid_size = grid_component.get_component_property_value( current_grid_size = grid_component.get_component_property_value(

@ -27,9 +27,6 @@ class Tests:
light_component = ( light_component = (
"Entity has a Light component", "Entity has a Light component",
"Entity failed to find Light component") "Entity failed to find Light component")
light_type_value = (
"Light type value set",
"Light type value could not be set")
enter_game_mode = ( enter_game_mode = (
"Entered game mode", "Entered game mode",
"Failed to enter game mode") "Failed to enter game mode")
@ -71,7 +68,7 @@ def AtomEditorComponents_Light_AddedToEntity():
2) Add Light component to the Light entity. 2) Add Light component to the Light entity.
3) UNDO the entity creation and component addition. 3) UNDO the entity creation and component addition.
4) REDO the entity creation and component addition. 4) REDO the entity creation and component addition.
5) Set the light type to sphere. 5) Cycle through all light types.
6) Enter/Exit game mode. 6) Enter/Exit game mode.
7) Test IsHidden. 7) Test IsHidden.
8) Test IsVisible. 8) Test IsVisible.
@ -128,12 +125,16 @@ def AtomEditorComponents_Light_AddedToEntity():
general.idle_wait_frames(1) general.idle_wait_frames(1)
Report.result(Tests.creation_redo, light_entity.exists()) Report.result(Tests.creation_redo, light_entity.exists())
# 5. Set the light type to sphere # 5. Cycle through all light types.
light_component.set_component_property_value( for ltype, value in LIGHT_TYPES.items():
AtomComponentProperties.light('Light type'), LIGHT_TYPES['sphere']) light_component.set_component_property_value(
current_light_type = light_component.get_component_property_value( AtomComponentProperties.light('Light type'), LIGHT_TYPES[ltype])
AtomComponentProperties.light('Light type')) current_light_type = light_component.get_component_property_value(
Report.result(Tests.light_type_value, current_light_type == LIGHT_TYPES['sphere']) AtomComponentProperties.light('Light type'))
test_shape = (
f"Light component has {ltype} type set",
f"Light component failed to set {ltype} type")
Report.result(test_shape, current_light_type == LIGHT_TYPES[ltype])
# 6. Enter/Exit game mode. # 6. Enter/Exit game mode.
TestHelper.enter_game_mode(Tests.enter_game_mode) TestHelper.enter_game_mode(Tests.enter_game_mode)

@ -28,7 +28,7 @@ class Tests:
"Entity has a Physical Sky component", "Entity has a Physical Sky component",
"Entity failed to find Physical Sky component") "Entity failed to find Physical Sky component")
sky_intensity = ( sky_intensity = (
"Sky Intensity value set to 2", "Sky Intensity value updated successfully",
"Sky Intensity value could not be set") "Sky Intensity value could not be set")
enter_game_mode = ( enter_game_mode = (
"Entered game mode", "Entered game mode",
@ -71,7 +71,7 @@ def AtomEditorComponents_PhysicalSky_AddedToEntity():
2) Add Physical Sky component to Physical Sky entity. 2) Add Physical Sky component to Physical Sky entity.
3) UNDO the entity creation and component addition. 3) UNDO the entity creation and component addition.
4) REDO the entity creation and component addition. 4) REDO the entity creation and component addition.
5) Set Sky Intensity to a value of 2. 5) Update Sky Intensity value.
6) Enter/Exit game mode. 6) Enter/Exit game mode.
7) Test IsHidden. 7) Test IsHidden.
8) Test IsVisible. 8) Test IsVisible.
@ -130,7 +130,7 @@ def AtomEditorComponents_PhysicalSky_AddedToEntity():
general.idle_wait_frames(1) general.idle_wait_frames(1)
Report.result(Tests.creation_redo, physical_sky_entity.exists()) Report.result(Tests.creation_redo, physical_sky_entity.exists())
# 5. Set Sky Intensity to a value of 2 (default value is 4) # 5. Set Sky Intensity value
physical_sky_component.set_component_property_value( physical_sky_component.set_component_property_value(
AtomComponentProperties.physical_sky('Sky Intensity'), value=2) AtomComponentProperties.physical_sky('Sky Intensity'), value=2)
current_sky_intensity = physical_sky_component.get_component_property_value( current_sky_intensity = physical_sky_component.get_component_property_value(

Loading…
Cancel
Save