Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VUU54: Add validation for layout/metadata IDs #60

Merged
merged 18 commits into from
Oct 10, 2023

Conversation

pling-scottlogic
Copy link

Description

Adds validation to layout management, such that errors are thrown when attempting operations on layouts or metadata that do not have unique entries in local storage.

Change List

  • Adjust LayoutPersistenceManager to return promises
  • Handle returned promises in useLayoutManager
  • Add private methods to LocalLayoutPersistenceManager to validate IDs:
    • validateId ensures there is a unique entry in local storage (metadata or layout, depending on provided flag) corresponding to the provided ID
    • validateIds ensures there is a unique metadata entry and a unique layout entry in local storage corresponding to the provided ID
  • Add unit tests for all public methods on LocalLayoutPersistenceManager
  • Add environment to global vitest configuration
  • Add data file with warning layout

Closes #54

@pling-scottlogic pling-scottlogic self-assigned this Sep 29, 2023
@pling-scottlogic pling-scottlogic changed the title Add validation for layout/metadata IDs #54 VUU54: Add validation for layout/metadata IDs Sep 29, 2023
@pling-scottlogic pling-scottlogic force-pushed the feature/layout-management/VUU54-idValidation branch from f5b7123 to 2fa7b4f Compare October 3, 2023 09:40
@pling-scottlogic pling-scottlogic merged commit 51a364b into main Oct 10, 2023
6 checks passed
@pling-scottlogic pling-scottlogic deleted the feature/layout-management/VUU54-idValidation branch October 10, 2023 09:47
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.

Validate IDs in LocalLayoutPersistenceManager
3 participants