Conversation
* @W-20683414 initial ODS E2E tests * added end to end ODS lifecycle tests * minor refactors * updated e2e test run flow * Updated execa version and lockfile * resolved linting and formatting issues
There was a problem hiding this comment.
@charithaT07 Lets keep this file and not delete. My plan for it was a cross-functional e2e test of the CLI itself from shell.
| /** | ||
| * Helper function to parse JSON response from CLI | ||
| */ | ||
| function extractJsonFromText(text: string): null | string { |
There was a problem hiding this comment.
Is there a reason this function was necessary? When using --json mode the stdout should be valid JSON so I'm curious which situation it was not.
Also be aware that OCLIF has some test helpers https://oclif.io/docs/testing/ that may be useful and conserve code when testing the CLI directly. We should make sure we're taking full advantage of those.
There was a problem hiding this comment.
Thanks , as json mode is giving valid json I removed extractJsonFromText. Agreed on OCLIF test helpers . The reason we used execa is to exercise the CLI as an external process to better reflect real user behavior.
There was a problem hiding this comment.
The reason we used execa is to exercise the CLI as an external process to better reflect real user behavior.
Yep no problem there. Just wanted to make sure you knew about the test helpers. Use what is useful
clavery
left a comment
There was a problem hiding this comment.
Looks good. If you're putting in the new workflow I'll reapprove when that's ready. I'll add vars and secrets today for
vars.TEST_REALM (var not secret)
vars.SFCC_CLIENT_ID
secrets.SFCC_CLIENT_SECRET
vars.SFCC_ACCOUNT_MANAGER_HOST
vars.SFCC_SANDBOX_API_HOST
Summary
Brief description of what this PR does.
This PR introduces end-to-end tests for ODS (On-Demand Sandbox) functionality, covering the sandbox lifecycle from creation to deletion.
This is the initial implementation for review and feedback. Future enhancements will add E2E coverage with additional ODS workflows including site imports
Test Coverage
✅ Sandbox creation with permissions and wait functionality
✅ Sandbox listing and verification
✅ Code deployment to sandbox
✅ Sandbox state management (stop/start/restart)
✅ Sandbox status retrieval
✅ Sandbox deletion
✅ Error handling for invalid realms and authentication failures