feat: Show custom resource icons in the UI (#4020)

This commit is contained in:
Bruno Quaresma
2022-09-13 11:32:59 -03:00
committed by GitHub
parent 83c35bb916
commit 214e59452f
60 changed files with 282 additions and 220 deletions

View File

@ -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) {