Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands the API scenario coverage in scene_api.json to automate validation of child-scene linking behavior, including prevention of circular dependencies, while also updating some existing scene scenario expectations/wording.
Changes:
- Adds creation of additional “Circular_Dep_*” scenes used as fixtures for child-scene dependency tests.
- Introduces new scenarios covering valid child links, self-reference prevention, duplicate prevention, and multi-node circular dependency prevention (including update-based cycle attempts).
- Updates some existing scenario text and JSON formatting (e.g., step_name wording and array formatting), and adjusts scene list validation expectations.
Comments suppressed due to low confidence (1)
tests/api/scenarios/scene_api.json:1528
- This change renumbers existing test case IDs (e.g., “Delete non existent scene” is now SCENE/33). Because the runner’s
--test_casefilter matches the prefix before the colon, renumbering changes how existing IDs are invoked and can break any external references/automation. Consider keeping existing IDs stable and appending new cases with new IDs instead of shifting later ones.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (5)
tests/api/scenarios/scene_api.json:368
- This step runs after an update request expected to fail with HTTP 400 and then validates the scene name remains "Scene1_Updated_Full". The step_name "Verify scene was updated" is misleading here; rename it to indicate the scene was not updated / remained unchanged.
"step_name": "Verify scene was updated",
"api": "scene",
"method": "getScene",
"request": {
"uid": "${SCENE_UID}"
tests/api/scenarios/scene_api.json:404
- This step verifies the scene state is unchanged after an invalid update (previous step expects HTTP 400 and this step validates the name is still "Scene1_Updated_Full"). The step_name currently says "Verify scene was updated", which is inaccurate and can confuse debugging; rename to "Verify scene was not updated" (or similar).
"step_name": "Verify scene was updated",
"api": "scene",
"method": "getScene",
"request": {
"uid": "${SCENE_UID}"
tests/api/scenarios/scene_api.json:440
- This getScene step validates the scene remained unchanged after an update that was expected to fail (HTTP 400). The step_name "Verify scene was updated" is inaccurate; rename it to reflect that no update occurred.
"step_name": "Verify scene was updated",
"api": "scene",
"method": "getScene",
"request": {
"uid": "${SCENE_UID}"
tests/api/scenarios/scene_api.json:476
- This step checks the scene name is still "Scene1_Updated_Full" after an update expected to fail with HTTP 400. The step_name "Verify scene was updated" is misleading; rename to indicate the scene was not updated.
"step_name": "Verify scene was updated",
"api": "scene",
"method": "getScene",
"request": {
"uid": "${SCENE_UID}"
tests/api/scenarios/scene_api.json:512
- This step verifies the scene is unchanged after an invalid update (HTTP 400) by validating the name remains "Scene1_Updated_Full". The step_name says "Verify scene was updated" but the assertion is the opposite; rename accordingly to avoid confusion.
"step_name": "Verify scene was updated",
"api": "scene",
"method": "getScene",
"request": {
"uid": "${SCENE_UID}"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automate circular child scenes tests
JIRA: ITEP-89830
✨ Type of Change
Select the type of change your PR introduces:
🧪 Testing Scenarios
Describe how the changes were tested and how reviewers can test them too:
pytest -s tests/api/test_sscape_api.py --file tests/api/scenarios/scene_api.json --junitxml=test-results.xml✅ Checklist
Before submitting the PR, ensure the following: