Skip to content

DF-1497: Add failing tests for stale grid references after update - #479

Merged
davidjamesstone merged 3 commits into
mainfrom
DF-1497
Oct 12, 2026
Merged

davidjamesstone merged 3 commits into
mainfrom
DF-1497

Conversation

@nayij

@nayij nayij commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

getFeaturesManager.updateFeature assigns both grid reference properties before it applies the new geometry, and both are derived from feature.geometry, so an updated point, line or shape keeps the grid reference of its previous position while its coordinates move.

Adds unit tests covering add and update for each geometry type. The three grid reference assertions for updateFeature fail until the ordering is corrected; getFeaturesManager is exported so they can be driven directly.

No behaviour change.

Proposed change

Jira ticket: https://eaflood.atlassian.net/browse/DF-1497

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Misc. (documentation, build updates, etc)

Checklist

  • You have executed this code locally and it performs as expected.
  • You have added tests to verify your code works.
  • You have added code comments and JSDoc, where appropriate.
  • There is no commented-out code.
  • You have added developer docs in README.md and docs/* (where appropriate, e.g. new features).
  • The tests are passing (npm run test).
  • The linting checks are passing (npm run lint).
  • The code has been formatted (npm run format).

`getFeaturesManager.updateFeature` assigns both grid reference properties
before it applies the new geometry, and both are derived from
`feature.geometry`, so an updated point, line or shape keeps the grid
reference of its previous position while its coordinates move.

Adds unit tests covering add and update for each geometry type. The three
grid reference assertions for `updateFeature` fail until the ordering is
corrected; `getFeaturesManager` is exported so they can be driven directly.

No behaviour change.
@sonarqubecloud

sonarqubecloud Bot commented Oct 9, 2026

Copy link
Copy Markdown

@nayij

nayij commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

Lets merge along with the fix

@davidjamesstone
davidjamesstone merged commit 50b8b1c into main Oct 12, 2026
24 checks passed
@davidjamesstone
davidjamesstone deleted the DF-1497 branch October 12, 2026 09:25
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