mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +00:00
feat: Show custom resource icons in the UI (#4020)
This commit is contained in:
@ -27,6 +27,7 @@ func TestWorkspaceResource(t *testing.T) {
|
||||
Resources: []*proto.Resource{{
|
||||
Name: "beta",
|
||||
Type: "example",
|
||||
Icon: "/icon/server.svg",
|
||||
Agents: []*proto.Agent{{
|
||||
Id: "something",
|
||||
Name: "b",
|
||||
@ -60,9 +61,11 @@ func TestWorkspaceResource(t *testing.T) {
|
||||
resource, err := client.WorkspaceResource(ctx, resources[1].ID)
|
||||
require.NoError(t, err)
|
||||
require.Len(t, resource.Agents, 2)
|
||||
// Ensure it's sorted alphabetically!
|
||||
// Ensure agents are sorted alphabetically!
|
||||
require.Equal(t, "a", resource.Agents[0].Name)
|
||||
require.Equal(t, "b", resource.Agents[1].Name)
|
||||
// Ensure Icon is present
|
||||
require.Equal(t, "/icon/server.svg", resources[1].Icon)
|
||||
})
|
||||
|
||||
t.Run("Apps", func(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user