Skip to content

fix: use "points" instead of "vertices" in region API test 05#1157

Closed
Copilot wants to merge 2 commits intosbel/roi-apifrom
copilot/sub-pr-1091
Closed

fix: use "points" instead of "vertices" in region API test 05#1157
Copilot wants to merge 2 commits intosbel/roi-apifrom
copilot/sub-pr-1091

Conversation

Copy link
Contributor

Copilot AI commented Mar 9, 2026

Test 05 in region_api.json was sending "vertices" as the coordinate field name when updating a region. RegionSerializer expects "points", so the coordinates were silently dropped and the test never validated that coordinate updates actually worked.

📝 Description

What: Renamed "vertices""points" in the test 05 ("Update region with full payload") request body in tests/api/scenarios/region_api.json.

Why: RegionSerializer only recognizes "points" — using "vertices" caused coordinates to be silently ignored, making the test a false positive that never exercised the coordinate-update code path.

// Before (silently ignored by RegionSerializer)
"vertices": [[0.0, 0.0], [2.0, 0.0], [2.0, 2.0], [0.0, 2.0]]

// After (correctly recognized)
"points": [[0.0, 0.0], [2.0, 0.0], [2.0, 2.0], [0.0, 2.0]]

✨ Type of Change

  • 🐞 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

  • ✅ 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

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: sbelhaik <95611671+sbelhaik@users.noreply.github.com>
Copilot AI changed the title [WIP] Update changes based on feedback for pull request #1091 fix: use "points" instead of "vertices" in region API test 05 Mar 9, 2026
@sbelhaik sbelhaik closed this Mar 9, 2026
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