Repository navigation
Conversation
|
|
||
| if s.Status != "" { | ||
| status := style.Secondary(fmt.Sprintf("Status: %s", strings.ToTitle(s.Status))) | ||
| status := style.Secondary(fmt.Sprintf("Status: %s", strings.ToLower(s.Status))) |
There was a problem hiding this comment.
Thinking this could be lowercase so it doesn't feel like we're shouting
my cool sandbox (E0C6ZL333CM)
URL: https://sandbox-pwureipq.slack.com
Type: Partner vs. partner
Status: ACTIVE vs. active
Created: 2026-10-06
Expires: 2026-12-06
…geris-update-sandbox-list
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #689 +/- ##
==========================================
- Coverage 78.23% 78.19% -0.05%
==========================================
Files 239 239
Lines 18149 18150 +1
==========================================
- Hits 14199 14192 -7
- Misses 3950 3958 +8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| ExpectedStdoutOutputs: []string{"my-sandbox", "T123", "https://my-sandbox.slack.com", "Status: active", "basic-sandbox", "T456"}, | ||
| ExpectedAsserts: func(t *testing.T, ctx context.Context, cm *shared.ClientsMock) { | ||
| cm.API.AssertCalled(t, "ListSandboxes", mock.Anything, "xoxb-test-token", "") | ||
| assert.NotContains(t, cm.GetStdoutOutput(), "Type:") |
There was a problem hiding this comment.
looks like this test is failing because you are expecting no type but in list.go we return Type: "basic"
{
TeamID: "T456",
Name: "basic-sandbox",
Domain: "basic-sandbox",
Status: "active",
DateCreated: 1700000000,
DateArchived: 0,
Type: "basic",
},
There was a problem hiding this comment.
Whoops! Updated :)
(Now all sandboxes in the output of the list API will have a 'type' most commonly 'regular' or 'basic')
| cm.API.AssertCalled(t, "ListSandboxes", mock.Anything, "xoxb-test-token", "") | ||
| }, | ||
| }, | ||
| "with active sandboxes": { |
There was a problem hiding this comment.
It didn't seem worth having separate tests to verify that if the sandbox status was active vs archived, it would be reflected in the printed output. Merged this into a single test for 'printed output displays sandbox attributes as expected'
srtaalej
left a comment
There was a problem hiding this comment.
thanks for keeping this command up to date!
Changelog
Small change to the output of the
sandboxes listcommand; status and type displayed lowercase and nowType: basicwill be displayed for basic sandboxes (previously we only showed the type label for partner sandboxes, to differentiate from regular sandboxes).Summary
We recently introduced 'basic' sandboxes. In the developer dashboard we display a little label to differentiate between 'basic' and regular sandboxes, and there is no label on regular sandboxes. For consistency, this PR adds the 'type' attribute when listing basic sandboxes. We anticipate that a significant percentage of new sandboxes will be basic as this opens sandbox access up to a larger swathe of users.
Preview
Viewing sandboxes in the web UI:
Listing sandboxes in the CLI:
Testing
(List the steps used to verify these changes)
Notes
(Add any additional context, trade-offs, or follow-up items)
Requirements