8000 feat: support multiple terminal fonts by mtojek · Pull Request #17257 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat: support multiple terminal fonts #17257

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

Merged
merged 22 commits into from
Apr 7, 2025
Merged
Prev Previous commit
Next Next commit
fix
  • Loading branch information
mtojek committed Apr 4, 2025
commit f4c24efe2b06fe328ced15dc4a881791a0e03bf0
2 changes: 2 additions & 0 deletions coderd/users_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1972,10 +1972,10 @@
require.NoError(t, err)
}

func TestUserTerminalFont(t *testing.T) {

Check failure on line 1975 in coderd/users_test.go

View workflow job for this annotation

GitHub Actions / lint

TestUserTerminalFont's subtests should call t.Parallel (tparallel)
t.Parallel()

t.Run("valid font", func(t *testing.T) {

Check failure on line 1978 in coderd/users_test.go

View workflow job for this annotation

GitHub Actions / lint

Function TestUserTerminalFont missing the call to method parallel in the test run (paralleltest)
adminClient := coderdtest.New(t, nil)
firstUser := coderdtest.CreateFirstUser(t, adminClient)
client, _ := coderdtest.CreateAnotherUser(t, adminClient, firstUser.OrganizationID)
Expand All @@ -1984,7 +1984,7 @@
defer cancel()

// given
initial, err := client.GetUserAppearanceSettings(ctx, "me")

Check failure on line 1987 in coderd/users_test.go

View workflow job for this annotation

GitHub Actions / lint

ineffectual assignment to err (ineffassign)
require.Equal(t, codersdk.TerminalFontName(""), initial.TerminalFont)

// when
Expand All @@ -1998,7 +1998,7 @@
require.Equal(t, codersdk.TerminalFontFiraCode, updated.TerminalFont)
})

t.Run("unsupported font", func(t *testing.T) {

Check failure on line 2001 in coderd/users_test.go

View workflow job for this annotation

GitHub Actions / lint

Function TestUserTerminalFont missing the call to method parallel in the test run (paralleltest)
adminClient := coderdtest.New(t, nil)
firstUser := coderdtest.CreateFirstUser(t, adminClient)
client, _ := coderdtest.CreateAnotherUser(t, adminClient, firstUser.OrganizationID)
Expand All @@ -2008,6 +2008,7 @@

// given
initial, err := client.GetUserAppearanceSettings(ctx, "me")
require.NoError(t, err)
require.Equal(t, codersdk.TerminalFontName(""), initial.TerminalFont)

// when
Expand All @@ -2020,7 +2021,7 @@
require.Error(t, err)
})

t.Run("undefined font is not ok", func(t *testing.T) {

Check failure on line 2024 in coderd/users_test.go

View workflow job for this annotation

GitHub Actions / lint

Function TestUserTerminalFont missing the call to method parallel in the test run (paralleltest)
adminClient := coderdtest.New(t, nil)
firstUser := coderdtest.CreateFirstUser(t, adminClient)
client, _ := coderdtest.CreateAnotherUser(t, adminClient, firstUser.OrganizationID)
Expand All @@ -2030,6 +2031,7 @@

// given
initial, err := client.GetUserAppearanceSettings(ctx, "me")
require.NoError(t, err)
require.Equal(t, codersdk.TerminalFontName(""), initial.TerminalFont)

// when
Expand Down
Loading
0