mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 17:05:43 +01:00
fix review findings
This commit is contained in:
@@ -24,7 +24,13 @@
|
||||
import React from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { User } from "@scm-manager/ui-types";
|
||||
import { Checkbox, DateFromNow, MailLink } from "@scm-manager/ui-components";
|
||||
import {
|
||||
Checkbox,
|
||||
DateFromNow,
|
||||
MailLink,
|
||||
createAttributesForTesting,
|
||||
replaceSpacesInTestId
|
||||
} from "@scm-manager/ui-components";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
user: User;
|
||||
@@ -38,11 +44,11 @@ class Details extends React.Component<Props> {
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{t("user.name")}</th>
|
||||
<td>{user.name}</td>
|
||||
<td {...createAttributesForTesting(replaceSpacesInTestId(user.name))}>{user.name}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{t("user.displayName")}</th>
|
||||
<td>{user.displayName}</td>
|
||||
<td {...createAttributesForTesting(replaceSpacesInTestId(user.displayName))}>{user.displayName}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{t("user.mail")}</th>
|
||||
|
||||
@@ -25,7 +25,7 @@ import React from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { Link } from "react-router-dom";
|
||||
import { User } from "@scm-manager/ui-types";
|
||||
import { Icon } from "@scm-manager/ui-components";
|
||||
import { Icon, createAttributesForTesting } from "@scm-manager/ui-components";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
user: User;
|
||||
@@ -33,7 +33,11 @@ type Props = WithTranslation & {
|
||||
|
||||
class UserRow extends React.Component<Props> {
|
||||
renderLink(to: string, label: string) {
|
||||
return <Link to={to}>{label}</Link>;
|
||||
return (
|
||||
<Link to={to} {...createAttributesForTesting(label)}>
|
||||
{label}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
Reference in New Issue
Block a user