mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 17:26:22 +01:00
fix tests
This commit is contained in:
@@ -67,9 +67,9 @@ const withReplacements = (
|
||||
);
|
||||
};
|
||||
|
||||
const copy = (input: Object) => {
|
||||
function copy<T>(input: T): T {
|
||||
return JSON.parse(JSON.stringify(input));
|
||||
}
|
||||
};
|
||||
|
||||
storiesOf("Changesets", module)
|
||||
.addDecorator(story => <MemoryRouter initialEntries={["/"]}>{story()}</MemoryRouter>)
|
||||
@@ -114,7 +114,10 @@ storiesOf("Changesets", module)
|
||||
type: "gpg",
|
||||
status: "VERIFIED",
|
||||
owner: "trillian",
|
||||
contacts: ["Tricia Marie McMilla <trillian@hitchhiker.com>"]
|
||||
contacts: [{
|
||||
name: "Tricia Marie McMilla",
|
||||
mail: "trillian@hitchhiker.com"
|
||||
}]
|
||||
}];
|
||||
return <ChangesetRow repository={repository} changeset={changeset} />;
|
||||
})
|
||||
@@ -125,7 +128,10 @@ storiesOf("Changesets", module)
|
||||
type: "gpg",
|
||||
status: "INVALID",
|
||||
owner: "trillian",
|
||||
contacts: ["Tricia Marie McMilla <trillian@hitchhiker.com>"]
|
||||
contacts: [{
|
||||
name: "Tricia Marie McMilla",
|
||||
mail: "trillian@hitchhiker.com"
|
||||
}]
|
||||
}];
|
||||
return <ChangesetRow repository={repository} changeset={changeset} />;
|
||||
});
|
||||
|
||||
@@ -79,9 +79,9 @@ const SignatureIcon: FC<Props> = ({signatures, className}) => {
|
||||
signature._links?.rawKey ? <a href={signature._links.rawKey.href}>{signature.keyId}</a> : signature.keyId
|
||||
}</div>
|
||||
<div>{t("changeset.signatureStatus")}: {status}</div>
|
||||
{signature.contacts?.length > 0 && <>
|
||||
{signature.contacts && signature.contacts.length > 0 && <>
|
||||
<div>{t("changeset.keyContacts")}:</div>
|
||||
{signature.contacts.map(contact => <div>- {contact.name}{contact.mail && ` <${contact.mail}>`}</div>)}
|
||||
{signature.contacts && signature.contacts.map(contact => <div>- {contact.name}{contact.mail && ` <${contact.mail}>`}</div>)}
|
||||
</>}
|
||||
</p>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user