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

feat(folder.router): improve validation, add integration tests #767

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

karrui
Copy link
Contributor

@karrui karrui commented Oct 11, 2024

Solution

This PR implements the create mutation for the folder router, adding robust error handling and validation.

Breaking Changes

  • No - this PR is backwards compatible

Features:

  • Implemented create mutation for folder router
  • Added validation for site existence
  • Added validation for parent folder existence and type

Improvements:

  • Enhanced error handling for duplicate permalinks
  • Implemented transaction to ensure data consistency

Bug Fixes:

  • Fixed potential issues with invalid parent folder IDs

Tests

  • Added comprehensive test suite for the create mutation
  • Tests cover various scenarios including:
    • Unauthorized access
    • Duplicate permalinks
    • Invalid site IDs
    • Invalid parent folder IDs
    • Successful folder creation
    • Nested folder creation

New scripts:

None

New dependencies:

None

New dev dependencies:

None

Copy link

vercel bot commented Oct 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
isomer-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 11, 2024 11:11am

Copy link
Contributor Author

karrui commented Oct 11, 2024

@karrui karrui changed the title fix(folder.router): return id instead of undefined in folder.create feat: ad Oct 11, 2024
@karrui karrui changed the title feat: ad feat(folder.router): improve validation, add integration tests Oct 11, 2024
@karrui karrui marked this pull request as ready for review October 11, 2024 07:30
@karrui karrui requested a review from a team as a code owner October 11, 2024 07:30
@datadog-opengovsg
Copy link

datadog-opengovsg bot commented Oct 11, 2024

Datadog Report

Branch report: folder_router_tests
Commit report: eda21cc
Test service: isomer-studio

✅ 0 Failed, 137 Passed, 25 Skipped, 35.44s Total Time
⬆️ Test Sessions change in coverage: 1 increased (+0.64%)

@karrui
Copy link
Contributor Author

karrui commented Oct 11, 2024

Draft, tests not complete. leave it to @seaerchin to finish

Copy link

mergify bot commented Nov 10, 2024

This pull request has been stale for more than 30 days! Could someone please take a look at it @opengovsg/isomer-engineers

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.

1 participant