Skip to content

Commit 2df36eb

Browse files
zimegmwbrooks
andauthored
style: use command section headers in create command output (#540)
Co-authored-by: Michael Brooks <mbrooks@slack-corp.com>
1 parent f2e54bc commit 2df36eb

4 files changed

Lines changed: 13 additions & 13 deletions

File tree

cmd/project/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ func printCreateSuccess(ctx context.Context, clients *shared.ClientFactory, appP
231231

232232
clients.IO.PrintInfo(ctx, false, "%s", style.Sectionf(style.TextSection{
233233
Emoji: "clipboard",
234-
Text: "Next steps to begin development",
234+
Text: "Next Steps",
235235
Secondary: secondaryOutput,
236236
}))
237237
}

cmd/project/init.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ func printNextStepSection(ctx context.Context, clients *shared.ClientFactory, pr
141141

142142
clients.IO.PrintInfo(ctx, false, "%s", style.Sectionf(style.TextSection{
143143
Emoji: "clipboard",
144-
Text: "Next steps to begin development",
144+
Text: "Next Steps",
145145
Secondary: secondaryOutput,
146146
}))
147147
}

cmd/project/init_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ func Test_Project_InitCommand(t *testing.T) {
6161
cm.IO.On("ConfirmPrompt", mock.Anything, app.LinkAppConfirmPromptText, mock.Anything).Return(false, nil)
6262
},
6363
ExpectedStdoutOutputs: []string{
64-
"Project Initialization", // Assert section header
65-
"App Link", // Assert section header
66-
"Next steps to begin development", // Assert section header
64+
"Project Initialization", // Assert section header
65+
"App Link", // Assert section header
66+
"Next Steps", // Assert section header
6767
},
6868
ExpectedAsserts: func(t *testing.T, ctx context.Context, cm *shared.ClientsMock) {
6969
// Assert installing project dependencies
7070
output := cm.GetCombinedOutput()
71-
require.Contains(t, output, "Installed project dependencies")
71+
require.Contains(t, output, "Project Dependencies")
7272
require.Contains(t, output, "Added "+filepath.Join("project-name", ".slack"))
7373
require.Contains(t, output, "Added "+filepath.Join("project-name", ".slack", ".gitignore"))
7474
require.Contains(t, output, "Added "+filepath.Join("project-name", ".slack", "hooks.json"))
@@ -148,9 +148,9 @@ func Test_Project_InitCommand(t *testing.T) {
148148
).Return(api.GetAppStatusResult{}, nil)
149149
},
150150
ExpectedStdoutOutputs: []string{
151-
"Project Initialization", // Assert section header
152-
"App Link", // Assert section header
153-
"Next steps to begin development", // Assert section header
151+
"Project Initialization", // Assert section header
152+
"App Link", // Assert section header
153+
"Next Steps", // Assert section header
154154
},
155155
ExpectedAsserts: func(t *testing.T, ctx context.Context, cm *shared.ClientsMock) {
156156
// Assert prompt to add existing apps was called

internal/pkg/create/create.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func Create(ctx context.Context, clients *shared.ClientFactory, createArgs Creat
126126
)
127127
clients.IO.PrintInfo(ctx, false, "\n%s", style.Sectionf(style.TextSection{
128128
Emoji: "open_file_folder",
129-
Text: "Created a new Slack project",
129+
Text: "Project Create",
130130
Secondary: projectDetails,
131131
}))
132132

@@ -447,16 +447,16 @@ func InstallProjectDependencies(
447447

448448
// Start the spinner
449449
spinnerText := fmt.Sprintf(
450-
"Installing project dependencies %s",
451-
style.Secondary("(this may take a few seconds)"),
450+
"Project Dependencies %s",
451+
style.Secondary("(installing... this may take a second)"),
452452
)
453453
spinner := style.NewSpinner(clients.IO.WriteErr())
454454
spinner.Update(spinnerText, "").Start()
455455

456456
// Stop the spinner when the function returns
457457
defer func() {
458458
spinnerText = style.Sectionf(style.TextSection{
459-
Text: "Installed project dependencies",
459+
Text: "Project Dependencies",
460460
Secondary: outputs,
461461
})
462462
spinner.Update(spinnerText, "package").Stop()

0 commit comments

Comments
 (0)