Truncate access review roles with badge list
Long role strings in the access review table broke row layout when drivers joined many roles into one comma-separated value. Expose roles as a string array in GraphQL by splitting the stored role at the API layer, and render the first three roles as badges with a "+X more" popover for the rest. Closes ENG-459. Signed-off-by: Ludovic Vielle <ludovic@probo.com>
This commit is contained in:
@@ -46,7 +46,7 @@ func TestHerokuDriver(t *testing.T) {
|
||||
assert.NotEmpty(t, r.Email)
|
||||
assert.NotEmpty(t, r.ExternalID)
|
||||
assert.NotEmpty(t, r.FullName)
|
||||
assert.NotEmpty(t, r.Role)
|
||||
assert.NotEmpty(t, r.Roles)
|
||||
assert.Equal(t, coredata.MFAStatusEnabled, r.MFAStatus)
|
||||
assert.True(t, r.IsAdmin)
|
||||
require.NotNil(t, r.CreatedAt)
|
||||
@@ -106,7 +106,7 @@ func TestHerokuDriverPersonalAccount(t *testing.T) {
|
||||
assert.Contains(t, byEmail, "carol@example.com")
|
||||
|
||||
assert.True(t, byEmail["alice@example.com"].IsAdmin)
|
||||
assert.Equal(t, "owner", byEmail["alice@example.com"].Role)
|
||||
assert.Equal(t, []string{"owner"}, byEmail["alice@example.com"].Roles)
|
||||
assert.False(t, byEmail["bob@example.com"].IsAdmin)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user