65 new testcase creation/deletion - #72
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR adds workspace-scoped test case creation and deletion, wiring new backend mutation endpoints to new workspace UI controls and adding integration tests to validate behavior.
Changes:
- Added
POST /api/testcasesandDELETE /api/testcases/{workKey}endpoints with request/response DTOs and error handling. - Implemented service-layer validation/normalization for creating blank test cases and deleting by workKey.
- Added workspace UI for creating a test case from the sidebar, plus “Delete selected” bulk action support and corresponding API methods.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/com/formswim/teststream/testcase/controllers/TestCaseMutationController.java | New controller exposing create/delete test case REST endpoints. |
| src/main/java/com/formswim/teststream/testcase/services/WorkspaceTestCaseMutationService.java | New service implementing validation + persistence for create/delete. |
| src/main/java/com/formswim/teststream/testcase/dto/TestCaseCreateRequest.java | DTO for create request payload. |
| src/main/java/com/formswim/teststream/testcase/dto/TestCaseCreateResponse.java | DTO for create response payload. |
| src/main/java/com/formswim/teststream/testcase/services/TestCaseBadRequestException.java | Custom exception for 400s. |
| src/main/java/com/formswim/teststream/testcase/services/TestCaseConflictException.java | Custom exception for 409s. |
| src/main/java/com/formswim/teststream/testcase/services/TestCaseNotFoundException.java | Custom exception for 404s. |
| src/main/resources/static/js/workspace/api/workspace-page-api.js | Added createTestCase and deleteTestCase API calls. |
| src/main/resources/static/js/workspace/page.js | Added sidebar create form behavior + bulk delete UI flow. |
| src/main/resources/templates/workspace/_main.html | Added “New Testcase” button and inline create form fields in sidebar. |
| src/main/resources/templates/workspace/_bulk-bar.html | Added “Delete selected” bulk action button. |
| src/test/java/com/formswim/teststream/workspace/WorkspaceFolderApiIntegrationTests.java | Added integration tests covering test case create/delete endpoints. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Allow empty detail fields via bulk edit
|
Add test cases and delete but the creation is limited because there is no actual content being added or enabled. |
|
I think this will not pass a ci test since i know at least one checks for status being not editable |
|
Oh nevermind lol |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 27 out of 27 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 27 out of 27 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.







Closes #65
This pull request introduces backend and frontend support for creating and deleting test cases within a workspace. The changes include new REST API endpoints for test case creation and deletion, corresponding DTOs and exception classes, service logic for validation and persistence, and frontend integration for user interaction.
Backend: Test Case Mutation API
TestCaseMutationControllerto handle/api/testcasesPOST (create) and DELETE (delete by workKey) endpoints with appropriate authentication, authorization, and error handling.WorkspaceTestCaseMutationServicewith validation, normalization, and persistence logic for creating and deleting test cases, including custom exceptions for error scenarios.TestCaseCreateRequest,TestCaseCreateResponse) and custom exception classes (TestCaseBadRequestException,TestCaseConflictException,TestCaseNotFoundException). [1] [2] [3] [4] [5]Frontend: Workspace Page Integration
createTestCaseanddeleteTestCaseAPI methods toworkspace-page-api.js, exposing them via the workspace page API object. [1] [2] [3]page.jsfor showing/hiding the new test case form, submitting new test cases, and handling user input for test case creation. [1] [2] [3]These changes enable users to create and delete test cases directly from the workspace UI, with robust backend validation and error feedback.