Skip to content

Automate circular child scenes tests#1295

Open
sbelhaik wants to merge 5 commits intomainfrom
sbel/scene_circular_dependency
Open

Automate circular child scenes tests#1295
sbelhaik wants to merge 5 commits intomainfrom
sbel/scene_circular_dependency

Conversation

@sbelhaik
Copy link
Copy Markdown
Contributor

@sbelhaik sbelhaik commented Apr 8, 2026

Automate circular child scenes tests

JIRA: ITEP-89830

✨ Type of Change

Select the type of change your PR introduces:

  • 🐞 Bug fix – Non-breaking change which fixes an issue
  • 🚀 New feature – Non-breaking change which adds functionality
  • 🔨 Refactor – Non-breaking change which refactors the code base
  • 💥 Breaking change – Changes that break existing functionality
  • 📚 Documentation update
  • 🔒 Security update
  • 🧪 Tests
  • 🚂 CI

🧪 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

  • ✅ Tested manually
  • 🤖 Ran automated end-to-end tests

✅ Checklist

Before submitting the PR, ensure the following:

  • 🔍 PR title is clear and descriptive
  • 📝 For internal contributors: If applicable, include the JIRA ticket number (e.g., ITEP-123456) in the PR title. Do not include full URLs
  • 💬 I have commented my code, especially in hard-to-understand areas
  • 📄 I have made corresponding changes to the documentation
  • ✅ I have added tests that prove my fix is effective or my feature works

@sbelhaik sbelhaik marked this pull request as ready for review April 8, 2026 13:58
@sbelhaik sbelhaik requested a review from Copilot April 8, 2026 13:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_case filter 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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants