mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 23:15:43 +01:00
Fix endless running test (#1572)
Fix endless running ui tests. Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
This commit is contained in:
@@ -104,23 +104,22 @@ export const useLogout = () => {
|
|||||||
const link = useIndexLink("logout");
|
const link = useIndexLink("logout");
|
||||||
const reset = useReset();
|
const reset = useReset();
|
||||||
|
|
||||||
const { mutate, isLoading, error, data } = useMutation<LogoutResponse, Error, unknown>(() =>
|
const { mutate, isLoading, error, data } = useMutation<LogoutResponse, Error, unknown>(
|
||||||
apiClient.delete(link!).then(r => (r.status === 200 ? r.json() : {}))
|
() => apiClient.delete(link!).then(r => (r.status === 200 ? r.json() : {})),
|
||||||
|
{
|
||||||
|
onSuccess: response => {
|
||||||
|
if (response?.logoutRedirect) {
|
||||||
|
window.location.assign(response.logoutRedirect);
|
||||||
|
}
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
const logout = () => {
|
const logout = () => {
|
||||||
mutate({});
|
mutate({});
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (data?.logoutRedirect) {
|
|
||||||
window.location.assign(data.logoutRedirect);
|
|
||||||
}
|
|
||||||
if (data) {
|
|
||||||
reset();
|
|
||||||
}
|
|
||||||
}, [data, reset]);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
logout: link && !data ? logout : undefined,
|
logout: link && !data ? logout : undefined,
|
||||||
isLoading,
|
isLoading,
|
||||||
|
|||||||
@@ -3734,24 +3734,11 @@ Array [
|
|||||||
className="Breadcrumbstories__Wrapper-sc-1eq8sgz-0 hTbphm"
|
className="Breadcrumbstories__Wrapper-sc-1eq8sgz-0 hTbphm"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="is-flex is-align-items-center ml-5 my-4 mr-3"
|
className="is-flex is-align-items-center"
|
||||||
>
|
>
|
||||||
<div
|
|
||||||
className="Breadcrumb__PermaLinkWrapper-zvtb4t-0 eqtJhO ml-1"
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
className="tooltip has-tooltip-right"
|
|
||||||
data-tooltip="breadcrumb.copyPermalink"
|
|
||||||
>
|
|
||||||
<i
|
|
||||||
className="fas fa-link has-text-inherit"
|
|
||||||
onClick={[Function]}
|
|
||||||
/>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<nav
|
<nav
|
||||||
aria-label="breadcrumbs"
|
aria-label="breadcrumbs"
|
||||||
className="Breadcrumb__BreadcrumbNav-zvtb4t-1 caWANn breadcrumb sources-breadcrumb ml-1 mb-0"
|
className="Breadcrumb__BreadcrumbNav-zvtb4t-1 gyUWqH breadcrumb sources-breadcrumb ml-1 mb-0"
|
||||||
>
|
>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
@@ -3818,6 +3805,19 @@ Array [
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<span
|
||||||
|
className="Breadcrumb__PermaLinkWrapper-zvtb4t-0 eqtJhO ml-1"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
className="tooltip has-tooltip-right"
|
||||||
|
data-tooltip="breadcrumb.copyPermalink"
|
||||||
|
>
|
||||||
|
<i
|
||||||
|
className="fas fa-link has-text-inherit"
|
||||||
|
onClick={[Function]}
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
<hr
|
<hr
|
||||||
@@ -4368,24 +4368,11 @@ Array [
|
|||||||
className="Breadcrumbstories__Wrapper-sc-1eq8sgz-0 hTbphm"
|
className="Breadcrumbstories__Wrapper-sc-1eq8sgz-0 hTbphm"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="is-flex is-align-items-center ml-5 my-4 mr-3"
|
className="is-flex is-align-items-center"
|
||||||
>
|
>
|
||||||
<div
|
|
||||||
className="Breadcrumb__PermaLinkWrapper-zvtb4t-0 eqtJhO ml-1"
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
className="tooltip has-tooltip-right"
|
|
||||||
data-tooltip="breadcrumb.copyPermalink"
|
|
||||||
>
|
|
||||||
<i
|
|
||||||
className="fas fa-link has-text-inherit"
|
|
||||||
onClick={[Function]}
|
|
||||||
/>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<nav
|
<nav
|
||||||
aria-label="breadcrumbs"
|
aria-label="breadcrumbs"
|
||||||
className="Breadcrumb__BreadcrumbNav-zvtb4t-1 caWANn breadcrumb sources-breadcrumb ml-1 mb-0"
|
className="Breadcrumb__BreadcrumbNav-zvtb4t-1 gyUWqH breadcrumb sources-breadcrumb ml-1 mb-0"
|
||||||
>
|
>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
@@ -4502,6 +4489,19 @@ Array [
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<span
|
||||||
|
className="Breadcrumb__PermaLinkWrapper-zvtb4t-0 eqtJhO ml-1"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
className="tooltip has-tooltip-right"
|
||||||
|
data-tooltip="breadcrumb.copyPermalink"
|
||||||
|
>
|
||||||
|
<i
|
||||||
|
className="fas fa-link has-text-inherit"
|
||||||
|
onClick={[Function]}
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
<hr
|
<hr
|
||||||
|
|||||||
Reference in New Issue
Block a user