Merge pull request #5752 from aws-lumberyard-dev/puvvadar/gitflow_211118_o3de
Merge stabilization/2110
This commit is contained in:
+36
@@ -12,6 +12,7 @@ import pytest
|
||||
import ly_test_tools.log.log_monitor
|
||||
|
||||
from AWS.common import constants
|
||||
from AWS.common.resource_mappings import AWS_RESOURCE_MAPPINGS_ACCOUNT_ID_KEY
|
||||
|
||||
# fixture imports
|
||||
from assetpipeline.ap_fixtures.asset_processor_fixture import asset_processor
|
||||
@@ -70,6 +71,41 @@ class TestAWSClientAuthWindows(object):
|
||||
halt_on_unexpected=True,
|
||||
)
|
||||
assert result, 'Anonymous credentials fetched successfully.'
|
||||
|
||||
@pytest.mark.parametrize('level', ['AWS/ClientAuth'])
|
||||
def test_anonymous_credentials_no_global_accountid(self,
|
||||
level: str,
|
||||
launcher: pytest.fixture,
|
||||
resource_mappings: pytest.fixture,
|
||||
workspace: pytest.fixture,
|
||||
asset_processor: pytest.fixture
|
||||
):
|
||||
"""
|
||||
Test to verify AWS Cognito Identity pool anonymous authorization.
|
||||
|
||||
Setup: Updates resource mapping file using existing CloudFormation stacks.
|
||||
Tests: Getting credentials when no credentials are configured
|
||||
Verification: Log monitor looks for success credentials log.
|
||||
"""
|
||||
# Remove top-level account ID from resource mappings
|
||||
resource_mappings.clear_select_keys([AWS_RESOURCE_MAPPINGS_ACCOUNT_ID_KEY])
|
||||
|
||||
asset_processor.start()
|
||||
asset_processor.wait_for_idle()
|
||||
|
||||
file_to_monitor = os.path.join(launcher.workspace.paths.project_log(), constants.GAME_LOG_NAME)
|
||||
log_monitor = ly_test_tools.log.log_monitor.LogMonitor(launcher=launcher, log_file_path=file_to_monitor)
|
||||
|
||||
launcher.args = ['+LoadLevel', level]
|
||||
launcher.args.extend(['-rhi=null'])
|
||||
|
||||
with launcher.start(launch_ap=False):
|
||||
result = log_monitor.monitor_log_for_lines(
|
||||
expected_lines=['(Script) - Success anonymous credentials'],
|
||||
unexpected_lines=['(Script) - Fail anonymous credentials'],
|
||||
halt_on_unexpected=True,
|
||||
)
|
||||
assert result, 'Anonymous credentials fetched successfully.'
|
||||
|
||||
def test_password_signin_credentials(self,
|
||||
launcher: pytest.fixture,
|
||||
|
||||
+4
@@ -57,6 +57,10 @@ def add_level_component(component_name):
|
||||
level_component_list, entity.EntityType().Level)
|
||||
level_component_outcome = editor.EditorLevelComponentAPIBus(bus.Broadcast, 'AddComponentsOfType',
|
||||
[level_component_type_ids_list[0]])
|
||||
if not level_component_outcome.IsSuccess():
|
||||
print('Failed to add {} level component'.format(component_name))
|
||||
return None
|
||||
|
||||
level_component = level_component_outcome.GetValue()[0]
|
||||
return level_component
|
||||
|
||||
|
||||
@@ -8,42 +8,54 @@ import azlmbr.bus
|
||||
import azlmbr.asset
|
||||
import azlmbr.editor
|
||||
import azlmbr.math
|
||||
import azlmbr.legacy.general
|
||||
|
||||
def raise_and_stop(msg):
|
||||
print (msg)
|
||||
print('Starting mock asset tests')
|
||||
handler = azlmbr.editor.EditorEventBusHandler()
|
||||
|
||||
def on_notify_editor_initialized(args):
|
||||
# These tests are meant to check that the test_asset.mock source asset turned into
|
||||
# a test_asset.mock_asset product asset via the Python asset builder system
|
||||
mockAssetType = azlmbr.math.Uuid_CreateString('{9274AD17-3212-4651-9F3B-7DCCB080E467}', 0)
|
||||
mockAssetPath = 'gem/pythontests/pythonassetbuilder/test_asset.mock_asset'
|
||||
assetId = azlmbr.asset.AssetCatalogRequestBus(azlmbr.bus.Broadcast, 'GetAssetIdByPath', mockAssetPath, mockAssetType, False)
|
||||
if (assetId.is_valid() is False):
|
||||
print(f'Mock AssetId is not valid! Got {assetId.to_string()} instead')
|
||||
else:
|
||||
print(f'Mock AssetId is valid!')
|
||||
|
||||
assetIdString = assetId.to_string()
|
||||
if (assetIdString.endswith(':528cca58') is False):
|
||||
print(f'Mock AssetId {assetIdString} has unexpected sub-id for {mockAssetPath}!')
|
||||
else:
|
||||
print(f'Mock AssetId has expected sub-id for {mockAssetPath}!')
|
||||
|
||||
print ('Mock asset exists')
|
||||
|
||||
# These tests detect if the geom_group.fbx file turns into a number of azmodel product assets
|
||||
def test_azmodel_product(generatedModelAssetPath):
|
||||
azModelAssetType = azlmbr.math.Uuid_CreateString('{2C7477B6-69C5-45BE-8163-BCD6A275B6D8}', 0)
|
||||
assetId = azlmbr.asset.AssetCatalogRequestBus(azlmbr.bus.Broadcast, 'GetAssetIdByPath', generatedModelAssetPath, azModelAssetType, False)
|
||||
assetIdString = assetId.to_string()
|
||||
if (assetId.is_valid()):
|
||||
print(f'AssetId found for asset ({generatedModelAssetPath}) found')
|
||||
else:
|
||||
print(f'Asset at path {generatedModelAssetPath} has unexpected asset ID ({assetIdString})!')
|
||||
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_positive_1.azmodel')
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_negative_1.azmodel')
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_positive_1.azmodel')
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_negative_1.azmodel')
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_positive_1.azmodel')
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_negative_1.azmodel')
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center_1.azmodel')
|
||||
|
||||
# clear up notification handler
|
||||
global handler
|
||||
handler.disconnect()
|
||||
handler = None
|
||||
|
||||
print('Finished mock asset tests')
|
||||
azlmbr.editor.EditorToolsApplicationRequestBus(azlmbr.bus.Broadcast, 'ExitNoPrompt')
|
||||
|
||||
# These tests are meant to check that the test_asset.mock source asset turned into
|
||||
# a test_asset.mock_asset product asset via the Python asset builder system
|
||||
mockAssetType = azlmbr.math.Uuid_CreateString('{9274AD17-3212-4651-9F3B-7DCCB080E467}', 0)
|
||||
mockAssetPath = 'gem/pythontests/pythonassetbuilder/test_asset.mock_asset'
|
||||
assetId = azlmbr.asset.AssetCatalogRequestBus(azlmbr.bus.Broadcast, 'GetAssetIdByPath', mockAssetPath, mockAssetType, False)
|
||||
if (assetId.is_valid() is False):
|
||||
raise_and_stop(f'Mock AssetId is not valid! Got {assetId.to_string()} instead')
|
||||
|
||||
assetIdString = assetId.to_string()
|
||||
if (assetIdString.endswith(':528cca58') is False):
|
||||
raise_and_stop(f'Mock AssetId {assetIdString} has unexpected sub-id for {mockAssetPath}!')
|
||||
|
||||
print ('Mock asset exists')
|
||||
|
||||
# These tests detect if the geom_group.fbx file turns into a number of azmodel product assets
|
||||
def test_azmodel_product(generatedModelAssetPath):
|
||||
azModelAssetType = azlmbr.math.Uuid_CreateString('{2C7477B6-69C5-45BE-8163-BCD6A275B6D8}', 0)
|
||||
assetId = azlmbr.asset.AssetCatalogRequestBus(azlmbr.bus.Broadcast, 'GetAssetIdByPath', generatedModelAssetPath, azModelAssetType, False)
|
||||
assetIdString = assetId.to_string()
|
||||
if (assetId.is_valid()):
|
||||
print(f'AssetId found for asset ({generatedModelAssetPath}) found')
|
||||
else:
|
||||
raise_and_stop(f'Asset at path {generatedModelAssetPath} has unexpected asset ID ({assetIdString})!')
|
||||
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_positive_1.azmodel')
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_negative_1.azmodel')
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_positive_1.azmodel')
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_negative_1.azmodel')
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_positive_1.azmodel')
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_negative_1.azmodel')
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center_1.azmodel')
|
||||
|
||||
azlmbr.editor.EditorToolsApplicationRequestBus(azlmbr.bus.Broadcast, 'ExitNoPrompt')
|
||||
handler.connect()
|
||||
handler.add_callback('NotifyEditorInitialized', on_notify_editor_initialized)
|
||||
|
||||
+1
-2
@@ -12,13 +12,12 @@ class Tests():
|
||||
add_terrain_collider = ("Terrain Physics Heightfield Collider component added", "Failed to add a Terrain Physics Heightfield Collider component")
|
||||
box_dimensions_changed = ("Aabb dimensions changed successfully", "Failed change Aabb dimensions")
|
||||
configuration_changed = ("Terrain size changed successfully", "Failed terrain size change")
|
||||
no_errors_and_warnings_found = ("No errors and warnings found", "Found errors and warnings")
|
||||
#fmt: on
|
||||
|
||||
def TerrainPhysicsCollider_ChangesSizeWithAxisAlignedBoxShapeChanges():
|
||||
"""
|
||||
Summary:
|
||||
Test aspects of the TerrainHeightGradientList through the BehaviorContext and the Property Tree.
|
||||
Test aspects of the Terrain Physics Heightfield Collider through the BehaviorContext and the Property Tree.
|
||||
|
||||
Test Steps:
|
||||
Expected Behavior:
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
"""
|
||||
Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
|
||||
SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
"""
|
||||
|
||||
#fmt: off
|
||||
class Tests():
|
||||
create_terrain_spawner_entity = ("Terrain_spawner_entity created successfully", "Failed to create terrain_spawner_entity")
|
||||
create_height_provider_entity = ("Height_provider_entity created successfully", "Failed to create height_provider_entity")
|
||||
create_test_ball = ("Ball created successfully", "Failed to create Ball")
|
||||
box_dimensions_changed = ("Aabb dimensions changed successfully", "Failed change Aabb dimensions")
|
||||
shape_changed = ("Shape changed successfully", "Failed Shape change")
|
||||
entity_added = ("Entity added successfully", "Failed Entity add")
|
||||
frequency_changed = ("Frequency changed successfully", "Failed Frequency change")
|
||||
shape_set = ("Shape set to Sphere successfully", "Failed to set Sphere shape")
|
||||
test_collision = ("Ball collided with terrain", "Ball failed to collide with terrain")
|
||||
no_errors_and_warnings_found = ("No errors and warnings found", "Found errors and warnings")
|
||||
#fmt: on
|
||||
|
||||
def Terrain_SupportsPhysics():
|
||||
"""
|
||||
Summary:
|
||||
Test aspects of the TerrainHeightGradientList through the BehaviorContext and the Property Tree.
|
||||
|
||||
Test Steps:
|
||||
Expected Behavior:
|
||||
The Editor is stable there are no warnings or errors.
|
||||
|
||||
Test Steps:
|
||||
1) Load the base level
|
||||
2) Create 2 test entities, one parent at 512.0, 512.0, 50.0 and one child at the default position and add the required components
|
||||
2a) Create a ball at 600.0, 600.0, 46.0 - This position is not too high over the heightfield so will collide in a reasonable time
|
||||
3) Start the Tracer to catch any errors and warnings
|
||||
4) Change the Axis Aligned Box Shape dimensions
|
||||
5) Set the Vegetation Shape reference to TestEntity1
|
||||
6) Set the FastNoise gradient frequency to 0.01
|
||||
7) Set the Gradient List to TestEntity2
|
||||
8) Set the PhysX Collider to Sphere mode
|
||||
9) Disable and Enable the Terrain Gradient List so that it is recognised
|
||||
10) Enter game mode and test if the ball hits the heightfield within 3 seconds
|
||||
11) Verify there are no errors and warnings in the logs
|
||||
|
||||
|
||||
:return: None
|
||||
"""
|
||||
|
||||
from editor_python_test_tools.editor_entity_utils import EditorEntity
|
||||
from editor_python_test_tools.utils import TestHelper as helper, Report
|
||||
from editor_python_test_tools.utils import Report, Tracer
|
||||
import editor_python_test_tools.hydra_editor_utils as hydra
|
||||
import azlmbr.math as azmath
|
||||
import azlmbr.legacy.general as general
|
||||
import azlmbr.bus as bus
|
||||
import azlmbr.editor as editor
|
||||
import math
|
||||
|
||||
SET_BOX_X_SIZE = 1024.0
|
||||
SET_BOX_Y_SIZE = 1024.0
|
||||
SET_BOX_Z_SIZE = 100.0
|
||||
|
||||
helper.init_idle()
|
||||
|
||||
# 1) Load the level
|
||||
helper.open_level("", "Base")
|
||||
helper.wait_for_condition(lambda: general.get_current_level_name() == "Base", 2.0)
|
||||
|
||||
#1a) Load the level components
|
||||
hydra.add_level_component("Terrain World")
|
||||
hydra.add_level_component("Terrain World Renderer")
|
||||
|
||||
# 2) Create 2 test entities, one parent at 512.0, 512.0, 50.0 and one child at the default position and add the required components
|
||||
entity1_components_to_add = ["Axis Aligned Box Shape", "Terrain Layer Spawner", "Terrain Height Gradient List", "Terrain Physics Heightfield Collider", "PhysX Heightfield Collider"]
|
||||
entity2_components_to_add = ["Vegetation Reference Shape", "Gradient Transform Modifier", "FastNoise Gradient"]
|
||||
ball_components_to_add = ["Sphere Shape", "PhysX Collider", "PhysX Rigid Body"]
|
||||
terrain_spawner_entity = hydra.Entity("TestEntity1")
|
||||
terrain_spawner_entity.create_entity(azmath.Vector3(512.0, 512.0, 50.0), entity1_components_to_add)
|
||||
Report.result(Tests.create_terrain_spawner_entity, terrain_spawner_entity.id.IsValid())
|
||||
height_provider_entity = hydra.Entity("TestEntity2")
|
||||
height_provider_entity.create_entity(azmath.Vector3(0.0, 0.0, 0.0), entity2_components_to_add,terrain_spawner_entity.id)
|
||||
Report.result(Tests.create_height_provider_entity, height_provider_entity.id.IsValid())
|
||||
# 2a) Create a ball at 600.0, 600.0, 46.0 - This position is not too high over the heightfield so will collide in a reasonable time
|
||||
ball = hydra.Entity("Ball")
|
||||
ball.create_entity(azmath.Vector3(600.0, 600.0, 46.0), ball_components_to_add)
|
||||
Report.result(Tests.create_test_ball, ball.id.IsValid())
|
||||
# Give everything a chance to finish initializing.
|
||||
general.idle_wait_frames(1)
|
||||
|
||||
# 3) Start the Tracer to catch any errors and warnings
|
||||
with Tracer() as section_tracer:
|
||||
# 4) Change the Axis Aligned Box Shape dimensions
|
||||
box_dimensions = azmath.Vector3(SET_BOX_X_SIZE, SET_BOX_Y_SIZE, SET_BOX_Z_SIZE)
|
||||
terrain_spawner_entity.get_set_test(0, "Axis Aligned Box Shape|Box Configuration|Dimensions", box_dimensions)
|
||||
box_shape_dimensions = hydra.get_component_property_value(terrain_spawner_entity.components[0], "Axis Aligned Box Shape|Box Configuration|Dimensions")
|
||||
Report.result(Tests.box_dimensions_changed, box_dimensions == box_shape_dimensions)
|
||||
|
||||
# 5) Set the Vegetaion Shape reference to TestEntity1
|
||||
height_provider_entity.get_set_test(0, "Configuration|Shape Entity Id", terrain_spawner_entity.id)
|
||||
entityId = hydra.get_component_property_value(height_provider_entity.components[0], "Configuration|Shape Entity Id")
|
||||
Report.result(Tests.shape_changed, entityId == terrain_spawner_entity.id)
|
||||
|
||||
# 6) Set the FastNoise Gradient frequency to 0.01
|
||||
Frequency = 0.01
|
||||
height_provider_entity.get_set_test(2, "Configuration|Frequency", Frequency)
|
||||
FrequencyVal = hydra.get_component_property_value(height_provider_entity.components[2], "Configuration|Frequency")
|
||||
Report.result(Tests.frequency_changed, math.isclose(Frequency, FrequencyVal, abs_tol = 0.00001))
|
||||
|
||||
# 7) Set the Gradient List to TestEntity2
|
||||
propertyTree = hydra.get_property_tree(terrain_spawner_entity.components[2])
|
||||
propertyTree.add_container_item("Configuration|Gradient Entities", 0, height_provider_entity.id)
|
||||
checkID = propertyTree.get_container_item("Configuration|Gradient Entities", 0)
|
||||
Report.result(Tests.entity_added, checkID.GetValue() == height_provider_entity.id)
|
||||
|
||||
# 8) Set the PhysX Collider to Sphere mode
|
||||
shape = 0
|
||||
hydra.get_set_test(ball, 1, "Shape Configuration|Shape", shape)
|
||||
setShape = hydra.get_component_property_value(ball.components[1], "Shape Configuration|Shape")
|
||||
Report.result(Tests.shape_set, shape == setShape)
|
||||
|
||||
# 9) Disable and Enable the Terrain Gradient List so that it is recognised
|
||||
editor.EditorComponentAPIBus(bus.Broadcast, 'EnableComponents', [terrain_spawner_entity.components[2]])
|
||||
|
||||
general.enter_game_mode()
|
||||
|
||||
general.idle_wait_frames(1)
|
||||
|
||||
# 10) Enter game mode and test if the ball hits the heightfield within 3 seconds
|
||||
TIMEOUT = 3.0
|
||||
|
||||
class Collider:
|
||||
id = general.find_game_entity("Ball")
|
||||
touched_ground = False
|
||||
|
||||
terrain_id = general.find_game_entity("TestEntity1")
|
||||
|
||||
def on_collision_begin(args):
|
||||
other_id = args[0]
|
||||
if other_id.Equal(terrain_id):
|
||||
Report.info("Touched ground")
|
||||
Collider.touched_ground = True
|
||||
|
||||
handler = azlmbr.physics.CollisionNotificationBusHandler()
|
||||
handler.connect(Collider.id)
|
||||
handler.add_callback("OnCollisionBegin", on_collision_begin)
|
||||
|
||||
helper.wait_for_condition(lambda: Collider.touched_ground, TIMEOUT)
|
||||
Report.result(Tests.test_collision, Collider.touched_ground)
|
||||
|
||||
general.exit_game_mode()
|
||||
|
||||
# 11) Verify there are no errors and warnings in the logs
|
||||
helper.wait_for_condition(lambda: section_tracer.has_errors or section_tracer.has_asserts, 1.0)
|
||||
for error_info in section_tracer.errors:
|
||||
Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}")
|
||||
for assert_info in section_tracer.asserts:
|
||||
Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
from editor_python_test_tools.utils import Report
|
||||
Report.start_test(Terrain_SupportsPhysics)
|
||||
|
||||
@@ -13,13 +13,15 @@ import os
|
||||
import sys
|
||||
|
||||
from ly_test_tools import LAUNCHERS
|
||||
from ly_test_tools.o3de.editor_test import EditorTestSuite, EditorSingleTest
|
||||
from ly_test_tools.o3de.editor_test import EditorTestSuite, EditorSharedTest
|
||||
|
||||
@pytest.mark.SUITE_main
|
||||
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
|
||||
@pytest.mark.parametrize("project", ["AutomatedTesting"])
|
||||
class TestAutomation(EditorTestSuite):
|
||||
#global_extra_cmdline_args=["--regset=/Amazon/Preferences/EnablePrefabSystem=true"]
|
||||
|
||||
class test_AxisAlignedBoxShape_ConfigurationWorks(EditorSingleTest):
|
||||
class test_AxisAlignedBoxShape_ConfigurationWorks(EditorSharedTest):
|
||||
from .EditorScripts import TerrainPhysicsCollider_ChangesSizeWithAxisAlignedBoxShapeChanges as test_module
|
||||
|
||||
class test_Terrain_SupportsPhysics(EditorSharedTest):
|
||||
from .EditorScripts import Terrain_SupportsPhysics as test_module
|
||||
|
||||
+12
-7
@@ -62,7 +62,7 @@ def AssetBrowser_SearchFiltering():
|
||||
from editor_python_test_tools.utils import Report
|
||||
from editor_python_test_tools.utils import TestHelper as helper
|
||||
|
||||
def verify_files_appeared(model, allowed_asset_extentions, parent_index=QtCore.QModelIndex()):
|
||||
def verify_files_appeared(model, allowed_asset_extensions, parent_index=QtCore.QModelIndex()):
|
||||
indexes = [parent_index]
|
||||
while len(indexes) > 0:
|
||||
parent_index = indexes.pop(0)
|
||||
@@ -71,7 +71,7 @@ def AssetBrowser_SearchFiltering():
|
||||
cur_data = cur_index.data(Qt.DisplayRole)
|
||||
if (
|
||||
"." in cur_data
|
||||
and (cur_data.lower().split(".")[-1] not in allowed_asset_extentions)
|
||||
and (cur_data.lower().split(".")[-1] not in allowed_asset_extensions)
|
||||
and not cur_data[-1] == ")"
|
||||
):
|
||||
Report.info(f"Incorrect file found: {cur_data}")
|
||||
@@ -94,16 +94,21 @@ def AssetBrowser_SearchFiltering():
|
||||
Report.info("Asset Browser is already open")
|
||||
editor_window = pyside_utils.get_editor_main_window()
|
||||
app = QtWidgets.QApplication.instance()
|
||||
|
||||
# 3) Type the name of an asset in the search bar and make sure only one asset is filtered in Asset browser
|
||||
|
||||
# 3) Type the name of an asset in the search bar and make sure it is filtered to and selectable
|
||||
asset_browser = editor_window.findChild(QtWidgets.QDockWidget, "Asset Browser")
|
||||
search_bar = asset_browser.findChild(QtWidgets.QLineEdit, "textSearch")
|
||||
search_bar.setText("cedar.fbx")
|
||||
asset_browser_tree = asset_browser.findChild(QtWidgets.QTreeView, "m_assetBrowserTreeViewWidget")
|
||||
model_index = pyside_utils.find_child_by_pattern(asset_browser_tree, "cedar.fbx")
|
||||
pyside_utils.item_view_index_mouse_click(asset_browser_tree, model_index)
|
||||
asset_browser_table = asset_browser.findChild(QtWidgets.QTreeView, "m_assetBrowserTableViewWidget")
|
||||
found = await pyside_utils.wait_for_condition(lambda: pyside_utils.find_child_by_pattern(asset_browser_table, "cedar.fbx"), 5.0)
|
||||
if found:
|
||||
model_index = pyside_utils.find_child_by_pattern(asset_browser_table, "cedar.fbx")
|
||||
else:
|
||||
Report.result(Tests.asset_filtered, found)
|
||||
pyside_utils.item_view_index_mouse_click(asset_browser_table, model_index)
|
||||
is_filtered = await pyside_utils.wait_for_condition(
|
||||
lambda: asset_browser_tree.indexBelow(asset_browser_tree.currentIndex()) == QtCore.QModelIndex(), 5.0)
|
||||
lambda: asset_browser_table.currentIndex() == model_index, 5.0)
|
||||
Report.result(Tests.asset_filtered, is_filtered)
|
||||
|
||||
# 4) Click the "X" in the search bar.
|
||||
|
||||
+2
-2
@@ -84,8 +84,8 @@ def AssetBrowser_TreeNavigation():
|
||||
|
||||
# 3) Collapse all files initially
|
||||
main_window = editor_window.findChild(QtWidgets.QMainWindow)
|
||||
asset_browser = pyside_utils.find_child_by_hierarchy(main_window, ..., "Asset Browser")
|
||||
tree = pyside_utils.find_child_by_hierarchy(asset_browser, ..., "m_assetBrowserTreeViewWidget")
|
||||
asset_browser = pyside_utils.find_child_by_pattern(main_window, text="Asset Browser", type=QtWidgets.QDockWidget)
|
||||
tree = pyside_utils.find_child_by_pattern(asset_browser, "m_assetBrowserTreeViewWidget")
|
||||
scroll_area = tree.findChild(QtWidgets.QWidget, "qt_scrollarea_vcontainer")
|
||||
scroll_bar = scroll_area.findChild(QtWidgets.QScrollBar)
|
||||
tree.collapseAll()
|
||||
|
||||
@@ -43,7 +43,6 @@ class TestAutomationNoAutoTestMode(EditorTestSuite):
|
||||
class test_InputBindings_Add_Remove_Input_Events(EditorSharedTest):
|
||||
from .EditorScripts import InputBindings_Add_Remove_Input_Events as test_module
|
||||
|
||||
@pytest.mark.skip(reason="Crashes Editor: ATOM-15493")
|
||||
class test_AssetPicker_UI_UX(EditorSharedTest):
|
||||
from .EditorScripts import AssetPicker_UI_UX as test_module
|
||||
|
||||
@@ -60,7 +59,6 @@ class TestAutomationAutoTestMode(EditorTestSuite):
|
||||
class test_AssetBrowser_TreeNavigation(EditorSharedTest):
|
||||
from .EditorScripts import AssetBrowser_TreeNavigation as test_module
|
||||
|
||||
@pytest.mark.skip(reason="Crashes Editor: ATOM-15493")
|
||||
class test_AssetBrowser_SearchFiltering(EditorSharedTest):
|
||||
from .EditorScripts import AssetBrowser_SearchFiltering as test_module
|
||||
|
||||
@@ -74,6 +72,5 @@ class TestAutomationAutoTestMode(EditorTestSuite):
|
||||
class test_Menus_FileMenuOptions_Work(EditorSharedTest):
|
||||
from .EditorScripts import Menus_FileMenuOptions as test_module
|
||||
|
||||
|
||||
class test_BasicEditorWorkflows_ExistingLevel_EntityComponentCRUD(EditorSharedTest):
|
||||
from .EditorScripts import BasicEditorWorkflows_ExistingLevel_EntityComponentCRUD as test_module
|
||||
|
||||
@@ -34,12 +34,10 @@ class TestAutomation(TestAutomationBase):
|
||||
from .EditorScripts import AssetBrowser_TreeNavigation as test_module
|
||||
self._run_test(request, workspace, editor, test_module, batch_mode=False)
|
||||
|
||||
@pytest.mark.skip(reason="Crashes Editor: ATOM-15493")
|
||||
def test_AssetBrowser_SearchFiltering(self, request, workspace, editor, launcher_platform):
|
||||
from .EditorScripts import AssetBrowser_SearchFiltering as test_module
|
||||
self._run_test(request, workspace, editor, test_module, batch_mode=False)
|
||||
|
||||
@pytest.mark.skip(reason="Crashes Editor: ATOM-15493")
|
||||
def test_AssetPicker_UI_UX(self, request, workspace, editor, launcher_platform):
|
||||
from .EditorScripts import AssetPicker_UI_UX as test_module
|
||||
self._run_test(request, workspace, editor, test_module, autotest_mode=False, batch_mode=False)
|
||||
|
||||
@@ -1,52 +1,61 @@
|
||||
{
|
||||
"ContainerEntity": {
|
||||
"Id": "ContainerEntity",
|
||||
"Name": "Base",
|
||||
"Id": "Entity_[1146574390643]",
|
||||
"Name": "Level",
|
||||
"Components": {
|
||||
"Component_[10182366347512475253]": {
|
||||
"$type": "EditorPrefabComponent",
|
||||
"Id": 10182366347512475253
|
||||
"Component_[10641544592923449938]": {
|
||||
"$type": "EditorInspectorComponent",
|
||||
"Id": 10641544592923449938
|
||||
},
|
||||
"Component_[12917798267488243668]": {
|
||||
"$type": "EditorPendingCompositionComponent",
|
||||
"Id": 12917798267488243668
|
||||
},
|
||||
"Component_[3261249813163778338]": {
|
||||
"Component_[12039882709170782873]": {
|
||||
"$type": "EditorOnlyEntityComponent",
|
||||
"Id": 3261249813163778338
|
||||
"Id": 12039882709170782873
|
||||
},
|
||||
"Component_[3837204912784440039]": {
|
||||
"$type": "EditorDisabledCompositionComponent",
|
||||
"Id": 3837204912784440039
|
||||
"Component_[12265484671603697631]": {
|
||||
"$type": "EditorPendingCompositionComponent",
|
||||
"Id": 12265484671603697631
|
||||
},
|
||||
"Component_[4272963378099646759]": {
|
||||
"Component_[14126657869720434043]": {
|
||||
"$type": "EditorEntitySortComponent",
|
||||
"Id": 14126657869720434043,
|
||||
"ChildEntityOrderEntryArray": [
|
||||
{
|
||||
"EntityId": ""
|
||||
},
|
||||
{
|
||||
"EntityId": "",
|
||||
"SortIndex": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"Component_[15230859088967841193]": {
|
||||
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
|
||||
"Id": 4272963378099646759,
|
||||
"Id": 15230859088967841193,
|
||||
"Parent Entity": ""
|
||||
},
|
||||
"Component_[4848458548047175816]": {
|
||||
"$type": "EditorVisibilityComponent",
|
||||
"Id": 4848458548047175816
|
||||
"Component_[16239496886950819870]": {
|
||||
"$type": "EditorDisabledCompositionComponent",
|
||||
"Id": 16239496886950819870
|
||||
},
|
||||
"Component_[5787060997243919943]": {
|
||||
"$type": "EditorInspectorComponent",
|
||||
"Id": 5787060997243919943
|
||||
},
|
||||
"Component_[7804170251266531779]": {
|
||||
"$type": "EditorLockComponent",
|
||||
"Id": 7804170251266531779
|
||||
},
|
||||
"Component_[7874177159288365422]": {
|
||||
"$type": "EditorEntitySortComponent",
|
||||
"Id": 7874177159288365422
|
||||
},
|
||||
"Component_[8018146290632383969]": {
|
||||
"Component_[5688118765544765547]": {
|
||||
"$type": "EditorEntityIconComponent",
|
||||
"Id": 8018146290632383969
|
||||
"Id": 5688118765544765547
|
||||
},
|
||||
"Component_[8452360690590857075]": {
|
||||
"Component_[6545738857812235305]": {
|
||||
"$type": "SelectionComponent",
|
||||
"Id": 8452360690590857075
|
||||
"Id": 6545738857812235305
|
||||
},
|
||||
"Component_[7247035804068349658]": {
|
||||
"$type": "EditorPrefabComponent",
|
||||
"Id": 7247035804068349658
|
||||
},
|
||||
"Component_[9307224322037797205]": {
|
||||
"$type": "EditorLockComponent",
|
||||
"Id": 9307224322037797205
|
||||
},
|
||||
"Component_[9562516168917670048]": {
|
||||
"$type": "EditorVisibilityComponent",
|
||||
"Id": 9562516168917670048
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user