(t *testing.T)
| 188 | } |
| 189 | |
| 190 | func TestCustomSupportLinks(t *testing.T) { |
| 191 | t.Parallel() |
| 192 | |
| 193 | supportLinks := []codersdk.LinkConfig{ |
| 194 | { |
| 195 | Name: "First link", |
| 196 | Target: "http://first-link-1", |
| 197 | Icon: "chat", |
| 198 | }, |
| 199 | { |
| 200 | Name: "Second link", |
| 201 | Target: "http://second-link-2", |
| 202 | Icon: "bug", |
| 203 | }, |
| 204 | { |
| 205 | Name: "First button", |
| 206 | Target: "http://first-button-1", |
| 207 | Icon: "bug", |
| 208 | Location: "navbar", |
| 209 | }, |
| 210 | { |
| 211 | Name: "Third link", |
| 212 | Target: "http://third-link-3", |
| 213 | Icon: "star", |
| 214 | }, |
| 215 | } |
| 216 | cfg := coderdtest.DeploymentValues(t) |
| 217 | cfg.Support.Links = serpent.Struct[[]codersdk.LinkConfig]{ |
| 218 | Value: supportLinks, |
| 219 | } |
| 220 | |
| 221 | adminClient, adminUser := coderdenttest.New(t, &coderdenttest.Options{ |
| 222 | Options: &coderdtest.Options{ |
| 223 | DeploymentValues: cfg, |
| 224 | }, |
| 225 | LicenseOptions: &coderdenttest.LicenseOptions{ |
| 226 | Features: license.Features{ |
| 227 | codersdk.FeatureAppearance: 1, |
| 228 | }, |
| 229 | }, |
| 230 | }) |
| 231 | |
| 232 | anotherClient, _ := coderdtest.CreateAnotherUser(t, adminClient, adminUser.OrganizationID) |
| 233 | ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitMedium) |
| 234 | defer cancel() |
| 235 | |
| 236 | appr, err := anotherClient.Appearance(ctx) |
| 237 | require.NoError(t, err) |
| 238 | require.Equal(t, supportLinks, appr.SupportLinks) |
| 239 | } |
| 240 | |
| 241 | func TestCustomDocsURL(t *testing.T) { |
| 242 | t.Parallel() |
nothing calls this directly
no test coverage detected