merge from main
This commit is contained in:
@@ -11,7 +11,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
# Test case ID : C18977329
|
||||
# Test Case Title : Add cloth simulation to a Mesh
|
||||
# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/18977329
|
||||
|
||||
# fmt: off
|
||||
class Tests:
|
||||
|
||||
-1
@@ -11,7 +11,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
# Test case ID : C18977330
|
||||
# Test Case Title : Add cloth simulation to an Actor
|
||||
# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/18977330
|
||||
|
||||
# fmt: off
|
||||
class Tests:
|
||||
|
||||
@@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
# Test case ID : C28798177
|
||||
# Test Case Title : White Box Tool Component can be added to an Entity
|
||||
# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/28798177
|
||||
|
||||
|
||||
# fmt:off
|
||||
|
||||
@@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
# Test case ID : C28798205
|
||||
# Test Case Title : From the White Box Component Card the White Box Mesh can be set to be invisible in Game View
|
||||
# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/28798205
|
||||
|
||||
|
||||
# fmt:off
|
||||
|
||||
@@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
# Test case ID : C29279329
|
||||
# Test Case Title : White Box mesh shape can be changed with the Default Shape dropdown on the Component
|
||||
# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/29279329
|
||||
|
||||
|
||||
# fmt:off
|
||||
|
||||
@@ -18,7 +18,7 @@ import pytest
|
||||
import editor_python_test_tools.hydra_test_utils as hydra
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
EDITOR_TIMEOUT = 120
|
||||
EDITOR_TIMEOUT = 300
|
||||
TEST_DIRECTORY = os.path.join(os.path.dirname(__file__), "atom_hydra_scripts")
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ def C14976308_ScriptCanvas_SetKinematicTargetTransform():
|
||||
the script deactivates Signal, Sphere's transform will update to that of Transform_Target.
|
||||
NOTE: There is a known bug (LY-107723) which causes the rotation to update to a value that is not sufficiently close
|
||||
to the expected result when using Set Kinematic Target which will cause the test to fail:
|
||||
https://jira.agscollab.com/browse/LY-107723
|
||||
LY-107723
|
||||
|
||||
Test Steps:
|
||||
1) Open level and enter game mode
|
||||
|
||||
@@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# Test case ID : C3510644
|
||||
# Test Case Title : Check that the collision layer and collision group of the terrain can be changed
|
||||
# and the collision behavior of the terrain changes accordingly
|
||||
# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/3510644
|
||||
|
||||
|
||||
# fmt: off
|
||||
|
||||
@@ -239,7 +239,7 @@ def C6321601_Force_HighValuesDirectionAxes():
|
||||
force_notification_handler.add_callback("OnCalculateNetForce", on_calc_net_force)
|
||||
|
||||
# Wait for 3 secs, because there is a known bug identified and filed in
|
||||
# JIRA https://jira.agscollab.com/browse/LY-107677
|
||||
# JIRA LY-107677
|
||||
# The error "[Error] Huge object being added to a COctreeNode, name: 'MeshComponentRenderNode', objBox:"
|
||||
# will show (if occured) in about 3 sec into the game mode.
|
||||
helper.wait_for_condition(has_physx_error, 3.0)
|
||||
|
||||
@@ -50,7 +50,7 @@ class TestAutomation(TestAutomationBase):
|
||||
unexpected_lines = ["Assert"]
|
||||
self._run_test(request, workspace, editor, test_module, expected_lines, unexpected_lines)
|
||||
|
||||
# BUG: https://jira.agscollab.com/browse/LY-107723")
|
||||
# BUG: LY-107723")
|
||||
def test_C14976308_ScriptCanvas_SetKinematicTargetTransform(self, request, workspace, editor):
|
||||
from . import C14976308_ScriptCanvas_SetKinematicTargetTransform as test_module
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
'''
|
||||
This unittest might have to be refactored once changes to Physmaterial_Editor.py are made.
|
||||
These changes will occur after the but, reverence below is resloved.
|
||||
Bug: https://jira.agscollab.com/browse/LY-107392
|
||||
Bug: LY-107392
|
||||
'''
|
||||
class Tests:
|
||||
opening_bad_file = ("Bad file could not be opened", "Bad file was opened")
|
||||
|
||||
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
Test case ID: T92569013
|
||||
Test Case Title: Script Event file can be created
|
||||
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569013
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
Test case ID: T92568942
|
||||
Test Case Title: Clicking the "+" button and selecting "New Script Event" opens the
|
||||
Asset Editor with a new Script Event asset
|
||||
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568942
|
||||
"""
|
||||
|
||||
from PySide2 import QtWidgets
|
||||
|
||||
@@ -11,7 +11,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
Test case ID: T92568856
|
||||
Test Case Title: Multiple Entities can be targeted in the Debugger tool
|
||||
URLs of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568856
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
Test case ID: T92569137
|
||||
Test Case Title: Multiple Graphs can be targeted in the Debugger tool
|
||||
URLs of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569137
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
Test case ID: C1702824
|
||||
Test Case Title: Docking
|
||||
URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702824
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@@ -11,10 +11,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
Test case ID: T92569049
|
||||
Test Case Title: Edit > Undo undoes the last action
|
||||
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569049
|
||||
Test case ID: T92569051
|
||||
Test Case Title: Edit > Redo redoes the last undone action
|
||||
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569051
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
Test case ID: T92562978
|
||||
Test Case Title: Script Canvas Component can be added to an entity
|
||||
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92562978
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@@ -11,10 +11,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
Test case ID: T92569037
|
||||
Test Case Title: File > New Script creates a new script
|
||||
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569037
|
||||
Test case ID: T92569039
|
||||
Test Case Title: File > Open opens the Open... dialog
|
||||
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569039
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
@@ -11,11 +11,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
Test case ID: T92563070
|
||||
Test Case Title: Graphs can be closed by clicking X on the Graph name tab
|
||||
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92563070
|
||||
Test case ID: T92563068
|
||||
Test Case Title: Save Prompt: User is prompted to save a graph on close after
|
||||
creating a new graph
|
||||
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92563068
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
@@ -11,10 +11,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
Test case ID: T92569079
|
||||
Test Case Title: View > Zoom In zooms the graph in
|
||||
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569079
|
||||
Test case ID: T92569081
|
||||
Test Case Title: View > Zoom In zooms the graph out
|
||||
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569081
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ remove or modify any license notices. This file is distributed on an "AS IS" BAS
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
"""
|
||||
|
||||
|
||||
def init():
|
||||
import os
|
||||
import sys
|
||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../automatedtesting_shared')
|
||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../EditorPythonTestTools/editor_python_test_tools')
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
"""
|
||||
All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
its licensors.
|
||||
|
||||
For complete copyright and license terms please see the LICENSE at the root of this
|
||||
distribution (the "License"). All use of this software is governed by the License,
|
||||
or, if provided, by the license below or the license accompanying this file. Do not
|
||||
remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
Test case ID: T92562988
|
||||
Test Case Title: Left-click/double click expands and collapses node categories
|
||||
"""
|
||||
|
||||
|
||||
# fmt: off
|
||||
class Tests():
|
||||
pane_open = ("Script Canvas pane successfully opened", "Script Canvas pane failed to open")
|
||||
click_expand = ("Category expanded on left click", "Category failed to expand on left click")
|
||||
click_collapse = ("Category collapsed on left click", "Category failed to collapse on left click")
|
||||
dClick_expand = ("Category expanded on double click", "Category failed to expand on double click")
|
||||
dClick_collapse = ("Category collapsed on double click", "Category failed to collapse on double click")
|
||||
# fmt: on
|
||||
|
||||
|
||||
def NodeCategory_ExpandOnClick():
|
||||
"""
|
||||
Summary:
|
||||
Verifying the expand/collapse functionality on node categories
|
||||
|
||||
Expected Behavior:
|
||||
The node category should expand when double clicked or when the drop down indicator is
|
||||
left-clicked. Once expanded, it should be collapsed via the same actions.
|
||||
|
||||
Test Steps:
|
||||
1) Open Script Canvas pane
|
||||
2) Get the SC window objects
|
||||
3) Ensure all categories are collapsed for a clean state
|
||||
4) Left-Click on a node category arrow to expand it
|
||||
5) Verify it expanded
|
||||
6) Left-Click on a node category arrow to collapse it
|
||||
7) Verify it collapsed
|
||||
8) Double-Click on a node category to expand it
|
||||
9) Verify it expanded
|
||||
10) Double-Click on a node category to collapse it
|
||||
11) Verify it collapsed
|
||||
|
||||
Note:
|
||||
- This test file must be called from the Open 3D Engine Editor command terminal
|
||||
- Any passed and failed tests are written to the Editor.log file.
|
||||
Parsing the file or running a log_monitor are required to observe the test results.
|
||||
|
||||
:return: None
|
||||
"""
|
||||
from utils import Report
|
||||
from PySide2 import QtCore, QtWidgets, QtTest
|
||||
from PySide2.QtTest import QTest
|
||||
import pyside_utils
|
||||
import azlmbr.legacy.general as general
|
||||
|
||||
def left_click_arrow(item_view, index):
|
||||
original_state = item_view.isExpanded(index)
|
||||
rect_center_y = item_view.visualRect(index).center().y()
|
||||
rect_left_x = item_view.visualRect(index).left()
|
||||
for i in range(5): # this range can be increased for safe side
|
||||
QtTest.QTest.mouseClick(
|
||||
item_view.viewport(),
|
||||
QtCore.Qt.LeftButton,
|
||||
QtCore.Qt.NoModifier,
|
||||
QtCore.QPoint(rect_left_x - i, rect_center_y),
|
||||
)
|
||||
if item_view.isExpanded(index) != original_state:
|
||||
break
|
||||
|
||||
def double_click(item_view, index):
|
||||
item_index_center = item_view.visualRect(index).center()
|
||||
# Left click on the item before trying to double click, will otherwise fail to expand
|
||||
# as first click would highlight and second click would be a 'single click'
|
||||
pyside_utils.item_view_index_mouse_click(item_view, index)
|
||||
QTest.mouseDClick(item_view.viewport(), QtCore.Qt.LeftButton, QtCore.Qt.NoModifier, item_index_center)
|
||||
|
||||
# 1) Open Script Canvas pane
|
||||
general.open_pane("Script Canvas")
|
||||
Report.critical_result(Tests.pane_open, general.is_pane_visible("Script Canvas"))
|
||||
|
||||
# 2) Get the SC window objects
|
||||
editor_window = pyside_utils.get_editor_main_window()
|
||||
sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
|
||||
if sc.findChild(QtWidgets.QDockWidget, "NodePalette") is None:
|
||||
action = pyside_utils.find_child_by_pattern(sc, {"text": "Node Palette", "type": QtWidgets.QAction})
|
||||
action.trigger()
|
||||
node_palette = sc.findChild(QtWidgets.QDockWidget, "NodePalette")
|
||||
nodeTree = node_palette.findChild(QtWidgets.QTreeView, "treeView")
|
||||
ai_index = pyside_utils.find_child_by_pattern(nodeTree, "AI")
|
||||
|
||||
# 3) Ensure all categories are collapsed for a clean state
|
||||
nodeTree.collapseAll()
|
||||
|
||||
# 4) Left-Click on a node category arrow to expand it
|
||||
left_click_arrow(nodeTree, ai_index)
|
||||
|
||||
# 5) Verify it expanded
|
||||
Report.result(Tests.click_expand, nodeTree.isExpanded(ai_index))
|
||||
|
||||
# 6) Left-Click on a node category arrow to collapse it
|
||||
left_click_arrow(nodeTree, ai_index)
|
||||
|
||||
# 7) Verify it collapsed
|
||||
Report.result(Tests.click_collapse, not nodeTree.isExpanded(ai_index))
|
||||
|
||||
# 8) Double-Click on a node category to expand it
|
||||
double_click(nodeTree, ai_index)
|
||||
|
||||
# 9) Verify it expanded
|
||||
Report.result(Tests.dClick_expand, nodeTree.isExpanded(ai_index))
|
||||
|
||||
# 10) Double-Click on a node category to collapse it
|
||||
double_click(nodeTree, ai_index)
|
||||
|
||||
# 11) Verify it collapsed
|
||||
Report.result(Tests.dClick_collapse, not nodeTree.isExpanded(ai_index))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import ImportPathHelper as imports
|
||||
imports.init()
|
||||
from utils import Report
|
||||
Report.start_test(NodeCategory_ExpandOnClick)
|
||||
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
Test case ID: T92568982
|
||||
Test Case Title: Renaming variables in the Node Inspector
|
||||
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568982
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
Test case ID: T92562993
|
||||
Test Case Title: Clicking the X button on the Search Box clears the currently entered string
|
||||
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92562993
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
Test case ID: T92568940
|
||||
Test Case Title: Categories and Nodes can be selected
|
||||
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568940
|
||||
"""
|
||||
|
||||
|
||||
|
||||
-1
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
Test case ID: T92569253 // T92569254
|
||||
Test Case Title: On Entity Activated // On Entity Deactivated
|
||||
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569253 // https://testrail.agscollab.com/index.php?/tests/view/92569254
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@@ -10,8 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
Test case ID: C1702834 // C1702823
|
||||
Test Case Title: Opening pane // Closing pane
|
||||
URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702834 and
|
||||
https://testrail.agscollab.com/index.php?/cases/view/1702823
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@@ -10,8 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
Test case ID: C1702821 // C1702832
|
||||
Test Case Title: Retain visibility, size and location upon Script Canvas restart
|
||||
URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702821 and
|
||||
https://testrail.agscollab.com/index.php?/cases/view/1702832
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
Test case ID: C1702829
|
||||
Test Case Title: Resizing pane
|
||||
URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702829
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
Test case ID: T92562986
|
||||
Test Case Title: Changing the assigned Script Canvas Asset on an entity properly updates
|
||||
level functionality
|
||||
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92562986
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
Test case ID: T92563190
|
||||
Test Case Title: A single Entity with two Script Canvas components works properly
|
||||
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92563190
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
Test case ID: T92563191
|
||||
Test Case Title: Two Entities can use the same Graph asset successfully at RunTime
|
||||
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92563191
|
||||
"""
|
||||
|
||||
|
||||
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
"""
|
||||
All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
its licensors.
|
||||
|
||||
For complete copyright and license terms please see the LICENSE at the root of this
|
||||
distribution (the "License"). All use of this software is governed by the License,
|
||||
or, if provided, by the license below or the license accompanying this file. Do not
|
||||
remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
Test Case Title: Event can return a value of set type successfully
|
||||
"""
|
||||
|
||||
|
||||
# fmt: off
|
||||
class Tests():
|
||||
level_created = ("Successfully created temporary level", "Failed to create temporary level")
|
||||
entity_created = ("Successfully created test entity", "Failed to create test entity")
|
||||
enter_game_mode = ("Successfully entered game mode", "Failed to enter game mode")
|
||||
lines_found = ("Successfully found expected message", "Failed to find expected message")
|
||||
exit_game_mode = ("Successfully exited game mode", "Failed to exit game mode")
|
||||
# fmt: on
|
||||
|
||||
|
||||
def ScriptEvents_ReturnSetType_Successfully():
|
||||
"""
|
||||
Summary: A temporary level is created with an Entity having ScriptCanvas component.
|
||||
ScriptEvent(T92569006_ScriptEvent.scriptevents) is created with one Method that has a return value.
|
||||
ScriptCanvas(T92569006_ScriptCanvas.scriptcanvas) is attached to Entity. Graph has Send node that sends the Method
|
||||
of the ScriptEvent and prints the returned result ( On Entity Activated -> Send node -> Print) and Receive node is
|
||||
set to return custom value ( Receive node -> Print).
|
||||
Verify that the entity containing T92569006_ScriptCanvas.scriptcanvas should print the custom value set in both
|
||||
Send and Receive nodes.
|
||||
|
||||
Expected Behavior:
|
||||
After entering game mode, the graph on the entity should print an expected message to the console
|
||||
|
||||
Test Steps:
|
||||
1) Create test level
|
||||
2) Create test entity
|
||||
3) Start Tracer
|
||||
4) Enter Game Mode
|
||||
5) Read for line
|
||||
6) Exit Game Mode
|
||||
|
||||
Note:
|
||||
- This test file must be called from the Open 3D Engine Editor command terminal
|
||||
- Any passed and failed tests are written to the Editor.log file.
|
||||
Parsing the file or running a log_monitor are required to observe the test results.
|
||||
|
||||
:return: None
|
||||
"""
|
||||
import os
|
||||
from editor_entity_utils import EditorEntity as Entity
|
||||
from utils import Report
|
||||
from utils import TestHelper as helper
|
||||
from utils import Tracer
|
||||
|
||||
import azlmbr.legacy.general as general
|
||||
import azlmbr.asset as asset
|
||||
import azlmbr.math as math
|
||||
import azlmbr.bus as bus
|
||||
|
||||
LEVEL_NAME = "tmp_level"
|
||||
WAIT_TIME = 3.0 # SECONDS
|
||||
EXPECTED_LINES = ["T92569006_ScriptEvent_Sent", "T92569006_ScriptEvent_Received"]
|
||||
SC_ASSET_PATH = os.path.join("ScriptCanvas", "T92569006_ScriptCanvas.scriptcanvas")
|
||||
|
||||
def create_editor_entity(name, sc_asset):
|
||||
entity = Entity.create_editor_entity(name)
|
||||
sc_comp = entity.add_component("Script Canvas")
|
||||
asset_id = asset.AssetCatalogRequestBus(bus.Broadcast, "GetAssetIdByPath", sc_asset, math.Uuid(), False)
|
||||
sc_comp.set_component_property_value("Script Canvas Asset|Script Canvas Asset", asset_id)
|
||||
Report.critical_result(Tests.entity_created, entity.id.isValid())
|
||||
|
||||
def locate_expected_lines(line_list: list):
|
||||
found_lines = [printInfo.message.strip() for printInfo in section_tracer.prints]
|
||||
|
||||
return all(line in found_lines for line in line_list)
|
||||
|
||||
# 1) Create temp level
|
||||
general.idle_enable(True)
|
||||
result = general.create_level_no_prompt(LEVEL_NAME, 128, 1, 512, True)
|
||||
Report.critical_result(Tests.level_created, result == 0)
|
||||
helper.wait_for_condition(lambda: general.get_current_level_name() == LEVEL_NAME, WAIT_TIME)
|
||||
general.close_pane("Error Report")
|
||||
|
||||
# 2) Create test entity
|
||||
create_editor_entity("TestEntity", SC_ASSET_PATH)
|
||||
|
||||
# 3) Start Tracer
|
||||
with Tracer() as section_tracer:
|
||||
|
||||
# 4) Enter Game Mode
|
||||
helper.enter_game_mode(Tests.enter_game_mode)
|
||||
|
||||
# 5) Read for line
|
||||
lines_located = helper.wait_for_condition(lambda: locate_expected_lines(EXPECTED_LINES), WAIT_TIME)
|
||||
Report.result(Tests.lines_found, lines_located)
|
||||
|
||||
# 6) Exit Game Mode
|
||||
helper.exit_game_mode(Tests.exit_game_mode)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import ImportPathHelper as imports
|
||||
|
||||
imports.init()
|
||||
|
||||
from utils import Report
|
||||
|
||||
Report.start_test(ScriptEvents_ReturnSetType_Successfully)
|
||||
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
Test case ID: T92567321
|
||||
Test Case Title: Script Events: Can send and receive a script event across multiple entities successfully
|
||||
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92567321
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
Test case ID: T92567320
|
||||
Test Case Title: Script Events: Can send and receive a script event successfully
|
||||
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92567320
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@@ -183,6 +183,19 @@ class TestAutomation(TestAutomationBase):
|
||||
from . import ScriptEvents_SendReceiveSuccessfully as test_module
|
||||
self._run_test(request, workspace, editor, test_module)
|
||||
|
||||
@pytest.mark.parametrize("level", ["tmp_level"])
|
||||
def test_ScriptEvents_ReturnSetType_Successfully(self, request, workspace, editor, launcher_platform, project, level):
|
||||
def teardown():
|
||||
file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
|
||||
request.addfinalizer(teardown)
|
||||
file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
|
||||
from . import ScriptEvents_ReturnSetType_Successfully as test_module
|
||||
self._run_test(request, workspace, editor, test_module)
|
||||
|
||||
def test_NodeCategory_ExpandOnClick(self, request, workspace, editor, launcher_platform):
|
||||
from . import NodeCategory_ExpandOnClick as test_module
|
||||
self._run_test(request, workspace, editor, test_module)
|
||||
|
||||
def test_NodePalette_SearchText_Deletion(self, request, workspace, editor, launcher_platform):
|
||||
from . import NodePalette_SearchText_Deletion as test_module
|
||||
self._run_test(request, workspace, editor, test_module)
|
||||
@@ -255,4 +268,4 @@ class TestScriptCanvasTests(object):
|
||||
expected_lines,
|
||||
auto_test_mode=False,
|
||||
timeout=60,
|
||||
)
|
||||
)
|
||||
|
||||
@@ -13,11 +13,6 @@ Test Case Title: Tools > Node Palette toggles the Node Palette
|
||||
Tools > Node Inspector toggles the Node Inspector
|
||||
Tools > Bookmarks toggles the Bookmarks
|
||||
Tools > Variable Manager toggles the Variable Manager
|
||||
|
||||
URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/92569165
|
||||
https://testrail.agscollab.com/index.php?/cases/view/92569167
|
||||
https://testrail.agscollab.com/index.php?/cases/view/92569168
|
||||
https://testrail.agscollab.com/index.php?/cases/view/92569170
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@@ -10,8 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
Test case ID: C1702825 // C1702831
|
||||
Test Case Title: Undocking // Closing script canvas with the pane floating
|
||||
URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702825 &
|
||||
https://testrail.agscollab.com/index.php?/cases/view/1702831
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@@ -10,10 +10,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
Test case ID: T92564789
|
||||
Test Case Title: Each Variable type can be created
|
||||
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92564789
|
||||
Test case ID: T92568873
|
||||
Test Case Title: Each Variable type can be deleted
|
||||
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568873
|
||||
"""
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user