mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* refactor to multiple rows * added name for org user struct * added name getorgusers * added user name to tableview * made test pass * updated userMocks to user name field * added missing UsersTable snapshot * added name on teammembers page, be able to search query for name, login and email * added the updated snapshots * conform to same sorting as output form * conform to previous way of using it * sort first by login and after by email, as it was before
283 lines
5.4 KiB
Plaintext
283 lines
5.4 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`Render should render team members when sync enabled 1`] = `
|
|
<tr
|
|
key="1"
|
|
>
|
|
<td
|
|
className="width-4 text-center"
|
|
>
|
|
<img
|
|
className="filter-table__avatar"
|
|
src="some/url/"
|
|
/>
|
|
</td>
|
|
<td>
|
|
testUser
|
|
</td>
|
|
<td>
|
|
test@test.com
|
|
</td>
|
|
<td>
|
|
testName
|
|
</td>
|
|
<Component
|
|
featureToggle={false}
|
|
>
|
|
<td
|
|
className="width-5 team-permissions"
|
|
>
|
|
<div
|
|
className="gf-form"
|
|
>
|
|
<span>
|
|
Member
|
|
</span>
|
|
</div>
|
|
</td>
|
|
</Component>
|
|
<td>
|
|
<TagBadge
|
|
count={0}
|
|
key="LDAP"
|
|
label="LDAP"
|
|
onClick={[Function]}
|
|
removeIcon={false}
|
|
/>
|
|
</td>
|
|
<td
|
|
className="text-right"
|
|
>
|
|
<DeleteButton
|
|
disabled={true}
|
|
onConfirm={[Function]}
|
|
/>
|
|
</td>
|
|
</tr>
|
|
`;
|
|
|
|
exports[`Render when feature toggle editorsCanAdmin is turned off should not render permissions 1`] = `
|
|
<tr
|
|
key="1"
|
|
>
|
|
<td
|
|
className="width-4 text-center"
|
|
>
|
|
<img
|
|
className="filter-table__avatar"
|
|
src="some/url/"
|
|
/>
|
|
</td>
|
|
<td>
|
|
testUser
|
|
</td>
|
|
<td>
|
|
test@test.com
|
|
</td>
|
|
<td>
|
|
testName
|
|
</td>
|
|
<Component
|
|
featureToggle={false}
|
|
>
|
|
<td
|
|
className="width-5 team-permissions"
|
|
>
|
|
<div
|
|
className="gf-form"
|
|
>
|
|
<Select
|
|
allowCustomValue={false}
|
|
autoFocus={false}
|
|
backspaceRemovesValue={true}
|
|
className="gf-form-select-box__control--menu-right"
|
|
components={
|
|
Object {
|
|
"Group": [Function],
|
|
"IndicatorsContainer": [Function],
|
|
"MenuList": [Function],
|
|
"Option": [Function],
|
|
"SingleValue": [Function],
|
|
}
|
|
}
|
|
isClearable={false}
|
|
isDisabled={false}
|
|
isLoading={false}
|
|
isMulti={false}
|
|
isSearchable={false}
|
|
maxMenuHeight={300}
|
|
onChange={[Function]}
|
|
openMenuOnFocus={false}
|
|
options={
|
|
Array [
|
|
Object {
|
|
"description": "Is team member",
|
|
"label": "Member",
|
|
"value": 0,
|
|
},
|
|
Object {
|
|
"description": "Can add/remove permissions, members and delete team.",
|
|
"label": "Admin",
|
|
"value": 4,
|
|
},
|
|
]
|
|
}
|
|
tabSelectsValue={true}
|
|
value={
|
|
Object {
|
|
"description": "Is team member",
|
|
"label": "Member",
|
|
"value": 0,
|
|
}
|
|
}
|
|
/>
|
|
</div>
|
|
</td>
|
|
</Component>
|
|
<td
|
|
className="text-right"
|
|
>
|
|
<DeleteButton
|
|
disabled={false}
|
|
onConfirm={[Function]}
|
|
/>
|
|
</td>
|
|
</tr>
|
|
`;
|
|
|
|
exports[`Render when feature toggle editorsCanAdmin is turned on should render permissions select if user is team admin 1`] = `
|
|
<tr
|
|
key="1"
|
|
>
|
|
<td
|
|
className="width-4 text-center"
|
|
>
|
|
<img
|
|
className="filter-table__avatar"
|
|
src="some/url/"
|
|
/>
|
|
</td>
|
|
<td>
|
|
testUser
|
|
</td>
|
|
<td>
|
|
test@test.com
|
|
</td>
|
|
<td>
|
|
testName
|
|
</td>
|
|
<Component
|
|
featureToggle={true}
|
|
>
|
|
<td
|
|
className="width-5 team-permissions"
|
|
>
|
|
<div
|
|
className="gf-form"
|
|
>
|
|
<Select
|
|
allowCustomValue={false}
|
|
autoFocus={false}
|
|
backspaceRemovesValue={true}
|
|
className="gf-form-select-box__control--menu-right"
|
|
components={
|
|
Object {
|
|
"Group": [Function],
|
|
"IndicatorsContainer": [Function],
|
|
"MenuList": [Function],
|
|
"Option": [Function],
|
|
"SingleValue": [Function],
|
|
}
|
|
}
|
|
isClearable={false}
|
|
isDisabled={false}
|
|
isLoading={false}
|
|
isMulti={false}
|
|
isSearchable={false}
|
|
maxMenuHeight={300}
|
|
onChange={[Function]}
|
|
openMenuOnFocus={false}
|
|
options={
|
|
Array [
|
|
Object {
|
|
"description": "Is team member",
|
|
"label": "Member",
|
|
"value": 0,
|
|
},
|
|
Object {
|
|
"description": "Can add/remove permissions, members and delete team.",
|
|
"label": "Admin",
|
|
"value": 4,
|
|
},
|
|
]
|
|
}
|
|
tabSelectsValue={true}
|
|
value={
|
|
Object {
|
|
"description": "Is team member",
|
|
"label": "Member",
|
|
"value": 0,
|
|
}
|
|
}
|
|
/>
|
|
</div>
|
|
</td>
|
|
</Component>
|
|
<td
|
|
className="text-right"
|
|
>
|
|
<DeleteButton
|
|
disabled={false}
|
|
onConfirm={[Function]}
|
|
/>
|
|
</td>
|
|
</tr>
|
|
`;
|
|
|
|
exports[`Render when feature toggle editorsCanAdmin is turned on should render span and disable buttons if user is team member 1`] = `
|
|
<tr
|
|
key="1"
|
|
>
|
|
<td
|
|
className="width-4 text-center"
|
|
>
|
|
<img
|
|
className="filter-table__avatar"
|
|
src="some/url/"
|
|
/>
|
|
</td>
|
|
<td>
|
|
testUser
|
|
</td>
|
|
<td>
|
|
test@test.com
|
|
</td>
|
|
<td>
|
|
testName
|
|
</td>
|
|
<Component
|
|
featureToggle={true}
|
|
>
|
|
<td
|
|
className="width-5 team-permissions"
|
|
>
|
|
<div
|
|
className="gf-form"
|
|
>
|
|
<span>
|
|
Member
|
|
</span>
|
|
</div>
|
|
</td>
|
|
</Component>
|
|
<td
|
|
className="text-right"
|
|
>
|
|
<DeleteButton
|
|
disabled={true}
|
|
onConfirm={[Function]}
|
|
/>
|
|
</td>
|
|
</tr>
|
|
`;
|